diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-03-27 18:10:56 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 14:43:15 -0400 |
commit | f8bc903707ae87342b97528037e27bf190051c11 (patch) | |
tree | 1157b63e3a5bd82663c338af3bddbd2b1489827f /drivers/gpu/drm/amd/amdgpu | |
parent | f58b85e3ec0e3d3ddeff6eb16ace23a42516ae70 (diff) |
drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush
Use amdgpu_ring_emit_reg_write_reg_wait. On engines that support it,
it provides a write and wait in a single packet which avoids a missed
ack if a world switch happens between the request and waiting for the
ack.
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 070946e1e4a7..aeaed7fe9ced 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |||
@@ -385,11 +385,9 @@ static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring, | |||
385 | amdgpu_ring_emit_wreg(ring, hub->ctx0_ptb_addr_hi32 + (2 * vmid), | 385 | amdgpu_ring_emit_wreg(ring, hub->ctx0_ptb_addr_hi32 + (2 * vmid), |
386 | upper_32_bits(pd_addr)); | 386 | upper_32_bits(pd_addr)); |
387 | 387 | ||
388 | amdgpu_ring_emit_wreg(ring, hub->vm_inv_eng0_req + eng, req); | 388 | amdgpu_ring_emit_reg_write_reg_wait(ring, hub->vm_inv_eng0_req + eng, |
389 | 389 | hub->vm_inv_eng0_ack + eng, | |
390 | /* wait for the invalidate to complete */ | 390 | req, 1 << vmid); |
391 | amdgpu_ring_emit_reg_wait(ring, hub->vm_inv_eng0_ack + eng, | ||
392 | 1 << vmid, 1 << vmid); | ||
393 | 391 | ||
394 | return pd_addr; | 392 | return pd_addr; |
395 | } | 393 | } |