aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch
new file mode 100644
index 00000000..597267e1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2972-drm-amdgpu-keep-stolen-memory-for-arct.patch
@@ -0,0 +1,47 @@
+From 3c78ba553985f91ce4f3bb221d2e2d243222191e Mon Sep 17 00:00:00 2001
+From: Hawking Zhang <Hawking.Zhang@amd.com>
+Date: Fri, 28 Jun 2019 11:07:53 +0800
+Subject: [PATCH 2972/4256] drm/amdgpu: keep stolen memory for arct
+
+Any dce register read back from arct is invalid. use hard code
+stolen memory for arct until we validate the s3.
+
+Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Reviewed-by: Le Ma <Le.Ma@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+index 6ff53046fddd..0a7e16fe602d 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+@@ -638,6 +638,7 @@ static bool gmc_v9_0_keep_stolen_memory(struct amdgpu_device *adev)
+ switch (adev->asic_type) {
+ case CHIP_VEGA10:
+ case CHIP_RAVEN:
++ case CHIP_ARCTURUS:
+ return true;
+ case CHIP_VEGA12:
+ case CHIP_VEGA20:
+@@ -938,7 +939,7 @@ static int gmc_v9_0_gart_init(struct amdgpu_device *adev)
+
+ static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev)
+ {
+- u32 d1vga_control = RREG32_SOC15(DCE, 0, mmD1VGA_CONTROL);
++ u32 d1vga_control;
+ unsigned size;
+
+ /*
+@@ -948,6 +949,7 @@ static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev)
+ if (gmc_v9_0_keep_stolen_memory(adev))
+ return 9 * 1024 * 1024;
+
++ d1vga_control = RREG32_SOC15(DCE, 0, mmD1VGA_CONTROL);
+ if (REG_GET_FIELD(d1vga_control, D1VGA_CONTROL, D1VGA_MODE_ENABLE)) {
+ size = 9 * 1024 * 1024; /* reserve 8MB for vga emulator and 1 MB for FB */
+ } else {
+--
+2.17.1
+