From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Jackson Subject: [PATCH 1/2] drm/edid: Be more conservative about maximum pixel clock Date: Mon, 25 Jun 2012 11:25:18 -0400 Message-ID: <1340637919-5322-2-git-send-email-ajax@redhat.com> References: <1340637919-5322-1-git-send-email-ajax@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 69CA09ECC0 for ; Mon, 25 Jun 2012 08:25:24 -0700 (PDT) In-Reply-To: <1340637919-5322-1-git-send-email-ajax@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: svenjoac@gmx.de List-Id: dri-devel@lists.freedesktop.org Signed-off-by: Adam Jackson --- 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