]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: add PASID mapping for GMC v7
authorChristian König <christian.koenig@amd.com>
Tue, 16 Jan 2018 19:24:55 +0000 (20:24 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:18:10 +0000 (14:18 -0500)
This way we can see the PASID in VM faults.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cik.h
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c

index 201d8786f9cba0f01ed0987c8daf3aeef444b183..e49c6f15a0a00f58891856dfd6e56a851268034e 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef __CIK_H__
 #define __CIK_H__
 
-#define CIK_FLUSH_GPU_TLB_NUM_WREG     2
+#define CIK_FLUSH_GPU_TLB_NUM_WREG     3
 
 void cik_srbm_select(struct amdgpu_device *adev,
                     u32 me, u32 pipe, u32 queue, u32 vmid);
index cd2f834282fb5b1012fd96fcbd5265883101c50d..1137f395ed667722eb8a5d72d21fbae7d8cae39c 100644 (file)
@@ -447,6 +447,8 @@ static uint64_t gmc_v7_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
                reg = mmVM_CONTEXT8_PAGE_TABLE_BASE_ADDR + vmid - 8;
        amdgpu_ring_emit_wreg(ring, reg, pd_addr >> 12);
 
+       amdgpu_ring_emit_wreg(ring, mmIH_VMID_0_LUT + vmid, pasid);
+
        /* bits 0-15 are the VM contexts0-15 */
        amdgpu_ring_emit_wreg(ring, mmVM_INVALIDATE_REQUEST, 1 << vmid);