mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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:
parent
616b843468
commit
ebb177d2af
1 changed files with 33 additions and 37 deletions
|
@ -502,12 +502,40 @@ 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) {
|
||||||
|
/* Other timing or info */
|
||||||
|
switch (data->type) {
|
||||||
|
case EDID_DETAIL_MONITOR_SERIAL:
|
||||||
|
break;
|
||||||
|
case EDID_DETAIL_MONITOR_STRING:
|
||||||
|
break;
|
||||||
|
case EDID_DETAIL_MONITOR_RANGE:
|
||||||
|
/* Get monitor range data */
|
||||||
|
break;
|
||||||
|
case EDID_DETAIL_MONITOR_NAME:
|
||||||
|
break;
|
||||||
|
case EDID_DETAIL_MONITOR_CPDATA:
|
||||||
|
break;
|
||||||
|
case EDID_DETAIL_STD_MODES:
|
||||||
|
/* Five modes per detailed section */
|
||||||
|
for (j = 0; j < 5; i++) {
|
||||||
|
struct std_timing *std;
|
||||||
|
struct drm_display_mode *newmode;
|
||||||
|
|
||||||
/* Detailed mode timing */
|
std = &data->data.timings[j];
|
||||||
if (timing->pixel_clock) {
|
newmode = drm_mode_std(dev, std);
|
||||||
|
if (newmode) {
|
||||||
|
drm_mode_probed_add(connector, newmode);
|
||||||
|
modes++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
newmode = drm_mode_detailed(dev, edid, timing, quirks);
|
newmode = drm_mode_detailed(dev, edid, timing, quirks);
|
||||||
if (!newmode)
|
if (!newmode)
|
||||||
continue;
|
continue;
|
||||||
|
@ -518,38 +546,6 @@ static int add_detailed_info(struct drm_connector *connector,
|
||||||
drm_mode_probed_add(connector, newmode);
|
drm_mode_probed_add(connector, newmode);
|
||||||
|
|
||||||
modes++;
|
modes++;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Other timing or info */
|
|
||||||
switch (data->type) {
|
|
||||||
case EDID_DETAIL_MONITOR_SERIAL:
|
|
||||||
break;
|
|
||||||
case EDID_DETAIL_MONITOR_STRING:
|
|
||||||
break;
|
|
||||||
case EDID_DETAIL_MONITOR_RANGE:
|
|
||||||
/* Get monitor range data */
|
|
||||||
break;
|
|
||||||
case EDID_DETAIL_MONITOR_NAME:
|
|
||||||
break;
|
|
||||||
case EDID_DETAIL_MONITOR_CPDATA:
|
|
||||||
break;
|
|
||||||
case EDID_DETAIL_STD_MODES:
|
|
||||||
/* Five modes per detailed section */
|
|
||||||
for (j = 0; j < 5; i++) {
|
|
||||||
struct std_timing *std;
|
|
||||||
struct drm_display_mode *newmode;
|
|
||||||
|
|
||||||
std = &data->data.timings[j];
|
|
||||||
newmode = drm_mode_std(dev, std);
|
|
||||||
if (newmode) {
|
|
||||||
drm_mode_probed_add(connector, newmode);
|
|
||||||
modes++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue