Commit 05e40141 authored by ZhenGuo Yin's avatar ZhenGuo Yin Committed by Alex Deucher

drm/amdgpu: clear set_q_mode_offs when VM changed

[Why]
set_q_mode_offs don't get cleared after GPU reset, nexting SET_Q_MODE
packet to init shadow memory will be skiped, hence there has a page fault.

[How]
VM flush is needed after GPU reset, clear set_q_mode_offs when
emitting VM flush.

Fixes: 8bc75586 ("drm/amdgpu: workaround to avoid SET_Q_MODE packets v2")
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarZhenGuo Yin <zhenguo.yin@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4b0cb230
......@@ -5465,6 +5465,7 @@ static void gfx_v11_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
/* Make sure that we can't skip the SET_Q_MODE packets when the VM
* changed in any way.
*/
ring->set_q_mode_offs = 0;
ring->set_q_mode_ptr = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment