Skip to content

Commit bc21523

Browse files
Aurabindo Pillaigregkh
authored andcommitted
drm/amd/display: use GFP_NOWAIT for allocation in interrupt handler
commit 72a1eb3cf573ab957ae412f0efb0cf6ff0876234 upstream. 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 <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Sun peng (Leo) Li <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit c04812cbe2f247a1c1e53a9b6c5e659963fe4065) Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b47260e commit bc21523

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,13 +561,13 @@ static void schedule_dc_vmin_vmax(struct amdgpu_device *adev,
561561
struct dc_stream_state *stream,
562562
struct dc_crtc_timing_adjust *adjust)
563563
{
564-
struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_KERNEL);
564+
struct vupdate_offload_work *offload_work = kzalloc(sizeof(*offload_work), GFP_NOWAIT);
565565
if (!offload_work) {
566566
drm_dbg_driver(adev_to_drm(adev), "Failed to allocate vupdate_offload_work\n");
567567
return;
568568
}
569569

570-
struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_KERNEL);
570+
struct dc_crtc_timing_adjust *adjust_copy = kzalloc(sizeof(*adjust_copy), GFP_NOWAIT);
571571
if (!adjust_copy) {
572572
drm_dbg_driver(adev_to_drm(adev), "Failed to allocate adjust_copy\n");
573573
kfree(offload_work);

0 commit comments

Comments
 (0)