From patchwork Wed Jul 6 10:05:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9216015 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 12CB960752 for ; Wed, 6 Jul 2016 10:06:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 040AD287CB for ; Wed, 6 Jul 2016 10:06:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED1C8287EB; Wed, 6 Jul 2016 10:06:29 +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 9CE85287CB for ; Wed, 6 Jul 2016 10:06:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BEF36E5FB; Wed, 6 Jul 2016 10:06:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B9FD6E5FB for ; Wed, 6 Jul 2016 10:06:25 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id r201so34459651wme.0 for ; Wed, 06 Jul 2016 03:06: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=GEadNcZh3lIn59yrB81+iCtlRNZNqBGYrkRqddVEZeM=; b=cCcxQzbxbCNLp895hNUCZtuU7uLomBly7Wj8eSl3teVGXpQCwJV7hi2RrF255EVLrY /ZnlRS3Gp5ITsHhRjHqCT91ppPLnJSmbodPlKAiSG9ErbwUOSo0vkwwZnStg61389TnK xFo8C676uoeeH8lCT2dAv53vtarVAeuvinGDYi6zXnH5OSWKemXtPaL3z2A8/bnRprze 58vYJNQ4s22btH8XDQPjtJjj4IYhvhUDK9ITLKlYYH9c6idIAhWFtposRXbCd2nYu8U2 ztWmC85xzoGdkVUDhP25VjFb8QMVZxoIbyItr2v1nXEQtwcoryEIntCGJZQQcIA78urf qVWg== 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=VnLa0Fmngt4SW2RzaCz00zbZgEGLS10kN+SqEdnXcaXNlsRGX7jKAS2GCqT8YwPY9Z pItSiQ+gtGIVNczpwCuuHEjLNxzZu/ERfcv37caMT8IDzMQ9tKrXwgbRjK9pS+lN0qfi ux5hm+GcZzaj+6d1bAH4WuEi3yUtgxDDdRplsWT4mYBzWSUMJqirl/tbseMWzTmtGjBB cLERtElgAC2f9WJ6OodImlIrVQZ5n4fRk/0rcL8Mk9w5tF+bI8tqrY260nRLehg55b7X 4CYjorB/gK1cKAfrGPYEQmvF0yY3zNxNPD9nnsS4AIkKT5Sq6f8PSLMcgCM0QsTB4Fhx aAbQ== X-Gm-Message-State: ALyK8tI3eJEFkjTYa23KneglDdVoamO5Tjjd0TZ4OLdyrUADU1CKyNRfVX7pEBhzMOsjBQ== X-Received: by 10.28.213.145 with SMTP id m139mr15957861wmg.81.1467799583808; Wed, 06 Jul 2016 03:06:23 -0700 (PDT) Received: from twisty.fritz.box (x4d02cd4b.dyn.telefonica.de. [77.2.205.75]) by smtp.gmail.com with ESMTPSA id ze10sm2261276wjb.2.2016.07.06.03.06.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 03:06:22 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/5] drm/edid: Add 6 bpc quirk for display AEO model 0. Date: Wed, 6 Jul 2016 12:05:44 +0200 Message-Id: <1467799548-13229-2-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467799548-13229-1-git-send-email-mario.kleiner.de@gmail.com> References: <1467799548-13229-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;