drm/amdgpu: keep the owner for VMIDs
We don't need the last VM use any more, keep the owner directly.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <davdi1.zhou@amd.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index beb7485..a569262 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -925,8 +925,6 @@
uint64_t pd_gpu_addr;
/* last flushed PD/PT update */
struct fence *flushed_updates;
- /* last use of vmid */
- struct fence *last_id_use;
};
struct amdgpu_vm {
@@ -959,7 +957,11 @@
};
struct amdgpu_vm_manager {
- struct fence *active[AMDGPU_NUM_VM];
+ struct {
+ struct fence *active;
+ atomic_long_t owner;
+ } ids[AMDGPU_NUM_VM];
+
uint32_t max_pfn;
/* number of VMIDs */
unsigned nvm;