* [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42
@ 2026-09-14 10:21 Dan Carpenter
2026-09-14 10:23 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-09-14 10:21 UTC (permalink / raw)
To: Leo Chen; +Cc: amd-gfx, SHANMUGAM, SRINIVASAN
Hello Leo Chen,
Commit 53845307d52e ("drm/amd/display: Register DCN as a PMFW DF
C-state client on DCN42") from Jul 9, 2026, leads to the following
Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn42/dcn42_hwseq.c:686 dcn42_prepare_bandwidth()
warn: variable dereferenced before check 'dc->clk_mgr' (see line 681)
drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn42/dcn42_hwseq.c
680
681 dcn401_prepare_bandwidth(dc, context);
^^
dc->clk_mgr is dereferenced here.
682
683 /* valid C-state watermarks have now been committed to HW, so it
684 * is safe to vote "allow" to PMFW.
685 */
686 if (dc->clk_mgr && dc->clk_mgr->funcs && dc->clk_mgr->funcs->notify_cstate_disable)
^^^^^^^^^^^
so this check is too late.
687 dc->clk_mgr->funcs->notify_cstate_disable(dc->clk_mgr, false);
688 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42
2026-09-14 10:21 [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42 Dan Carpenter
@ 2026-09-14 10:23 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-09-14 10:23 UTC (permalink / raw)
To: Leo Chen; +Cc: amd-gfx, SHANMUGAM, SRINIVASAN
On Mon, Sep 14, 2026 at 01:21:43PM +0300, Dan Carpenter wrote:
> Hello Leo Chen,
>
> Commit 53845307d52e ("drm/amd/display: Register DCN as a PMFW DF
> C-state client on DCN42") from Jul 9, 2026, leads to the following
> Smatch complaint:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn42/dcn42_hwseq.c:686 dcn42_prepare_bandwidth()
> warn: variable dereferenced before check 'dc->clk_mgr' (see line 681)
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn42/dcn42_hwseq.c
> 680
> 681 dcn401_prepare_bandwidth(dc, context);
> ^^
> dc->clk_mgr is dereferenced here.
>
> 682
> 683 /* valid C-state watermarks have now been committed to HW, so it
> 684 * is safe to vote "allow" to PMFW.
> 685 */
> 686 if (dc->clk_mgr && dc->clk_mgr->funcs && dc->clk_mgr->funcs->notify_cstate_disable)
> ^^^^^^^^^^^
> so this check is too late.
>
Actually, dc->clk_mgr->funcs is dereferenced as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 10:21 [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42 Dan Carpenter
2026-09-14 10:23 ` Dan Carpenter
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.