aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch
new file mode 100644
index 00000000..e84c50d8
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4385-drm-amdgpu-Fix-hardcoded-base-offset-of-vram-pages.patch
@@ -0,0 +1,35 @@
+From 4bb56c09293782eb85e5e7643b66496a6a119e34 Mon Sep 17 00:00:00 2001
+From: Feifei Xu <Feifei.Xu@amd.com>
+Date: Tue, 6 Feb 2018 12:29:23 +0800
+Subject: [PATCH 4385/5725] drm/amdgpu: Fix hardcoded base offset of vram pages
+
+In gmc_v9_0_vram_gtt_location(),the vram_base_offset is hardcoded
+to 0 in dGPU. Fix it by reading mmMC_VM_FB_OFFSET or return
+zfb_phys_addr if ZFB is enabled.
+
+Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
+Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+index 35cea8d..3c0a0c3 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+@@ -692,10 +692,7 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
+ amdgpu_device_vram_location(adev, &adev->gmc, base);
+ amdgpu_device_gart_location(adev, mc);
+ /* base offset of vram pages */
+- if (adev->flags & AMD_IS_APU)
+- adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
+- else
+- adev->vm_manager.vram_base_offset = 0;
++ adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
+ }
+
+ /**
+--
+2.7.4
+