drm/amdgpu: drop error return from flush_gpu_tlb_pasid

That function never fails, drop the error return.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König 2023-09-04 15:50:35 +02:00 committed by Alex Deucher
parent 041a574388
commit 3983c9fd2d
7 changed files with 24 additions and 29 deletions

View File

@ -645,9 +645,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready || if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready ||
!down_read_trylock(&adev->reset_domain->sem)) { !down_read_trylock(&adev->reset_domain->sem)) {
return adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid, adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
flush_type, flush_type, all_hub,
all_hub, inst); inst);
return 0;
} }
/* 2 dwords flush + 8 dwords fence */ /* 2 dwords flush + 8 dwords fence */

View File

@ -130,7 +130,7 @@ struct amdgpu_gmc_funcs {
void (*flush_gpu_tlb)(struct amdgpu_device *adev, uint32_t vmid, void (*flush_gpu_tlb)(struct amdgpu_device *adev, uint32_t vmid,
uint32_t vmhub, uint32_t flush_type); uint32_t vmhub, uint32_t flush_type);
/* flush the vm tlb via pasid */ /* flush the vm tlb via pasid */
int (*flush_gpu_tlb_pasid)(struct amdgpu_device *adev, uint16_t pasid, void (*flush_gpu_tlb_pasid)(struct amdgpu_device *adev, uint16_t pasid,
uint32_t flush_type, bool all_hub, uint32_t flush_type, bool all_hub,
uint32_t inst); uint32_t inst);
/* flush the vm tlb via ring */ /* flush the vm tlb via ring */

View File

@ -339,7 +339,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
* *
* Flush the TLB for the requested pasid. * Flush the TLB for the requested pasid.
*/ */
static int gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, static void gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type, uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst) bool all_hub, uint32_t inst)
{ {
@ -364,7 +364,6 @@ static int gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
flush_type); flush_type);
} }
} }
return 0;
} }
static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring, static uint64_t gmc_v10_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,

View File

@ -299,7 +299,7 @@ static void gmc_v11_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
* *
* Flush the TLB for the requested pasid. * Flush the TLB for the requested pasid.
*/ */
static int gmc_v11_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, static void gmc_v11_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type, uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst) bool all_hub, uint32_t inst)
{ {
@ -324,7 +324,6 @@ static int gmc_v11_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
flush_type); flush_type);
} }
} }
return 0;
} }
static uint64_t gmc_v11_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring, static uint64_t gmc_v11_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,

View File

@ -423,7 +423,7 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
* *
* Flush the TLB for the requested pasid. * Flush the TLB for the requested pasid.
*/ */
static int gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, static void gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type, uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst) bool all_hub, uint32_t inst)
{ {
@ -431,7 +431,7 @@ static int gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
int vmid; int vmid;
if (!down_read_trylock(&adev->reset_domain->sem)) if (!down_read_trylock(&adev->reset_domain->sem))
return 0; return;
for (vmid = 1; vmid < 16; vmid++) { for (vmid = 1; vmid < 16; vmid++) {
u32 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); u32 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid);
@ -444,7 +444,6 @@ static int gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
WREG32(mmVM_INVALIDATE_REQUEST, mask); WREG32(mmVM_INVALIDATE_REQUEST, mask);
RREG32(mmVM_INVALIDATE_RESPONSE); RREG32(mmVM_INVALIDATE_RESPONSE);
up_read(&adev->reset_domain->sem); up_read(&adev->reset_domain->sem);
return 0;
} }
/* /*

View File

@ -613,7 +613,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
* *
* Flush the TLB for the requested pasid. * Flush the TLB for the requested pasid.
*/ */
static int gmc_v8_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, static void gmc_v8_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type, uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst) bool all_hub, uint32_t inst)
{ {
@ -621,7 +621,7 @@ static int gmc_v8_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
int vmid; int vmid;
if (!down_read_trylock(&adev->reset_domain->sem)) if (!down_read_trylock(&adev->reset_domain->sem))
return 0; return;
for (vmid = 1; vmid < 16; vmid++) { for (vmid = 1; vmid < 16; vmid++) {
u32 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); u32 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid);
@ -634,7 +634,6 @@ static int gmc_v8_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
WREG32(mmVM_INVALIDATE_REQUEST, mask); WREG32(mmVM_INVALIDATE_REQUEST, mask);
RREG32(mmVM_INVALIDATE_RESPONSE); RREG32(mmVM_INVALIDATE_RESPONSE);
up_read(&adev->reset_domain->sem); up_read(&adev->reset_domain->sem);
return 0;
} }
/* /*

View File

@ -952,7 +952,7 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
* *
* Flush the TLB for the requested pasid. * Flush the TLB for the requested pasid.
*/ */
static int gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, static void gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
uint16_t pasid, uint32_t flush_type, uint16_t pasid, uint32_t flush_type,
bool all_hub, uint32_t inst) bool all_hub, uint32_t inst)
{ {
@ -978,8 +978,6 @@ static int gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
flush_type); flush_type);
} }
} }
return 0;
} }
static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring, static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,