Signed-off-by: Adam Jackson <a...@redhat.com>
---
 drivers/gpu/drm/drm_edid.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5873e48..4a3e61a 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1007,8 +1007,15 @@ range_pixel_clock(struct edid *edid, u8 *t)
        if (edid->revision >= 4 && t[10] == 0x04)
                return (t[9] * 10000) - ((t[12] >> 2) * 250);
 
-       /* 1.3 is pathetic, so fuzz up a bit */
-       return t[9] * 10000 + 5001;
+       /*
+        * Otherwise we have only 10MHz granularity. If we were using this
+        * code to filter an EDID mode list we'd want to round up like
+        * xserver does, as it's common to see a max of 160MHz but a 162MHz
+        * 1600x1200 mode as the preferred timing.  But since we're using
+        * this as a filter while _building_ the list from implied support,
+        * not rounding up is the safe thing.
+        */
+       return t[9] * 10000;
 }
 
 static bool
-- 
1.7.7.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to