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:35 +0300	[thread overview]
Message-ID: <aoa6s4zFvNsiClPD@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_dcn6_calcs_dchub.c:572 dcn6_calculate_flip_schedule()
	warn: duplicate check 'GPUVMEnable' (previous on line 570)

drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.c
    566         DML_LOG_VERBOSE("DML::%s: VRatio = %f\n", __func__, VRatio);
    567 
    568         bool flip_enable = iflip_enable || (GPUVMEnable && (ihostvm_enable || iffbmm_enable));
    569 
    570         if (GPUVMEnable) {
                    ^^^^^^^^^^^

    571                 if (l->dual_plane) {
--> 572                         if (GPUVMEnable) {
                                    ^^^^^^^^^^^

    573                                 l->min_row_height = dpte_row_height;
    574                                 l->min_row_height_chroma = dpte_row_height_chroma;
    575                         } else {
    576                                 l->min_row_height = meta_row_height;
    577                                 l->min_row_height_chroma = meta_row_height_chroma;

Dead code.

    578                         }
    579                         l->min_row_time = math_min2(l->min_row_height * LineTime / VRatio, l->min_row_height_chroma * LineTime / VRatioChroma);
    580                 } else {
    581                         if (GPUVMEnable)
                                    ^^^^^^^^^^^

    582                                 l->min_row_height = dpte_row_height;
    583                         else
    584                                 l->min_row_height = meta_row_height;

More dead code.

    585 
    586                         l->min_row_time = l->min_row_height * LineTime / VRatio;
    587                 }
    588                 DML_LOG_VERBOSE("DML::%s: min_row_time = %f\n", __func__, l->min_row_time);
    589                 DML_ASSERT(l->min_row_time > 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=aoa6s4zFvNsiClPD@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.