All of lore.kernel.org
 help / color / mirror / Atom feed
From: george.zhang@amd.com
To: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: Fix wrong bytes-per-pixel value for dml2_422_packed_10
Date: Thu, 20 Aug 2026 14:53:11 -0400	[thread overview]
Message-ID: <83137ecf-a9f8-466b-bb25-4d4dc39bc618@amd.com> (raw)
In-Reply-To: <20260820095943.3942404-1-srinivasan.shanmugam@amd.com>



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

      reply	other threads:[~2026-08-20 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=83137ecf-a9f8-466b-bb25-4d4dc39bc618@amd.com \
    --to=george.zhang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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.