From patchwork Fri Feb 15 15:36:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 2148581 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1738BDF24C for ; Fri, 15 Feb 2013 15:39:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD981E5F1E for ; Fri, 15 Feb 2013 07:39:36 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-gg0-f177.google.com (mail-gg0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D4A3E6BA8; Fri, 15 Feb 2013 07:39:08 -0800 (PST) Received: by mail-gg0-f177.google.com with SMTP id q1so117612gge.8 for ; Fri, 15 Feb 2013 07:39:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=hjVWWwjHIcV2AMeLpuHoLDErqCaREJGOuVGPqHuXz10=; b=XINANMh8Hk3lF5isBnkTcl1ZzuVGeM/4O3TK6JzefllM37F/zHTi1nmiNYPh3jYEBp Ja0TGXK2/f/shjt3aiClNX7XUD1csHPHx9pPYd4xf72eQHcUik/v7NvV31CgWRkfAGOm F08kCg+0jhlY7ug3FrABw2asKzdh6QAF/8Q89TOg/fsMtNjS9LS3hLgLB+irf+JkAAjZ 6zBfsK51jtjSHDLQ7s/vwZJn2n4Ys16PrYQHDq9XjjS+60s4DqgXlyWAH4katmeobthR hTsWTCunXAuk++hprZDGSXNeVmhbePjJW6meUnnqswFZVDtOYeEL81SvdWDecU6PrNBo 9KrA== X-Received: by 10.101.107.8 with SMTP id j8mr889203anm.78.1360942747437; Fri, 15 Feb 2013 07:39:07 -0800 (PST) Received: from localhost.localdomain ([177.40.55.57]) by mx.google.com with ESMTPS id t8sm45500479anj.2.2013.02.15.07.39.05 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 07:39:06 -0800 (PST) From: Paulo Zanoni To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: don't add inferred modes for monitors that don't support them Date: Fri, 15 Feb 2013 13:36:27 -0200 Message-Id: <1360942587-3621-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni , stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni If bit 0 of the features byte (0x18) is set to 0, then, according to the EDID spec, "the display is non-continuous frequency (multi-mode) and is only specified to accept the video timing formats that are listed in Base EDID and certain Extension Blocks". For more information, please see the EDID spec, check the notes of the table that explains the "Feature Support" byte (18h) and also the notes on the tables of the section that explains "Display Range Limits & Additional Timing Description Definition (tag #FDh)". Cc: Adam Jackson Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45729 Signed-off-by: Paulo Zanoni Reviewed-by: Alex Deucher Reviewed-by: Adam Jackson --- drivers/gpu/drm/drm_edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I still need to ask some specific people to test the patch, but I believe it is correct. diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index a3a3b61..6a003b6 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2053,7 +2053,8 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid) num_modes += add_cvt_modes(connector, edid); num_modes += add_standard_modes(connector, edid); num_modes += add_established_modes(connector, edid); - num_modes += add_inferred_modes(connector, edid); + if (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF) + num_modes += add_inferred_modes(connector, edid); num_modes += add_cea_modes(connector, edid); if (quirks & (EDID_QUIRK_PREFER_LARGE_60 | EDID_QUIRK_PREFER_LARGE_75))