From mboxrd@z Thu Jan 1 00:00:00 1970 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 E07F1C433EF for ; Mon, 7 Feb 2022 18:44:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC54210F9C8; Mon, 7 Feb 2022 18:44:18 +0000 (UTC) X-Greylist: delayed 316 seconds by postgrey-1.36 at gabe; Mon, 07 Feb 2022 16:40:49 UTC Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF8ED10E15E for ; Mon, 7 Feb 2022 16:40:49 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 5C5CE5801D7; Mon, 7 Feb 2022 11:35:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 07 Feb 2022 11:35:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=Wpd1pV4OsjXu8K McYu4OFX/LXZsN9ht6MuXhmtDiIss=; b=G3gXMr3hhK3OOVvFZPTeerAsvAvUCu kMSa5zdkFOj9aaeOhzi60jweTJmoCykNAaiHfw7fulEF220dv5rJCVNTJYnndgPd QbfU/GHkFdq/SqHGhQm0+L9eg66SmI2459Frurycm7dhpbibcQNIneGPGPB9AHU/ mWW7pIvowLPNfLJhiMeel8NoWeGeTnkny2CrN0CDSizPcKCX2fMHI4tbTNfrGX4L tfLfqc484vOsdjj+mmEZcuJHDI5cA1rnUsnmBE98ej4LJo0oo2dJeafDAmGqieNg Cm+cpLceW3op0q2nGLHfhjGJpxIeS2tWMgI+Wtznl1huSaDjbEy521gA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Wpd1pV4OsjXu8KMcYu4OFX/LXZsN9ht6MuXhmtDiI ss=; b=hd++mgzAKPZOLRfy1uneFgd6GEK9UpS28tHfJsl4slEo5OJ3Lvz9cCWQt HNZzfpOoAYPH5bYUHU6Vhn1Skmdyl2HvFIQR0Phl8LN/QPTx5PuK2un4NOPMhU2Y OVBtMK2NclveoGfX520xZ/3Q/RSg/ik+KksqhBaj36XSFmxeMMjUh6eRYUl5Nnl8 vOwEHUs1A31ibgErbeYSYg5aLw5dYS8RLyXQ2uXl3hcS6oBxdlTFXabE/KHb5a1X nJzKfRKlBE4HhPKjgBv7fxEVxI6r/7Sz5oPbUhh7sPId+Z1Gl5VW1aPPaXxDePI7 +lIfzAAA30eUw5rFo8P1zyIW01IXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepjeeugfegkeffgfeuvedtvddufffhjeffjeejvddvudduteehhfefhfefgeei keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35:32 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Subject: [PATCH 05/23] drm/amd/display: Fix color encoding mismatch Date: Mon, 7 Feb 2022 17:34:57 +0100 Message-Id: <20220207163515.1038648-6-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 07 Feb 2022 18:44:17 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx@lists.freedesktop.org, Dom Cobley , Tim Gover , Dave Stevenson , Leo Li , Rodrigo Siqueira , "Pan, Xinhui" , Maarten Lankhorst , dri-devel@lists.freedesktop.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Maxime Ripard , Thomas Zimmermann , Alex Deucher , Harry Wentland , Phil Elwell Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" The amdgpu KMS driver calls drm_plane_create_color_properties() with a default encoding set to BT709. However, the core will ignore it and the driver doesn't force it in its plane state reset hook, so the initial value will be 0, which represents BT601. Fix the mismatch by using an initial value of BT601 in drm_plane_create_color_properties(). Cc: amd-gfx@lists.freedesktop.org Cc: Alex Deucher Cc: "Christian König" Cc: Harry Wentland Cc: Leo Li Cc: "Pan, Xinhui" Cc: Rodrigo Siqueira Signed-off-by: Maxime Ripard --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index feccf2b555d2..86b27a355e90 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -7914,7 +7914,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, BIT(DRM_COLOR_YCBCR_BT2020), BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE), - DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE); + DRM_COLOR_YCBCR_BT601, DRM_COLOR_YCBCR_LIMITED_RANGE); } supported_rotations = -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 2A2C5C433F5 for ; Mon, 7 Feb 2022 16:35:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0444C10E964; Mon, 7 Feb 2022 16:35:36 +0000 (UTC) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04CA010E311 for ; Mon, 7 Feb 2022 16:35:34 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 5C5CE5801D7; Mon, 7 Feb 2022 11:35:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 07 Feb 2022 11:35:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=Wpd1pV4OsjXu8K McYu4OFX/LXZsN9ht6MuXhmtDiIss=; b=G3gXMr3hhK3OOVvFZPTeerAsvAvUCu kMSa5zdkFOj9aaeOhzi60jweTJmoCykNAaiHfw7fulEF220dv5rJCVNTJYnndgPd QbfU/GHkFdq/SqHGhQm0+L9eg66SmI2459Frurycm7dhpbibcQNIneGPGPB9AHU/ mWW7pIvowLPNfLJhiMeel8NoWeGeTnkny2CrN0CDSizPcKCX2fMHI4tbTNfrGX4L tfLfqc484vOsdjj+mmEZcuJHDI5cA1rnUsnmBE98ej4LJo0oo2dJeafDAmGqieNg Cm+cpLceW3op0q2nGLHfhjGJpxIeS2tWMgI+Wtznl1huSaDjbEy521gA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Wpd1pV4OsjXu8KMcYu4OFX/LXZsN9ht6MuXhmtDiI ss=; b=hd++mgzAKPZOLRfy1uneFgd6GEK9UpS28tHfJsl4slEo5OJ3Lvz9cCWQt HNZzfpOoAYPH5bYUHU6Vhn1Skmdyl2HvFIQR0Phl8LN/QPTx5PuK2un4NOPMhU2Y OVBtMK2NclveoGfX520xZ/3Q/RSg/ik+KksqhBaj36XSFmxeMMjUh6eRYUl5Nnl8 vOwEHUs1A31ibgErbeYSYg5aLw5dYS8RLyXQ2uXl3hcS6oBxdlTFXabE/KHb5a1X nJzKfRKlBE4HhPKjgBv7fxEVxI6r/7Sz5oPbUhh7sPId+Z1Gl5VW1aPPaXxDePI7 +lIfzAAA30eUw5rFo8P1zyIW01IXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepjeeugfegkeffgfeuvedtvddufffhjeffjeejvddvudduteehhfefhfefgeei keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35:32 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Subject: [PATCH 05/23] drm/amd/display: Fix color encoding mismatch Date: Mon, 7 Feb 2022 17:34:57 +0100 Message-Id: <20220207163515.1038648-6-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: amd-gfx@lists.freedesktop.org, Dom Cobley , Tim Gover , Dave Stevenson , Leo Li , Rodrigo Siqueira , "Pan, Xinhui" , dri-devel@lists.freedesktop.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Maxime Ripard , Thomas Zimmermann , Alex Deucher , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The amdgpu KMS driver calls drm_plane_create_color_properties() with a default encoding set to BT709. However, the core will ignore it and the driver doesn't force it in its plane state reset hook, so the initial value will be 0, which represents BT601. Fix the mismatch by using an initial value of BT601 in drm_plane_create_color_properties(). Cc: amd-gfx@lists.freedesktop.org Cc: Alex Deucher Cc: "Christian König" Cc: Harry Wentland Cc: Leo Li Cc: "Pan, Xinhui" Cc: Rodrigo Siqueira Signed-off-by: Maxime Ripard --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index feccf2b555d2..86b27a355e90 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -7914,7 +7914,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, BIT(DRM_COLOR_YCBCR_BT2020), BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE), - DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE); + DRM_COLOR_YCBCR_BT601, DRM_COLOR_YCBCR_LIMITED_RANGE); } supported_rotations = -- 2.34.1