diff options
author | Christian König <christian.koenig@amd.com> | 2018-02-04 04:32:35 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:20:18 -0500 |
commit | c633c00bf06779ec6d5e2c01748d4753ede98f8a (patch) | |
tree | 012bb3f787d03d71b7c13d16e7bf483d20ff6828 /drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |
parent | ec47734a6d0e82c132e3e0883f2f663f138da43a (diff) |
drm/amdgpu: separate PASID mapping from VM flush v2
Stuffing the PASID mapping into the VM flush isn't flexible enough since
the PASID mapping changes not as often as we need a VM flush.
v2: add missing use of gmc_v7_0_emit_pasid_mapping
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cik_sdma.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index d78bf183488b..69568cd1bb99 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |||
@@ -873,13 +873,12 @@ static void cik_sdma_ring_emit_pipeline_sync(struct amdgpu_ring *ring) | |||
873 | * using sDMA (CIK). | 873 | * using sDMA (CIK). |
874 | */ | 874 | */ |
875 | static void cik_sdma_ring_emit_vm_flush(struct amdgpu_ring *ring, | 875 | static void cik_sdma_ring_emit_vm_flush(struct amdgpu_ring *ring, |
876 | unsigned vmid, unsigned pasid, | 876 | unsigned vmid, uint64_t pd_addr) |
877 | uint64_t pd_addr) | ||
878 | { | 877 | { |
879 | u32 extra_bits = (SDMA_POLL_REG_MEM_EXTRA_OP(0) | | 878 | u32 extra_bits = (SDMA_POLL_REG_MEM_EXTRA_OP(0) | |
880 | SDMA_POLL_REG_MEM_EXTRA_FUNC(0)); /* always */ | 879 | SDMA_POLL_REG_MEM_EXTRA_FUNC(0)); /* always */ |
881 | 880 | ||
882 | amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pasid, pd_addr); | 881 | amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr); |
883 | 882 | ||
884 | amdgpu_ring_write(ring, SDMA_PACKET(SDMA_OPCODE_POLL_REG_MEM, 0, extra_bits)); | 883 | amdgpu_ring_write(ring, SDMA_PACKET(SDMA_OPCODE_POLL_REG_MEM, 0, extra_bits)); |
885 | amdgpu_ring_write(ring, mmVM_INVALIDATE_REQUEST << 2); | 884 | amdgpu_ring_write(ring, mmVM_INVALIDATE_REQUEST << 2); |