diff options
author | Christian König <christian.koenig@amd.com> | 2016-01-21 04:19:11 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 14:16:58 -0500 |
commit | a9a78b329a3e31a977f8d8ef64b2f3a574899992 (patch) | |
tree | f37eadb3fd535501d79f793cf568c99e4932f652 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 94dd0a4ae0b1af997b1f45793e5fd5b47f4ffc18 (diff) |
drm/amdgpu: use a global LRU list for VMIDs
With the scheduler enabled managing per ring LRUs don't
make much sense any more.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 43b48eb6cf6e..3d4c2abfcfe8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -925,18 +925,20 @@ struct amdgpu_vm { | |||
925 | spinlock_t freed_lock; | 925 | spinlock_t freed_lock; |
926 | }; | 926 | }; |
927 | 927 | ||
928 | struct amdgpu_vm_manager_id { | ||
929 | struct list_head list; | ||
930 | struct fence *active; | ||
931 | atomic_long_t owner; | ||
932 | }; | ||
933 | |||
928 | struct amdgpu_vm_manager { | 934 | struct amdgpu_vm_manager { |
929 | /* protecting IDs */ | 935 | /* Handling of VMIDs */ |
930 | struct mutex lock; | 936 | struct mutex lock; |
931 | 937 | unsigned num_ids; | |
932 | struct { | 938 | struct list_head ids_lru; |
933 | struct fence *active; | 939 | struct amdgpu_vm_manager_id ids[AMDGPU_NUM_VM]; |
934 | atomic_long_t owner; | ||
935 | } ids[AMDGPU_NUM_VM]; | ||
936 | 940 | ||
937 | uint32_t max_pfn; | 941 | uint32_t max_pfn; |
938 | /* number of VMIDs */ | ||
939 | unsigned nvm; | ||
940 | /* vram base address for page table entry */ | 942 | /* vram base address for page table entry */ |
941 | u64 vram_base_offset; | 943 | u64 vram_base_offset; |
942 | /* is vm enabled? */ | 944 | /* is vm enabled? */ |
@@ -946,6 +948,7 @@ struct amdgpu_vm_manager { | |||
946 | struct amdgpu_ring *vm_pte_funcs_ring; | 948 | struct amdgpu_ring *vm_pte_funcs_ring; |
947 | }; | 949 | }; |
948 | 950 | ||
951 | void amdgpu_vm_manager_init(struct amdgpu_device *adev); | ||
949 | void amdgpu_vm_manager_fini(struct amdgpu_device *adev); | 952 | void amdgpu_vm_manager_fini(struct amdgpu_device *adev); |
950 | int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm); | 953 | int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm); |
951 | void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm); | 954 | void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm); |