Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: use GFP_NOWAIT for allocation in interrupt handler

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

authored by

Aurabindo Pillai and committed by
Alex Deucher
72a1eb3c bec947cb

+2 -2
+2 -2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 551 551 struct dc_stream_state *stream, 552 552 struct dc_crtc_timing_adjust *adjust) 553 553 { 554 - struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_KERNEL); 554 + struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_NOWAIT); 555 555 if (!offload_work) { 556 556 drm_dbg_driver(adev_to_drm(adev), "Failed to allocate vupdate_offload_work\n"); 557 557 return; 558 558 } 559 559 560 - struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_KERNEL); 560 + struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_NOWAIT); 561 561 if (!adjust_copy) { 562 562 drm_dbg_driver(adev_to_drm(adev), "Failed to allocate adjust_copy\n"); 563 563 kfree(offload_work);