diff options
author | Adam Jackson <ajax@redhat.com> | 2010-03-29 17:43:28 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-05 20:40:23 -0400 |
commit | a0910c8e37c3bede089e9f9dee63a7eaf9601a43 (patch) | |
tree | 1dd9881958d42631d951be41065567728b359b91 | |
parent | b17e52ef7e7961f02baec98872781386218558bc (diff) |
drm/edid: Fix the HDTV hack.
Standard timings don't let you say 1366. Both 1360 and 1368 have been
seen in the wild. So invent a CVT timing for it. CVT will round 1366 up
to 1368; we'll then manually underscan it.
Split this into two parts, since we need to do something sneaky between
them in the future.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index e746dd56658a..d7214389c2d6 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -765,15 +765,25 @@ struct drm_display_mode *drm_mode_std(struct drm_device *dev, | |||
765 | vsize = (hsize * 4) / 5; | 765 | vsize = (hsize * 4) / 5; |
766 | else | 766 | else |
767 | vsize = (hsize * 9) / 16; | 767 | vsize = (hsize * 9) / 16; |
768 | /* HDTV hack */ | 768 | |
769 | if (hsize == 1360 && vsize == 765 && vrefresh_rate == 60) { | 769 | /* HDTV hack, part 1 */ |
770 | mode = drm_cvt_mode(dev, hsize, vsize, vrefresh_rate, 0, 0, | 770 | if (vrefresh_rate == 60 && |
771 | ((hsize == 1360 && vsize == 765) || | ||
772 | (hsize == 1368 && vsize == 769))) { | ||
773 | hsize = 1366; | ||
774 | vsize = 768; | ||
775 | } | ||
776 | |||
777 | /* HDTV hack, part 2 */ | ||
778 | if (hsize == 1366 && vsize == 768 && vrefresh_rate == 60) { | ||
779 | mode = drm_cvt_mode(dev, 1366, 768, vrefresh_rate, 0, 0, | ||
771 | false); | 780 | false); |
772 | mode->hdisplay = 1366; | 781 | mode->hdisplay = 1366; |
773 | mode->vsync_start = mode->vsync_start - 1; | 782 | mode->vsync_start = mode->vsync_start - 1; |
774 | mode->vsync_end = mode->vsync_end - 1; | 783 | mode->vsync_end = mode->vsync_end - 1; |
775 | return mode; | 784 | return mode; |
776 | } | 785 | } |
786 | |||
777 | mode = NULL; | 787 | mode = NULL; |
778 | /* check whether it can be found in default mode table */ | 788 | /* check whether it can be found in default mode table */ |
779 | mode = drm_find_dmt(dev, hsize, vsize, vrefresh_rate); | 789 | mode = drm_find_dmt(dev, hsize, vsize, vrefresh_rate); |