aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-09 20:57:02 -0400
committerDave Airlie <airlied@redhat.com>2018-07-09 20:57:08 -0400
commitba7ca97d73b437eec883eba785495b8c9759b5f2 (patch)
tree1fa28063ba726d21af566796751805a3a4db21cc /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
parent61a3a9d6c9c9a017decadb56669b66066612d728 (diff)
parent43911fb68b19f7c37ab69eff8e6a3c1370bc0cb5 (diff)
Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-next
More features for 4.19: - Use core pcie functionality rather than duplicating our own for pcie gens and lanes - Scheduler function naming cleanups - More documentation - Reworked DC/Powerplay interfaces to improve power savings - Initial stutter mode support for RV (power feature) - Vega12 powerplay updates - GFXOFF fixes - Misc fixes Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180705221447.2807-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index dd11b7313ca0..36113cb60ca2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -234,7 +234,7 @@ int amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset,
234 } 234 }
235 235
236 t = offset / AMDGPU_GPU_PAGE_SIZE; 236 t = offset / AMDGPU_GPU_PAGE_SIZE;
237 p = t / (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE); 237 p = t / AMDGPU_GPU_PAGES_IN_CPU_PAGE;
238 for (i = 0; i < pages; i++, p++) { 238 for (i = 0; i < pages; i++, p++) {
239#ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS 239#ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS
240 adev->gart.pages[p] = NULL; 240 adev->gart.pages[p] = NULL;
@@ -243,7 +243,7 @@ int amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset,
243 if (!adev->gart.ptr) 243 if (!adev->gart.ptr)
244 continue; 244 continue;
245 245
246 for (j = 0; j < (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE); j++, t++) { 246 for (j = 0; j < AMDGPU_GPU_PAGES_IN_CPU_PAGE; j++, t++) {
247 amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr, 247 amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
248 t, page_base, flags); 248 t, page_base, flags);
249 page_base += AMDGPU_GPU_PAGE_SIZE; 249 page_base += AMDGPU_GPU_PAGE_SIZE;
@@ -282,7 +282,7 @@ int amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
282 282
283 for (i = 0; i < pages; i++) { 283 for (i = 0; i < pages; i++) {
284 page_base = dma_addr[i]; 284 page_base = dma_addr[i];
285 for (j = 0; j < (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE); j++, t++) { 285 for (j = 0; j < AMDGPU_GPU_PAGES_IN_CPU_PAGE; j++, t++) {
286 amdgpu_gmc_set_pte_pde(adev, dst, t, page_base, flags); 286 amdgpu_gmc_set_pte_pde(adev, dst, t, page_base, flags);
287 page_base += AMDGPU_GPU_PAGE_SIZE; 287 page_base += AMDGPU_GPU_PAGE_SIZE;
288 } 288 }
@@ -319,7 +319,7 @@ int amdgpu_gart_bind(struct amdgpu_device *adev, uint64_t offset,
319 319
320#ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS 320#ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS
321 t = offset / AMDGPU_GPU_PAGE_SIZE; 321 t = offset / AMDGPU_GPU_PAGE_SIZE;
322 p = t / (PAGE_SIZE / AMDGPU_GPU_PAGE_SIZE); 322 p = t / AMDGPU_GPU_PAGES_IN_CPU_PAGE;
323 for (i = 0; i < pages; i++, p++) 323 for (i = 0; i < pages; i++, p++)
324 adev->gart.pages[p] = pagelist ? pagelist[i] : NULL; 324 adev->gart.pages[p] = pagelist ? pagelist[i] : NULL;
325#endif 325#endif