[bug report] drm/amd/display: Add new sources for DCN6

Dan Carpenter <[email protected]>
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <[email protected]>
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
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.