drm/amdgpu: clear set_q_mode_offs when VM changed
authorZhenGuo Yin <zhenguo.yin@amd.com>
Tue, 2 Apr 2024 03:41:05 +0000 (11:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 02:09:21 +0000 (22:09 -0400)
commit05e40141685fd6aaedbde334b404c8dfbbd83fd6
tree972c21bfd85fb155eeb391e810cec80f57dfc00b
parent4b0cb230bdb71c23981acfa5e7b367c7dde02a41
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: 8bc75586ea01 ("drm/amdgpu: workaround to avoid SET_Q_MODE packets v2")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c