* [bug report] drm/amd/display: Move FPU Guards From DML To DC - Part 1
@ 2026-04-10 18:04 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-04-10 18:04 UTC (permalink / raw)
To: Rafal Ostrowski; +Cc: amd-gfx, SHANMUGAM, SRINIVASAN
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-13 8:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 18:04 [bug report] drm/amd/display: Move FPU Guards From DML To DC - Part 1 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox