drm/amdgpu/sriov: Only sriov runtime support use kiq
Subsystems (2)
PATCH v4 1/1 drm/amdgpu/sriov: Only sriov runtime support use kiq
Use adev->gfx.kiq.ring.ready directly.
For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8 -7
@@ -320,9 +320,6 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *ring = &kiq->ring; -if (!ring->ready) -return -EINVAL ; -spin_lock_irqsave (&kiq->ring_lock, flags);amdgpu_ring_alloc (ring,32 );
@@ -389,10 +386,14 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,struct amdgpu_vmhub *hub = &adev->vmhub[i];u32 tmp =gmc_v9_0_get_invalidate_req (vmid); - r =amdgpu_kiq_reg_write_reg_wait (adev, hub->vm_inv_eng0_req + eng, - hub->vm_inv_eng0_ack + eng, tmp,1 << vmid); -if (!r) -continue ; +if (adev->gfx.kiq.ring.ready && + (amdgpu_sriov_runtime (adev) || + !amdgpu_sriov_vf (adev))) { + r =amdgpu_kiq_reg_write_reg_wait (adev, hub->vm_inv_eng0_req + eng, + hub->vm_inv_eng0_ack + eng, tmp,1 << vmid); +if (!r) +continue ; + }spin_lock (&adev->gmc.invalidate_lock);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1534845793-16866-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 21.08.2018 um 12:03 schrieb Emily Deng:
Quoted 6 lines
Use
adev->gfx.kiq.ring.readydirectly.For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout.
Signed-off-by Emily Deng <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-7@@ -320,9 +320,6 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *ring = &kiq->ring; -if (!ring->ready) -return -EINVAL ; -spin_lock_irqsave (&kiq->ring_lock, flags);amdgpu_ring_alloc (ring,32 );@@ -389,10 +386,14 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,struct amdgpu_vmhub *hub = &adev->vmhub[i];u32 tmp =gmc_v9_0_get_invalidate_req (vmid); - r =amdgpu_kiq_reg_write_reg_wait (adev, hub->vm_inv_eng0_req + eng, - hub->vm_inv_eng0_ack + eng, tmp,1 << vmid); -if (!r) -continue ; + if (adev->gfx.kiq.ring.ready &&
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, · line 399
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-0+ (amdgpu_sriov_runtime(adev) || + !amdgpu_sriov_vf(adev))) { + r =amdgpu_kiq_reg_write_reg_wait (adev, hub->vm_inv_eng0_req + eng, + hub->vm_inv_eng0_ack + eng, tmp,1 << vmid); +if (!r) +continue ; + }spin_lock (&adev->gmc.invalidate_lock);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx