From patchwork Fri May 6 17:43:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9034991 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 9FCBD9F30C for ; Fri, 6 May 2016 17:43:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 956C5203A4 for ; Fri, 6 May 2016 17:43:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B41A120392 for ; Fri, 6 May 2016 17:43:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 162316EB1F; Fri, 6 May 2016 17:43:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) by gabe.freedesktop.org (Postfix) with ESMTPS id F261A6EB20 for ; Fri, 6 May 2016 17:43:09 +0000 (UTC) Received: by mail-wm0-x236.google.com with SMTP id g17so89137719wme.1 for ; Fri, 06 May 2016 10:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=8M9GGtqoRbFmZdPDqpN1gPzrqRXiRqG2rl3Xw9krFZ4=; b=D/4AGMwOlsEy19pUhgXzole1fBF5/wzuUKw7+/xvimE03SvzNAhiYHjtJjESii8dFc o8X4z/sTbsOwZYuM6ErgFMcvw4Oy25Eg3zpl3IYU+FfjGhi7ShdUF9P2yrlwWfdgD+xe 0r1dHmWlOBpBtlc7e25dN7IlM7LTZQYopetaaBWguDEXFoA063t5Mm6WBedceyT2+Z1C z0LGDZQ9BsPRUpjt46MJyNNc0BbpqQIX7oXlVRtP9Fh6W90EodP/xvsHuJo4bQOvZd7l 2qig1Y6fvkovDjDH9D9SZplBfDQqlOHD6OaYNf+9veSUvPUOCx7byYxLyBWkewIs5Yii 6sKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=8M9GGtqoRbFmZdPDqpN1gPzrqRXiRqG2rl3Xw9krFZ4=; b=gjLo2u4HQ2dVduzWQlI294N5iaKbsZJPl1Ea8CYGMQRnKRHc4UjMOdgKWrLdjY74K3 LyME/cmHKKtjqgFDbzc1cfXfu3F7ls78JOA8IS2ae5jO+a6sYa0enuvMQlFsVQAYk7ze xNvxKoya2XjqC0gTNF5BspQyHnGWgCV3u59rLWruYAfZrwZfIsuW4bvjK1ImU6EoT2J1 0BLr3qtPUJEnJzYXCsvIiMPigTVotDyG8g86CG7KMLTc1mISTGKlwFHkIIA7K/mF6f3r 0xd/UlYWW+DG+snhLXOIBdK6b8TVJmqa1481Qi88OPw3MipYFUXOmq33QVI2N42XMVIF o+Jw== X-Gm-Message-State: AOPr4FVReTnhiXVjFNIfaPDhLKqIYWm+7R2aZ438pSjNdcgmXjwrBYk8MVkCAra+hhZPVA== X-Received: by 10.28.157.202 with SMTP id g193mr11401931wme.46.1462556588643; Fri, 06 May 2016 10:43:08 -0700 (PDT) Received: from [172.25.199.14] (cin-11.medizin.uni-tuebingen.de. [134.2.118.242]) by smtp.gmail.com with ESMTPSA id vu4sm16035734wjc.27.2016.05.06.10.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 May 2016 10:43:07 -0700 (PDT) Subject: Fwd: [PATCH 3/3] drm/edid: Add 6 bpc quirk for display AEO model 0. References: <1459122767-13314-4-git-send-email-mario.kleiner.de@gmail.com> To: Jani Nikula , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter , "dri-devel@lists.freedesktop.org" From: Mario Kleiner X-Forwarded-Message-Id: <1459122767-13314-4-git-send-email-mario.kleiner.de@gmail.com> Message-ID: <572CD7AA.30101@gmail.com> Date: Fri, 6 May 2016 19:43:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1459122767-13314-4-git-send-email-mario.kleiner.de@gmail.com> 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=-6.2 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=ham 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 -------- Forwarded Message -------- Subject: [PATCH 3/3] drm/edid: Add 6 bpc quirk for display AEO model 0. Date: Mon, 28 Mar 2016 01:52:47 +0200 From: Mario Kleiner To: dri-devel@lists.freedesktop.org CC: mario.kleiner.de@gmail.com, Jani Nikula , Ville Syrjälä , Daniel Vetter , stable@vger.kernel.org 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;