summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-11-16 20:12:51 +0100
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 12:47:58 -0500
commitb98f1b9e5e71b636036cc6c0e1a3b428acd216cb (patch)
tree2122f9e13ad117c9939ac61e067846d4fb59f9f3
parent3d647c8f930190f728c997c3ac3d987f992420ed (diff)
downloadlinux-stable-b98f1b9e5e71b636036cc6c0e1a3b428acd216cb.tar.gz
linux-stable-b98f1b9e5e71b636036cc6c0e1a3b428acd216cb.tar.bz2
linux-stable-b98f1b9e5e71b636036cc6c0e1a3b428acd216cb.zip
drm/amdgpu: align GTT start to 4GB v2
For VCE to work properly the start of the GTT space must be aligned to a 4GB boundary. v2: add comment why we do this Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index a81743d06bb0..a43d096ebb52 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -622,7 +622,10 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
dev_warn(adev->dev, "limiting GTT\n");
mc->gart_size = size_af;
}
- mc->gart_start = mc->vram_end + 1;
+ /* VCE doesn't like it when BOs cross a 4GB segment, so align
+ * the GART base on a 4GB boundary as well.
+ */
+ mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
}
mc->gart_end = mc->gart_start + mc->gart_size - 1;
dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",