From patchwork Thu May 26 14:39:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9137041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1A796075C for ; Thu, 26 May 2016 14:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D609828066 for ; Thu, 26 May 2016 14:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA482281D4; Thu, 26 May 2016 14:39:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B28828066 for ; Thu, 26 May 2016 14:39:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D91E96E3D3; Thu, 26 May 2016 14:39:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 24F586E3D3 for ; Thu, 26 May 2016 14:39:42 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id a136so6068030wme.0 for ; Thu, 26 May 2016 07:39:42 -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=GEadNcZh3lIn59yrB81+iCtlRNZNqBGYrkRqddVEZeM=; b=T0pBDlmLB8pGAp/iqnCDy2MlRYBKGv1wNY6wBpjLucsiY8TW6b/zIjvVRHn3QGKE9D G9HXiOf3plP3fyQetwYIZcc/um/WA/4h1twaF+HDGc7FAJ+6fzCcFasI1j/Bmek4J0c8 2t4Eo0m4kdDxF5uxQ1yu9h6NDMVOXhH3jepPb9b1ZzHosmOF7D1cmuiK1oc6DRSNcBXg 1sMTfqWLE00Yw7agxV8Wtw8EwY6HsGAaoBjIkXp35/tr+R6UjSYq8niMkdLhySJDa8qj 5ao6Nf/2rT8nFTCKXWa0i1NOYcu+IJUH4XzXX5HZeK2j82JHGA3GxchqAcuAZmfGDjVA GZlw== 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=GEadNcZh3lIn59yrB81+iCtlRNZNqBGYrkRqddVEZeM=; b=QGlXvjt/6rDcfKVYO/R3NHiO/ZCNHcpI29q20i8d+b+Cb9wLwgkl4nbBEFFpNFIc4l HrYXrZDOB1la0hqSuYKFuZ66EKcprOp5x0l+hVxnGkkqq6Qu4xsfYpz5+UwQzJUNCJWJ bUEQSt0Djc2hyQOe1cihBCPqebXyKQ6m2iFyWcp/e6CP1PqL5jbFgi78qW5pUpUHBsww SWb13hAWjha8grnYgZBEMV2oErj3ZhgO4+jTWLzCDG5MS/TrWCwl1ilySS0QA1xgJmnc nqov63sHtjEsiWePTe3hFgEryp+SFsrAuXx8v8X53r9isVEUnhRV2IHSuZ1tZ8lqnBD7 Qjog== X-Gm-Message-State: ALyK8tIp08kVERJPUVHpfEVIjjxHrkWQooSCvjVPTLxxVTXG1Vt2tGtPVqyvFhgDG9ektw== X-Received: by 10.28.227.138 with SMTP id a132mr3956764wmh.35.1464273580300; Thu, 26 May 2016 07:39:40 -0700 (PDT) Received: from twisty.fritz.box (x5f719531.dyn.telefonica.de. [95.113.149.49]) by smtp.gmail.com with ESMTPSA id a128sm3853849wme.16.2016.05.26.07.39.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 07:39:39 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/edid: Add 6 bpc quirk for display AEO model 0. Date: Thu, 26 May 2016 16:39:04 +0200 Message-Id: <1464273544-23834-3-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1464273544-23834-1-git-send-email-mario.kleiner.de@gmail.com> References: <1464273544-23834-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-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 DP panel with faulty EDID. A fix for this was made by commit 013dd9e03872 ("drm/i915/dp: fall back to 18 bpp when sink capability is unknown"). That commit triggers new regressions in precision for DP->DVI and DP->VGA displays. A patch is out to revert that commit, but it 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. Tested by injecting the edid from the fdo bug into a DP connector via drm_kms_helper.edid_firmware and verifying the 6 bpc + dithering is selected. This patch should be backported to stable. Signed-off-by: Mario Kleiner Cc: stable@vger.kernel.org Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter --- 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 7df26d4..2cb472b 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 }, @@ -4082,6 +4087,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;