drm/amdgpu: fix and cleanup gmc_v8_0_flush_gpu_tlb_pasid
authorChristian König <christian.koenig@amd.com>
Fri, 1 Sep 2023 13:20:39 +0000 (15:20 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2023 20:55:09 +0000 (16:55 -0400)
commit0c525aa406490a779541025df83890fc54e78094
tree698337ad0ba8fd6bd1a51b6f872541c659cddd3a
parentfb4c52db69746ee0429cedee562ce861f5392e73
drm/amdgpu: fix and cleanup gmc_v8_0_flush_gpu_tlb_pasid

Testing for reset is pointless since the reset can start right after the
test. Grab the reset semaphore instead.

The same PASID can be used by more than once VMID, build a mask of VMIDs
to invalidate instead of just restting the first one.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c