From patchwork Fri Apr 21 15:05:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9693055 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 9FA3A601D4 for ; Fri, 21 Apr 2017 15:05:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87108285EE for ; Fri, 21 Apr 2017 15:05:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79CBD28627; Fri, 21 Apr 2017 15:05:46 +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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDE2628604 for ; Fri, 21 Apr 2017 15:05:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B66926E553; Fri, 21 Apr 2017 15:05:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 393CC6E553 for ; Fri, 21 Apr 2017 15:05:42 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id w50so7884371wrc.0 for ; Fri, 21 Apr 2017 08:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=L9YSpi4u9mY9OjbneE7DwLHgl2ymFE3U+l1T5vaBPQw=; b=Fqj2EYKRuLP0WfM+Zt9u3yGpYepuGod1KwXEY+lqFP8S/hLXujekr1EZhag7NcSuC1 4pOfiucmOz0dTpawIBNZbv5yg7KhD3untyJ/hVm71kc7v06Ffy2Z0vO6sO47oCaCFkgr ZsMnm8LfAbQgi4FYTdueHr8JCwHBEkyXG3/3mif3SUlb2ak8DkCxdFgJ4aHZJIPPzpLS WTExTXAR2ufxk7zGr2pi32cv5a2/WdmgPTyQ2Iv//qbh48352UPrhSDBqzIkpN2SxIv+ Zl6X79vHMCIrv9HSM62KcwUnSJc3HSdHv94xJto8jUq+radNfRiT3yLSviMtlEhdYxTU ZI4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=L9YSpi4u9mY9OjbneE7DwLHgl2ymFE3U+l1T5vaBPQw=; b=maped5wOVZ050sHRFeGSbWTbbvQC8TZ+8zXYCE4sStKMo3pXr7HCeettTgYXS1UPMO rxEhM/SOAL8RimvRr+SK7Qj4n3tOmOmfHAl2n+awL0Yp4kt1opG5TK6mfhuQ2isDZ78R 5HU4ts7gtCfVKn8IlQk2TyR0XWi3VUbw/9ABZ5BhcfRSghQU5DLFaSbjvg4nCIFdDCME Ou5AIhrW6H5sNMXlO0FpnSWjoSFaTWFtHcgOuvhrMOdi72GXWeZ0omWFG5aKQRNKV5Ke JQeWcCChkEX7uw7pjXjwbwNkjiYM7ETHFI9yIDIAY84jJGmUK1PaOi6F9aYCmzZGySpw KRkw== X-Gm-Message-State: AN3rC/61+QSEcIWiL5UG+f0efUw+nlFhbabZf8kT0EALb1jlwICDkSiG gsLH8UOmSWqzMg== X-Received: by 10.223.172.228 with SMTP id o91mr12804944wrc.122.1492787140751; Fri, 21 Apr 2017 08:05:40 -0700 (PDT) Received: from twisty.localdomain (x590c7df0.dyn.telefonica.de. [89.12.125.240]) by smtp.gmail.com with ESMTPSA id t21sm463417edh.5.2017.04.21.08.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Apr 2017 08:05:39 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 Date: Fri, 21 Apr 2017 17:05:08 +0200 Message-Id: <1492787108-23959-1-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 Cc: 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The builtin eDP panel in the HP zBook 17 G2 supports 10 bpc, as advertised by the Laptops product specs and verified via injecting a fixed edid + photometer measurements, but edid reports unknown depth, so drivers fall back to 6 bpc. Add a quirk to get the full 10 bpc. Cc: stable@vger.kernel.org Signed-off-by: Mario Kleiner Acked-by: Harry Wentland --- 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 fad3d44..2e55599 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -80,6 +80,8 @@ #define EDID_QUIRK_FORCE_12BPC (1 << 9) /* Force 6bpc */ #define EDID_QUIRK_FORCE_6BPC (1 << 10) +/* Force 10bpc */ +#define EDID_QUIRK_FORCE_10BPC (1 << 11) struct detailed_mode_closure { struct drm_connector *connector; @@ -122,6 +124,9 @@ static const struct edid_quirk { { "FCM", 13600, EDID_QUIRK_PREFER_LARGE_75 | EDID_QUIRK_DETAILED_IN_CM }, + /* LGD panel of HP zBook 17 G2, eDP 10 bpc, but reports unknown bpc */ + { "LGD", 764, EDID_QUIRK_FORCE_10BPC }, + /* LG Philips LCD LP154W01-A5 */ { "LPL", 0, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE }, { "LPL", 0x2a00, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE }, @@ -4244,6 +4249,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid) if (quirks & EDID_QUIRK_FORCE_8BPC) connector->display_info.bpc = 8; + if (quirks & EDID_QUIRK_FORCE_10BPC) + connector->display_info.bpc = 10; + if (quirks & EDID_QUIRK_FORCE_12BPC) connector->display_info.bpc = 12;