From: Dan Carpenter <error27@gmail.com>
To: Rafal Ostrowski <rafal.ostrowski@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd/display: Move FPU Guards From DML To DC - Part 1
Date: Fri, 10 Apr 2026 21:04:05 +0300 [thread overview]
Message-ID: <adk7lVaJt_bX9LCs@stanley.mountain> (raw)
Hello Rafal Ostrowski,
Commit 3539437f354b ("drm/amd/display: Move FPU Guards From DML To DC
- Part 1") from Feb 24, 2026 (linux-next), leads to the following
Smatch static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/dml2_wrapper_fpu.c:558 dml2_destroy()
warn: sleeping in atomic context
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2_0/dml2_wrapper_fpu.c
551 void dml2_destroy(struct dml2_context *dml2)
552 {
553 if (!dml2)
554 return;
555
556 if (dml2->architecture == dml2_architecture_21)
557 dml21_destroy(dml2);
--> 558 vfree(dml2);
vfree() is a sleeping function (unless we're in an interrupt).
559 }
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c 380 static void dc_state_free(struct kref *kref)
381 {
382 struct dc_state *state = container_of(kref, struct dc_state, refcount);
383
384 dc_state_destruct(state);
385
386 #ifdef CONFIG_DRM_AMD_DC_FP
387 DC_FP_START();
^^^^^^^^^^^^^
The patch adds this, which disables preemption
388 dml2_destroy(state->bw_ctx.dml2);
389 state->bw_ctx.dml2 = 0;
390
391 dml2_destroy(state->bw_ctx.dml2_dc_power_source);
392 state->bw_ctx.dml2_dc_power_source = 0;
393 DC_FP_END();
394 #endif
395
396 kvfree(state);
397 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
reply other threads:[~2026-04-13 8:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=adk7lVaJt_bX9LCs@stanley.mountain \
--to=error27@gmail.com \
--cc=SRINIVASAN.SHANMUGAM@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=rafal.ostrowski@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;
as well as URLs for NNTP newsgroup(s).