AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Qingqing Zhuo <Qingqing.Zhuo@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	Roman Li <roman.li@amd.com>,
	 Alex Deucher <alexander.deucher@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	amd-gfx mailing list <amd-gfx@lists.freedesktop.org>,
	amd-gfx mailing list <amd-gfx@lists.freedesktop.org>
Subject: re: drm/amd/display: Introduce DML2
Date: Thu, 10 Oct 2024 16:59:15 +0100	[thread overview]
Message-ID: <ec6a9eff-89b0-4fd6-b3b3-5b234ee79f92@gmail.com> (raw)

Hi,

Static analysis on linux-next has found a potential issue in function 
dml_rq_dlg_get_rq_reg in 
drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c

The issue is as follows:

         if (min_meta_chunk_bytes == 0)
                 rq_regs->rq_regs_l.min_meta_chunk_size = 0;
         else
                 rq_regs->rq_regs_l.min_meta_chunk_size = 
(dml_uint_t)(dml_log2((dml_float_t) min_meta_chunk_bytes) - 6 + 1);

         if ( == 0)
                 rq_regs->rq_regs_c.min_meta_chunk_size = 0;
         else
                 rq_regs->rq_regs_c.min_meta_chunk_size = 
(dml_uint_t)(dml_log2((dml_float_t) p1_min_meta_chunk_bytes) - 6 + 1);

it appears that the second if statement is checking for 
min_meta_chunk_bytes == 0 and I think it should be in fact checking for 
p1_min_meta_chunk_bytes == 0 instead. I don't have the hardware so I 
can't test this hypothesis.

Regards,

Colin

             reply	other threads:[~2024-10-14 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 15:59 Colin King (gmail) [this message]
2024-10-10 20:23 ` drm/amd/display: Introduce DML2 Li, Roman

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=ec6a9eff-89b0-4fd6-b3b3-5b234ee79f92@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=Qingqing.Zhuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roman.li@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox