aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2017-09-14 08:57:26 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-18 23:30:31 -0400
commit97bae49c44454549e7e22ef02020decafa099f04 (patch)
treee0f330e7491461faae6e504129b32f5467ef2eb7 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parente88206465578c4a7b9ebf2a69d040c0dc0fbc920 (diff)
drm/amd/amdgpu: Support VM environments in amdgpu_ttm_access_memory()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index b2b11e176667..8ee16dfdb8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1201,14 +1201,14 @@ static int amdgpu_ttm_access_memory(struct ttm_buffer_object *bo,
1201 } 1201 }
1202 1202
1203 spin_lock_irqsave(&adev->mmio_idx_lock, flags); 1203 spin_lock_irqsave(&adev->mmio_idx_lock, flags);
1204 WREG32(mmMM_INDEX, ((uint32_t)aligned_pos) | 0x80000000); 1204 WREG32_NO_KIQ(mmMM_INDEX, ((uint32_t)aligned_pos) | 0x80000000);
1205 WREG32(mmMM_INDEX_HI, aligned_pos >> 31); 1205 WREG32_NO_KIQ(mmMM_INDEX_HI, aligned_pos >> 31);
1206 if (!write || mask != 0xffffffff) 1206 if (!write || mask != 0xffffffff)
1207 value = RREG32(mmMM_DATA); 1207 value = RREG32_NO_KIQ(mmMM_DATA);
1208 if (write) { 1208 if (write) {
1209 value &= ~mask; 1209 value &= ~mask;
1210 value |= (*(uint32_t *)buf << shift) & mask; 1210 value |= (*(uint32_t *)buf << shift) & mask;
1211 WREG32(mmMM_DATA, value); 1211 WREG32_NO_KIQ(mmMM_DATA, value);
1212 } 1212 }
1213 spin_unlock_irqrestore(&adev->mmio_idx_lock, flags); 1213 spin_unlock_irqrestore(&adev->mmio_idx_lock, flags);
1214 if (!write) { 1214 if (!write) {