From patchwork Sun Mar 27 23:52:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 8677531 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 164879F36E for ; Sun, 27 Mar 2016 23:53:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 301262021F for ; Sun, 27 Mar 2016 23:53:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 55EBA20218 for ; Sun, 27 Mar 2016 23:53:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FD776E2E7; Sun, 27 Mar 2016 23:53:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F55A6E2E7 for ; Sun, 27 Mar 2016 23:53:25 +0000 (UTC) Received: by mail-wm0-x230.google.com with SMTP id p65so82260289wmp.1 for ; Sun, 27 Mar 2016 16:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lLvnjYGKqwDQwu3IKhnRDFutoZ+SOc/R0fi17gC/sHs=; b=Jk6bb6X+HhfEXTaE6YyuhiLdiImj3Iq6cKXZRrSIZaKcsvGEj9RamLsynSROb8k4MY N2NDc/+DUdSHWdQQIakJEVKYQN2atOZ4Ze7aV5/2qRlfw5trgW8Lk6hpHh0VHycFSpoL Z8bEStMwMO2cDO5Acc5Vck4O9X7Kfz7nlHZ8RJkotYnaQgpwLuofFXaKVIb2UgrXyny7 DY7c3qtOOEfLJ/ZVRZqEVtqH/GITNLG0KmS5TSNjBqNhVYSpjhOAutgEvhoj9jdKnFcO HTTtIB3qrXugvgV5fyzyr4eoswNKaeajIeKnrPPuZvxSHH6357p9XQLrWgXsCeaKmU0n ktQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lLvnjYGKqwDQwu3IKhnRDFutoZ+SOc/R0fi17gC/sHs=; b=JXDaSU8qo+jqJ/CT2CAS7V1PltciYMZ3JQjac7dmXhqn0piBdzia8Y7E/fkp2PTEF/ FFbYhn7loJUEbkFy+ZvFecOllzq30Z+6Xq/qR5w0VOB6qIZPoiB5dPOjeimZdOqinRuo kA7m5LYMfSAydRosDEaS9JFNv/eTMIGtXH/X4+zsacPOehzuvl1/XdS0Hc1tb7yBOj95 0NTnyYawAqNO8yu9fNzugra6WnIm1rAAjWtqs388HJB60uST2gxIQTcRWyAtWeKzR7NE y/38VwKRSQ0Wq/LO5lfHIHZ296CSh0kkCWIuXVDk/yIqutD8qNeGkvzn355PdelUWkiX 6pAw== X-Gm-Message-State: AD7BkJJRtKOKOKN0FXaqqXIKoJ1SrzB75sBUIEC98ge9OZVvTuZyHIkT0XLN5s8r0Eo8DQ== X-Received: by 10.194.77.193 with SMTP id u1mr25659018wjw.73.1459122803317; Sun, 27 Mar 2016 16:53:23 -0700 (PDT) Received: from twisty.cin.medizin.uni-tuebingen.de (cin-11.medizin.uni-tuebingen.de. [134.2.118.242]) by smtp.gmail.com with ESMTPSA id o16sm22327412wjr.9.2016.03.27.16.53.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Mar 2016 16:53:22 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/edid: Add 6 bpc quirk for display AEO model 0. Date: Mon, 28 Mar 2016 01:52:47 +0200 Message-Id: <1459122767-13314-4-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459122767-13314-1-git-send-email-mario.kleiner.de@gmail.com> References: <1459122767-13314-1-git-send-email-mario.kleiner.de@gmail.com> MIME-Version: 1.0 Cc: Jani Nikula , Daniel Vetter , stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=105331 reports that the "AEO model 0" display is driven with 8 bpc without dithering by default, which looks bad because that panel is apparently a 6 bpc panel. A fix for this was made by commit 013dd9e03872 ("drm/i915/dp: fall back to 18 bpp when sink capability is unknown"). However, that commit, while correct in itself, as a side effect triggers new regressions in precision for DisplayPort->DVI and DP->VGA displays. Patches are out to fix those regressions, but they will revert video output for the AEO model 0 panel to 8 bpc without dithering. The EDID 1.3 of that panel, as decoded from the xrandr output attached to that bugzilla bug report, is somewhat faulty, and beyond other problems also sets the "DFP 1.x compliant TMDS" bit, which according to DFP spec means to drive the panel with 8 bpc and no dithering in absence of other colorimetry information. Try to make the original bug reporter happy despite the faulty EDID by adding a quirk to mark that panel as 6 bpc, so 6 bpc output with dithering creates a nice picture. As the original patch was backported to stable and the fixes for regressions caused by that patch are aimed at stable, this patch should also go to stable to make everybody happy again. Signed-off-by: Mario Kleiner Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Cc: stable@vger.kernel.org --- drivers/gpu/drm/drm_edid.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index ff28815..7d10537 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -74,6 +74,8 @@ #define EDID_QUIRK_FORCE_8BPC (1 << 8) /* Force 12bpc */ #define EDID_QUIRK_FORCE_12BPC (1 << 9) +/* Force 6bpc */ +#define EDID_QUIRK_FORCE_6BPC (1 << 10) struct detailed_mode_closure { struct drm_connector *connector; @@ -100,6 +102,9 @@ static struct edid_quirk { /* Unknown Acer */ { "ACR", 2423, EDID_QUIRK_FIRST_DETAILED_PREFERRED }, + /* AEO model 0 reports 8 bpc, but is a 6 bpc panel */ + { "AEO", 0, EDID_QUIRK_FORCE_6BPC }, + /* Belinea 10 15 55 */ { "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 }, { "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 }, @@ -3950,6 +3955,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid) drm_add_display_info(edid, &connector->display_info, connector); + if (quirks & EDID_QUIRK_FORCE_6BPC) + connector->display_info.bpc = 6; + if (quirks & EDID_QUIRK_FORCE_8BPC) connector->display_info.bpc = 8;