All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10
@ 2026-08-20  9:59 Srinivasan Shanmugam
  2026-08-20 18:53 ` george.zhang
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivasan Shanmugam @ 2026-08-20  9:59 UTC (permalink / raw)
  To: Alex Hung, Aurabindo Pillai
  Cc: amd-gfx, Srinivasan Shanmugam, Dan Carpenter, Roman Li, Tom Chung

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 <error27@gmail.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
 .../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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10
  2026-08-20  9:59 [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10 Srinivasan Shanmugam
@ 2026-08-20 18:53 ` george.zhang
  0 siblings, 0 replies; 2+ messages in thread
From: george.zhang @ 2026-08-20 18:53 UTC (permalink / raw)
  To: amd-gfx



On 8/20/26 5:59 AM, Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> 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 <error27@gmail.com>
> Cc: Roman Li <roman.li@amd.com>
> Cc: Alex Hung <alex.hung@amd.com>
> Cc: Tom Chung <chiahsuan.chung@amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>

Reviewed-by: George Zhang <george.zhang@amd.com>

> ---
>   .../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;
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-20 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20  9:59 [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10 Srinivasan Shanmugam
2026-08-20 18:53 ` george.zhang

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.