Commit fc0faf04 authored by Emily Deng's avatar Emily Deng Committed by Alex Deucher

drm/amdgpu/sriov: Only sriov runtime support use kiq

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: default avatarEmily Deng <Emily.Deng@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 52de2ea7
...@@ -321,9 +321,6 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev, ...@@ -321,9 +321,6 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,
struct amdgpu_kiq *kiq = &adev->gfx.kiq; struct amdgpu_kiq *kiq = &adev->gfx.kiq;
struct amdgpu_ring *ring = &kiq->ring; struct amdgpu_ring *ring = &kiq->ring;
if (!ring->ready)
return -EINVAL;
spin_lock_irqsave(&kiq->ring_lock, flags); spin_lock_irqsave(&kiq->ring_lock, flags);
amdgpu_ring_alloc(ring, 32); amdgpu_ring_alloc(ring, 32);
...@@ -390,10 +387,14 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, ...@@ -390,10 +387,14 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,
struct amdgpu_vmhub *hub = &adev->vmhub[i]; struct amdgpu_vmhub *hub = &adev->vmhub[i];
u32 tmp = gmc_v9_0_get_invalidate_req(vmid); u32 tmp = gmc_v9_0_get_invalidate_req(vmid);
r = amdgpu_kiq_reg_write_reg_wait(adev, hub->vm_inv_eng0_req + eng, if (adev->gfx.kiq.ring.ready &&
hub->vm_inv_eng0_ack + eng, tmp, 1 << vmid); (amdgpu_sriov_runtime(adev) ||
if (!r) !amdgpu_sriov_vf(adev))) {
continue; 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); spin_lock(&adev->gmc.invalidate_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment