drm/edid: fixup detailed timings like the X server.
this syncs the versioning check with the code the X server uses. Reported-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -502,25 +502,9 @@ static int add_detailed_info(struct drm_connector *connector,
|
|||||||
struct detailed_non_pixel *data = &timing->data.other_data;
|
struct detailed_non_pixel *data = &timing->data.other_data;
|
||||||
struct drm_display_mode *newmode;
|
struct drm_display_mode *newmode;
|
||||||
|
|
||||||
/* EDID up to and including 1.2 may put monitor info here */
|
/* X server check is version 1.1 or higher */
|
||||||
if (edid->version == 1 && edid->revision < 3)
|
if (edid->version == 1 && edid->revision >= 1 &&
|
||||||
continue;
|
!timing->pixel_clock) {
|
||||||
|
|
||||||
/* Detailed mode timing */
|
|
||||||
if (timing->pixel_clock) {
|
|
||||||
newmode = drm_mode_detailed(dev, edid, timing, quirks);
|
|
||||||
if (!newmode)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* First detailed mode is preferred */
|
|
||||||
if (i == 0 && (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING))
|
|
||||||
newmode->type |= DRM_MODE_TYPE_PREFERRED;
|
|
||||||
drm_mode_probed_add(connector, newmode);
|
|
||||||
|
|
||||||
modes++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Other timing or info */
|
/* Other timing or info */
|
||||||
switch (data->type) {
|
switch (data->type) {
|
||||||
case EDID_DETAIL_MONITOR_SERIAL:
|
case EDID_DETAIL_MONITOR_SERIAL:
|
||||||
@@ -551,6 +535,18 @@ static int add_detailed_info(struct drm_connector *connector,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
newmode = drm_mode_detailed(dev, edid, timing, quirks);
|
||||||
|
if (!newmode)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* First detailed mode is preferred */
|
||||||
|
if (i == 0 && (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING))
|
||||||
|
newmode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||||
|
drm_mode_probed_add(connector, newmode);
|
||||||
|
|
||||||
|
modes++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return modes;
|
return modes;
|
||||||
|
Reference in New Issue
Block a user