Commit 72a1eb3c authored by Aurabindo Pillai's avatar Aurabindo Pillai Committed by Alex Deucher
Browse files

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: c210b757 ("drm/amd/display: fix dmub access race condition")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarSun peng (Leo) Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c04812cb)
Cc: stable@vger.kernel.org
parent bec947cb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);