Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FA6DC433EF for ; Wed, 15 Dec 2021 12:44:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA87210EC7F; Wed, 15 Dec 2021 12:44:18 +0000 (UTC) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by gabe.freedesktop.org (Postfix) with ESMTPS id 345B910EC83 for ; Wed, 15 Dec 2021 12:44:17 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id A97FF2B00253; Wed, 15 Dec 2021 07:44:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 15 Dec 2021 07:44:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=UBzVExXLwZbr6 3h0rBiXF1lWi9Fdtzr7OpfW8dxvoVo=; b=XSTUgKnelwTBcq6xCS5PiBeVqITCs Uu/sH7OJDzCfm/I6J2gADCEP1eiAeJSOuQGmRh5OOJr4ohLvaJsmgZO2wJJ1Hyaf sRoa1CZoT/9/ArXDjJIcYGjBqJaTca8bIQy8t5GvGIZc502qeJQUpQzGhJqu9yRv gNNaNizI+zfuqLBzN5XZ1JkzXLJrxnE5gr2Ks1Bqlz8A3LnmAtUMdjhYZq4F6foQ 7lB8B4l9XIPvtQI0o9eK4zcCtaReCjNSixMhiuwecXxwu9wngASMC27W8n0pE13I s9g2aSpxfCOWfegel8B/OCMaCWaHhYGMEnfnnZuOg1yQQu9bvGW92G3Hw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=UBzVExXLwZbr63h0rBiXF1lWi9Fdtzr7OpfW8dxvoVo=; b=ce0GI8SH tv5pChYup6TIvy3GWEq7ax8xX5FkmbuZsjrn5vvs3h+w7+VY/WX7KNqzQU6ewAHo Ing4NibOF5fTE7mz3MhdSKsysg2sIy2cwSZF04CTj4hO8vRJb4Fhp+kURCWzRx/m OUsfsHM5tEyBvRusDu4e28qSozHGkDL+lndnp2AazlZRvRKIU7CLTNCxmuAmN6em KO407od9LdBbKpsbTkc9NnLAqhMIXXYjcN3Dy/ln7FtE+DhTSkHdNaQFMjzPfzU/ dJ2k7/e69XcWXt1bdk7YOIj7WhMposi+ecPow1rzeTofln6b4e4bJahQsKTvrjuF TeysY7vOhYTUgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrledvgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Dec 2021 07:44:14 -0500 (EST) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH v2 01/14] drm/edid: Don't clear YUV422 if using deep color Date: Wed, 15 Dec 2021 13:43:53 +0100 Message-Id: <20211215124406.340180-2-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211215124406.340180-1-maxime@cerno.tech> References: <20211215124406.340180-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Tim Gover , Dave Stevenson , dri-devel@lists.freedesktop.org, Werner Sembach , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The current code, when parsing the EDID Deep Color depths, that the YUV422 cannot be used, referring to the HDMI 1.3 Specification. This specification, in its section 6.2.4, indeed states: For each supported Deep Color mode, RGB 4:4:4 shall be supported and optionally YCBCR 4:4:4 may be supported. YCBCR 4:2:2 is not permitted for any Deep Color mode. This indeed can be interpreted like the code does, but the HDMI 1.4 specification further clarifies that statement in its section 6.2.4: For each supported Deep Color mode, RGB 4:4:4 shall be supported and optionally YCBCR 4:4:4 may be supported. YCBCR 4:2:2 is also 36-bit mode but does not require the further use of the Deep Color modes described in section 6.5.2 and 6.5.3. This means that, even though YUV422 can be used with 12 bit per color, it shouldn't be treated as a deep color mode. This deviates from the interpretation of the code and comment, so let's fix those. Fixes: d0c94692e0a3 ("drm/edid: Parse and handle HDMI deep color modes.") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_edid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 12893e7be89b..e57d1b8cdaaa 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -5106,10 +5106,9 @@ static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector, /* * Deep color support mandates RGB444 support for all video - * modes and forbids YCRCB422 support for all video modes per - * HDMI 1.3 spec. + * modes. */ - info->color_formats = DRM_COLOR_FORMAT_RGB444; + info->color_formats |= DRM_COLOR_FORMAT_RGB444; /* YCRCB444 is optional according to spec. */ if (hdmi[6] & DRM_EDID_HDMI_DC_Y444) { -- 2.33.1