Skip to content

Commit bc21523

Browse files
Aurabindo Pillaigregkh
authored andcommitted
drm/amd/display: use GFP_NOWAIT for allocation in interrupt handler
commit 72a1eb3 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: c210b75 ("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 c04812c) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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)