Used to determine whether or not to use the invalidation semaphore for a particular hub.
Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 +++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 6 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h index bbd52028a775f..772f829c5f1ec 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h @@ -178,6 +178,9 @@ struct amdgpu_gmc_funcs { bool (*get_vmid_pasid_mapping_info)(struct amdgpu_device *adev, uint8_t vmid, uint8_t inst, uint16_t *p_pasid); + /* determine whether or not to use the inv semaphore */ + bool (*use_invalidate_semaphore)(struct amdgpu_device *adev, + uint32_t vmhub); /* enable/disable PRT support */ void (*set_prt)(struct amdgpu_device *adev, bool enable); /* get the pde for a given mc addr */ diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index d1fdebaad488f..4b3303ab4bff9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c @@ -557,6 +557,7 @@ static const struct amdgpu_gmc_funcs gmc_v10_0_gmc_funcs = { .emit_flush_gpu_tlb = gmc_v10_0_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v10_0_emit_pasid_mapping, .get_vmid_pasid_mapping_info = gmc_v10_0_get_atc_vmid_pasid_mapping_info, + .use_invalidate_semaphore = gmc_v10_0_use_invalidate_semaphore, .get_vm_pde = gmc_v10_0_get_vm_pde, .get_vm_pte = gmc_v10_0_get_vm_pte, .get_vbios_fb_size = gmc_v10_0_get_vbios_fb_size, diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index 715fe442ccee3..2d7ef1e1fd8cc 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c @@ -551,6 +551,7 @@ static const struct amdgpu_gmc_funcs gmc_v11_0_gmc_funcs = { .emit_flush_gpu_tlb = gmc_v11_0_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v11_0_emit_pasid_mapping, .get_vmid_pasid_mapping_info = gmc_v11_0_get_vmid_pasid_mapping_info, + .use_invalidate_semaphore = gmc_v11_0_use_invalidate_semaphore, .get_vm_pde = gmc_v11_0_get_vm_pde, .get_vm_pte = gmc_v11_0_get_vm_pte, .get_vbios_fb_size = gmc_v11_0_get_vbios_fb_size, diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index 17766b7ce8c45..1da76d19eb3c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -586,6 +586,7 @@ static const struct amdgpu_gmc_funcs gmc_v12_0_gmc_funcs = { .emit_flush_gpu_tlb = gmc_v12_0_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v12_0_emit_pasid_mapping, .get_vmid_pasid_mapping_info = gmc_v12_0_get_vmid_pasid_mapping_info, + .use_invalidate_semaphore = gmc_v12_0_use_invalidate_semaphore, .get_vm_pde = gmc_v12_0_get_vm_pde, .get_vm_pte = gmc_v12_0_get_vm_pte, .get_vbios_fb_size = gmc_v12_0_get_vbios_fb_size, diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c index efb8e0c15c968..1c0d0121ad8ab 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c @@ -758,6 +758,7 @@ static const struct amdgpu_gmc_funcs gmc_v12_1_gmc_funcs = { .emit_flush_gpu_tlb = gmc_v12_1_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v12_1_emit_pasid_mapping, .get_vmid_pasid_mapping_info = gmc_v12_1_get_vmid_pasid_mapping_info, + .use_invalidate_semaphore = gmc_v12_1_use_invalidate_semaphore, .get_vm_pde = gmc_v12_1_get_vm_pde, .get_vm_pte = gmc_v12_1_get_vm_pte, .query_mem_partition_mode = &amdgpu_gmc_query_memory_partition, diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 9367282d7a5ee..8e2b89c36a4da 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1304,6 +1304,7 @@ static const struct amdgpu_gmc_funcs gmc_v9_0_gmc_funcs = { .emit_flush_gpu_tlb = gmc_v9_0_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v9_0_emit_pasid_mapping, .get_vmid_pasid_mapping_info = gmc_v9_0_get_atc_vmid_pasid_mapping_info, + .use_invalidate_semaphore = gmc_v9_0_use_invalidate_semaphore, .get_vm_pde = gmc_v9_0_get_vm_pde, .get_vm_pte = gmc_v9_0_get_vm_pte, .override_vm_pte_flags = gmc_v9_0_override_vm_pte_flags, -- 2.55.0
