]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: use GFP_NOWAIT for allocation in interrupt handler
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Thu, 25 Sep 2025 14:23:59 +0000 (10:23 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Oct 2025 13:52:06 +0000 (09:52 -0400)
schedule_dc_vmin_vmax() is called by dm_crtc_high_irq(). Hence, we
cannot have the former sleep. Use GFP_NOWAIT for allocation in this
function.

Fixes: c210b757b400 ("drm/amd/display: fix dmub access race condition")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Sun peng (Leo) Li <sunpeng.li@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c04812cbe2f247a1c1e53a9b6c5e659963fe4065)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 6597475e245d2b22299d12631c755cbbd3b376ba..bfa3199591b67ad6087da7048df7a8c2f6118c44 100644 (file)
@@ -551,13 +551,13 @@ static void schedule_dc_vmin_vmax(struct amdgpu_device *adev,
        struct dc_stream_state *stream,
        struct dc_crtc_timing_adjust *adjust)
 {
-       struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_KERNEL);
+       struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_NOWAIT);
        if (!offload_work) {
                drm_dbg_driver(adev_to_drm(adev), "Failed to allocate vupdate_offload_work\n");
                return;
        }
 
-       struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_KERNEL);
+       struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_NOWAIT);
        if (!adjust_copy) {
                drm_dbg_driver(adev_to_drm(adev), "Failed to allocate adjust_copy\n");
                kfree(offload_work);