From patchwork Wed Jul 6 10:05:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9216023 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 9C95460752 for ; Wed, 6 Jul 2016 10:06:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E43F287CB for ; Wed, 6 Jul 2016 10:06:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8311B287EB; Wed, 6 Jul 2016 10:06:37 +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 3EA6C287CB for ; Wed, 6 Jul 2016 10:06:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52E7A6E618; Wed, 6 Jul 2016 10:06:36 +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 72FB76E614 for ; Wed, 6 Jul 2016 10:06:34 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id a66so34471247wme.2 for ; Wed, 06 Jul 2016 03:06:34 -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=QggJDrfAbjMoFS3BiwJ5dxmMkV864Y1eNAaftwTCGxU=; b=VDRcjS4uR8o6xAi1xbOcH51W81mVfWbfqv2Wy66MA+AAotbHXCT2yAi1u7otsk8icX aFeELzW/uT2FSUgajZMicYh5eIkOSpktw0jkTlXJtyUiUqlQi7RlbKWw5xeJ/CBfNpIb F8k7tXtE7f23r+RRFqNMXMKza+a31Y1TkL3Gqaa06wL3zMQ+9gRxKdRQ5jofp5A0kBem /ByQPtcZzoAsiJ4evM4qLo+4BaqR5DbHUEZRi0v/6QAfYN61ZMgsYVpOYulN2ourG78g KeYJPBHlreXtyd5k8Ict1EDnio6yii+s+GlBnnKPzXdhSO7j/dii6SRR7xdeoJOle6q9 tudA== 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=QggJDrfAbjMoFS3BiwJ5dxmMkV864Y1eNAaftwTCGxU=; b=l/RtnO0p87PI7xXQs30xGejtFdoYqQLAAmu4D4TLES2z/dkdIB0UQcpEZ7mb8WYWPA FCLFgLm34uOk/q85EDEJFVzXgknurpE2ah+I2CPebgH59hY+BHtOk9w0lU8XjF/4lSNb qOvQ+ALP006bOCPfYr4WTpdSlhOqDNNYe7bq2KoBtBQnv44zg4Yo4PH+dK5n+11JfyKT revUMcKDT4+5LPD88Lr/1pjUCucgP7OAn0Fe9sa6GKH+FxI6CwJt7Yn9aD92tbbxkgoI 3YCO74eyFxK20i9COcTaM/Chu4yTarlcy5xHvJlX0ThX1zd6xDNyU0eIBth5lviM/1on ZIbg== X-Gm-Message-State: ALyK8tLnKv27bGt+o9TikQiJ8y2tkpv36fSS8ZddFyk2X5T+oilEhjLbP9r1dMFAK5+Fgw== X-Received: by 10.194.0.4 with SMTP id 4mr12700374wja.127.1467799593006; Wed, 06 Jul 2016 03:06:33 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 03:06:32 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm/edid: Set 8 bpc color depth for displays with "DFP 1.x compliant TMDS". Date: Wed, 6 Jul 2016 12:05:48 +0200 Message-Id: <1467799548-13229-6-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 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 According to E-EDID spec 1.3, table 3.9, a digital video sink with the "DFP 1.x compliant TMDS" bit set is "signal compatible with VESA DFP 1.x TMDS CRGB, 1 pixel / clock, up to 8 bits / color MSB aligned". For such displays, the DFP spec 1.0, section 3.10 "EDID support" says: "If the DFP monitor only supports EDID 1.X (1.1, 1.2, etc.) without extensions, the host will make the following assumptions: 1. 24-bit MSB-aligned RGB TFT 2. DE polarity is active high 3. H and V syncs are active high 4. Established CRT timings will be used 5. Dithering will not be enabled on the host" So if we don't know the bit depth of the display from additional colorimetry info we should assume 8 bpc / 24 bpp by default. This patch adds info->bpc = 8 assignement for that case. Signed-off-by: Mario Kleiner Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter --- drivers/gpu/drm/drm_edid.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 2cb472b..637a0aa 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -3867,6 +3867,20 @@ static void drm_add_display_info(struct edid *edid, /* HDMI deep color modes supported? Assign to info, if so */ drm_assign_hdmi_deep_color_info(edid, info, connector); + /* + * Digital sink with "DFP 1.x compliant TMDS" according to EDID 1.3? + * + * For such displays, the DFP spec 1.0, section 3.10 "EDID support" + * tells us to assume 8 bpc color depth if the EDID doesn't have + * extensions which tell otherwise. + */ + if ((info->bpc == 0) && (edid->revision < 4) && + (edid->input & DRM_EDID_DIGITAL_TYPE_DVI)) { + info->bpc = 8; + DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n", + connector->name, info->bpc); + } + /* Only defined for 1.4 with digital displays */ if (edid->revision < 4) return;