Re: [PATCH 05/23] drm/amd/display: Fix color encoding mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

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@xxxxxxxxxxxxxxxxxxxxx
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: "Christian König" <christian.koenig@xxxxxxx>
> Cc: Harry Wentland <harry.wentland@xxxxxxx>
> Cc: Leo Li <sunpeng.li@xxxxxxx>
> Cc: "Pan, Xinhui" <Xinhui.Pan@xxxxxxx>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>
> Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
> ---
>  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 =




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux