All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
	SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd/display: Add new sources for DCN6
Date: Thu, 20 Aug 2026 11:28:29 +0300	[thread overview]
Message-ID: <aoa6rezcQKFQLvWl@stanley.mountain> (raw)

Hello Aurabindo Pillai,

Commit 7f7d7ea1fa51 ("drm/amd/display: Add new sources for DCN6")
from Jul 22, 2026 (linux-next), leads to the following Smatch static
checker warning:

	drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c:82 dcn5_calculate_byte_per_pixel_and_block_sizes()
	warn: duplicate check 'SourcePixelFormat == 17' (previous on line 77)

drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
    45 void dcn5_calculate_byte_per_pixel_and_block_sizes(
    46         enum dml2_source_format_class SourcePixelFormat,
    47         enum dml2_swizzle_mode SurfaceTiling,
    48         unsigned int pitch_y,
    49         unsigned int pitch_c,
    50 
    51         // Output
    52         unsigned int *BytePerPixelY,
    53         unsigned int *BytePerPixelC,
    54         double *BytePerPixelDETY,
    55         double *BytePerPixelDETC,
    56         unsigned int *BlockHeight256BytesY,
    57         unsigned int *BlockHeight256BytesC,
    58         unsigned int *BlockWidth256BytesY,
    59         unsigned int *BlockWidth256BytesC,
    60         unsigned int *MacroTileHeightY,
    61         unsigned int *MacroTileHeightC,
    62         unsigned int *MacroTileWidthY,
    63         unsigned int *MacroTileWidthC,
    64         bool *surf_linear128_l,
    65         bool *surf_linear128_c)
    66 {
    67         *BytePerPixelDETY = 0;
    68         *BytePerPixelDETC = 0;
    69         *BytePerPixelY = 0;
    70         *BytePerPixelC = 0;
    71 
    72         if (SourcePixelFormat == dml2_444_64) {
    73                 *BytePerPixelDETY = 8;
    74                 *BytePerPixelDETC = 0;
    75                 *BytePerPixelY = 8;
    76                 *BytePerPixelC = 0;
    77         } else if (SourcePixelFormat == dml2_444_32 || SourcePixelFormat == dml2_rgbe || SourcePixelFormat == dml2_422_packed_10 || SourcePixelFormat == dml2_422_packed_12) {
                                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    78                 *BytePerPixelDETY = 4;
    79                 *BytePerPixelDETC = 0;
    80                 *BytePerPixelY = 4;
    81                 *BytePerPixelC = 0;
--> 82         } else if (SourcePixelFormat == dml2_422_packed_10) {
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Dead code.

    83                 *BytePerPixelDETY = (double)(8.0 / 3);
    84                 *BytePerPixelDETC = 0;
    85                 *BytePerPixelY = 4;
    86                 *BytePerPixelC = 0;

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

             reply	other threads:[~2026-08-20 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  8:28 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-20  8:28 [bug report] drm/amd/display: Add new sources for DCN6 Dan Carpenter

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=aoa6rezcQKFQLvWl@stanley.mountain \
    --to=error27@gmail.com \
    --cc=SRINIVASAN.SHANMUGAM@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    /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.