All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Maxime Ripard <maxime@cerno.tech>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: "Dom Cobley" <dom@raspberrypi.com>,
	"Tim Gover" <tim.gover@raspberrypi.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Phil Elwell" <phil@raspberrypi.com>,
	amd-gfx@lists.freedesktop.org,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 05/23] drm/amd/display: Fix color encoding mismatch
Date: Mon, 7 Feb 2022 13:59:38 -0500	[thread overview]
Message-ID: <3a9f5ff6-52fd-25f5-2714-8801eba13dab@amd.com> (raw)
In-Reply-To: <8aa30074-6039-ba5c-c25d-38a0c2f52619@amd.com>



On 2022-02-07 13:57, Harry Wentland wrote:
> On 2022-02-07 11:34, Maxime Ripard wrote:
>> 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.
>>
> 
> Isn't this a core issue? Should __drm_atomic_helper_plane_state_reset
> reset all plane_state members to their properties' default values?
> 

Ah, looks like that's exactly what you do in the later patches, which is
perfect. With that, I don't think you'll need this patch anymore.

Harry

> The amdgpu KMS driver currently doesn't respect the color_encoding
> property but I would expect that a call to drm_plane_create_color_properties
> with a default of BT709 means we're getting BT709 as color_encoding 
> as part of atomic commits.
> 
> Harry
> 
>> 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 <alexander.deucher@amd.com>
>> Cc: "Christian König" <christian.koenig@amd.com>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Leo Li <sunpeng.li@amd.com>
>> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
>> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>> ---
>>  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 =
> 


WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: Maxime Ripard <maxime@cerno.tech>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: "Dom Cobley" <dom@raspberrypi.com>,
	"Tim Gover" <tim.gover@raspberrypi.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Leo Li" <sunpeng.li@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Phil Elwell" <phil@raspberrypi.com>,
	amd-gfx@lists.freedesktop.org,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 05/23] drm/amd/display: Fix color encoding mismatch
Date: Mon, 7 Feb 2022 13:59:38 -0500	[thread overview]
Message-ID: <3a9f5ff6-52fd-25f5-2714-8801eba13dab@amd.com> (raw)
In-Reply-To: <8aa30074-6039-ba5c-c25d-38a0c2f52619@amd.com>



On 2022-02-07 13:57, Harry Wentland wrote:
> On 2022-02-07 11:34, Maxime Ripard wrote:
>> 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.
>>
> 
> Isn't this a core issue? Should __drm_atomic_helper_plane_state_reset
> reset all plane_state members to their properties' default values?
> 

Ah, looks like that's exactly what you do in the later patches, which is
perfect. With that, I don't think you'll need this patch anymore.

Harry

> The amdgpu KMS driver currently doesn't respect the color_encoding
> property but I would expect that a call to drm_plane_create_color_properties
> with a default of BT709 means we're getting BT709 as color_encoding 
> as part of atomic commits.
> 
> Harry
> 
>> 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 <alexander.deucher@amd.com>
>> Cc: "Christian König" <christian.koenig@amd.com>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Leo Li <sunpeng.li@amd.com>
>> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
>> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>> ---
>>  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 =
> 


  reply	other threads:[~2022-02-07 18:59 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 16:34 [PATCH 00/23] drm: Fill in default values for plane properties Maxime Ripard
2022-02-07 16:34 ` [PATCH 01/23] drm/komeda: plane: switch to plane reset helper Maxime Ripard
2022-02-07 16:34 ` [PATCH 02/23] drm/tegra: " Maxime Ripard
2022-02-07 16:34   ` Maxime Ripard
2022-02-07 16:34 ` [PATCH 03/23] drm/tegra: hub: Fix zpos initial value mismatch Maxime Ripard
2022-02-07 16:34   ` Maxime Ripard
2022-02-07 16:34 ` [PATCH 04/23] drm/msm/mdp5: " Maxime Ripard
2022-02-07 16:34   ` Maxime Ripard
2022-02-07 19:27   ` Dmitry Baryshkov
2022-02-07 19:27     ` Dmitry Baryshkov
2022-02-10  8:43     ` Maxime Ripard
2022-02-10  8:43       ` Maxime Ripard
2022-02-07 16:34 ` [PATCH 05/23] drm/amd/display: Fix color encoding mismatch Maxime Ripard
2022-02-07 16:34   ` Maxime Ripard
2022-02-07 18:57   ` Harry Wentland
2022-02-07 18:57     ` Harry Wentland
2022-02-07 18:59     ` Harry Wentland [this message]
2022-02-07 18:59       ` Harry Wentland
2022-02-10  8:42       ` Maxime Ripard
2022-02-10  8:42         ` Maxime Ripard
2022-02-10 14:38         ` Harry Wentland
2022-02-10 14:38           ` Harry Wentland
2022-02-17 16:14           ` Maxime Ripard
2022-02-17 16:14             ` Maxime Ripard
2022-02-07 16:34 ` [PATCH 06/23] drm/object: Add drm_object_property_get_default_value() function Maxime Ripard
2022-02-07 22:04   ` Laurent Pinchart
2022-02-07 16:34 ` [PATCH 07/23] drm/object: Add default zpos value at reset Maxime Ripard
2022-02-07 19:24   ` Harry Wentland
2022-02-07 22:05   ` Laurent Pinchart
2022-02-07 16:35 ` [PATCH 08/23] drm/tegra: plane: Remove redundant zpos initialisation Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 09/23] drm/komeda: " Maxime Ripard
2022-02-07 16:35 ` [PATCH 10/23] drm/exynos: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 11/23] drm/imx: ipuv3-plane: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 12/23] drm/msm/mdp5: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [Nouveau] [PATCH 13/23] drm/nouveau/kms: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 14/23] drm/omap: plane: Fix zpos initial value mismatch Maxime Ripard
2022-02-09  7:33   ` Tomi Valkeinen
2022-02-07 16:35 ` [PATCH 15/23] drm/omap: plane: Remove redundant zpos initialisation Maxime Ripard
2022-02-09  7:33   ` Tomi Valkeinen
2022-02-07 16:35 ` [PATCH 16/23] drm/rcar: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 22:06   ` Laurent Pinchart
2022-02-07 22:06     ` Laurent Pinchart
2022-02-08 12:16   ` Kieran Bingham
2022-02-08 12:16     ` Kieran Bingham
2022-02-07 16:35 ` [PATCH 17/23] drm/sti: " Maxime Ripard
2022-02-10  9:34   ` Alain Volmat
2022-02-10 11:00   ` Philippe CORNU
2022-02-07 16:35 ` [PATCH 18/23] drm/sun4i: layer: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-08 13:56   ` Jernej Škrabec
2022-02-08 13:56     ` Jernej Škrabec
2022-02-08 13:56     ` Jernej Škrabec
2022-02-07 16:35 ` [PATCH 19/23] drm/object: Add default color encoding and range value at reset Maxime Ripard
2022-02-07 19:25   ` Harry Wentland
2022-02-07 16:35 ` [PATCH 20/23] drm/komeda: plane: Remove redundant color encoding and range initialisation Maxime Ripard
2022-02-07 16:35 ` [PATCH 21/23] drm/armada: overlay: " Maxime Ripard
2022-02-07 16:35 ` [PATCH 22/23] drm/imx: ipuv3-plane: " Maxime Ripard
2022-02-07 16:35   ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 23/23] drm/omap: plane: " Maxime Ripard
2022-02-09  7:33   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a9f5ff6-52fd-25f5-2714-8801eba13dab@amd.com \
    --to=harry.wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dom@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime@cerno.tech \
    --cc=phil@raspberrypi.com \
    --cc=sunpeng.li@amd.com \
    --cc=tim.gover@raspberrypi.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.