Re: [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10

[email protected]
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <[email protected]>

On 8/20/26 5:59 AM, Srinivasan Shanmugam <[email protected]> wrote:
> The pixel format dml2_422_packed_10 needs BytePerPixelDETY set to
> 8.0/3. But it was accidentally placed in the wrong group that sets it to
>    4, so the correct value was never used.
> 
> This caused wrong DET buffer size and bandwidth calculations whenever
> this format was used.
> 
> Fix it by moving dml2_422_packed_10 out of the wrong group so it gets
> the correct value of 8.0/3.
> 
> Fixes: 04d9a88decbc ("drm/amd/display: Add new sources for DCN6")
> Reported-by: Dan Carpenter <[email protected]>
> Cc: Roman Li <[email protected]>
> Cc: Alex Hung <[email protected]>
> Cc: Tom Chung <[email protected]>
> Cc: Aurabindo Pillai <[email protected]>
> Signed-off-by: Srinivasan Shanmugam <[email protected]>

Reviewed-by: George Zhang <[email protected]>

> ---
>   .../dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c   | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
> index 321a29d289b6..bd2494c976ac 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
> @@ -74,7 +74,9 @@ void dcn5_calculate_byte_per_pixel_and_block_sizes(
>   		*BytePerPixelDETC = 0;
>   		*BytePerPixelY = 8;
>   		*BytePerPixelC = 0;
> -	} else if (SourcePixelFormat == dml2_444_32 || SourcePixelFormat == dml2_rgbe || SourcePixelFormat == dml2_422_packed_10 || SourcePixelFormat == dml2_422_packed_12) {
> +	} else if (SourcePixelFormat == dml2_444_32 ||
> +		   SourcePixelFormat == dml2_rgbe ||
> +		   SourcePixelFormat == dml2_422_packed_12) {
>   		*BytePerPixelDETY = 4;
>   		*BytePerPixelDETC = 0;
>   		*BytePerPixelY = 4;
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.