From: Dan Carpenter <error27@gmail.com>
To: Leo Chen <leo.chen@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42
Date: Mon, 14 Sep 2026 13:21:43 +0300 [thread overview]
Message-ID: <aqfKt3Ry75gaA4Vz@stanley.mountain> (raw)
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
next reply other threads:[~2026-09-14 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 10:21 Dan Carpenter [this message]
2026-09-14 10:23 ` [bug report] drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42 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=aqfKt3Ry75gaA4Vz@stanley.mountain \
--to=error27@gmail.com \
--cc=SRINIVASAN.SHANMUGAM@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=leo.chen@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.