aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch')
-rw-r--r--common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch b/common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch
new file mode 100644
index 00000000..845a027e
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0370-drm-amdgpu-Add-Fiji-support-to-the-GMC-8.5-IP-module.patch
@@ -0,0 +1,98 @@
+From 127a262853a4ca8a9284f58241c733ff074f8327 Mon Sep 17 00:00:00 2001
+From: David Zhang <david1.zhang@amd.com>
+Date: Wed, 8 Jul 2015 01:11:52 +0800
+Subject: [PATCH 0370/1050] drm/amdgpu: Add Fiji support to the GMC 8.5 IP
+ module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: David Zhang <david1.zhang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 25 +++++++++++++++++++++++++
+ drivers/gpu/drm/amd/amdgpu/vi.c | 9 ++++++++-
+ 2 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+index 3b54ed8..78109b7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+@@ -44,6 +44,7 @@ static void gmc_v8_0_set_irq_funcs(struct amdgpu_device *adev);
+
+ MODULE_FIRMWARE("amdgpu/topaz_mc.bin");
+ MODULE_FIRMWARE("amdgpu/tonga_mc.bin");
++MODULE_FIRMWARE("amdgpu/fiji_mc.bin");
+
+ static const u32 golden_settings_tonga_a11[] =
+ {
+@@ -61,6 +62,19 @@ static const u32 tonga_mgcg_cgcg_init[] =
+ mmMC_MEM_POWER_LS, 0xffffffff, 0x00000104
+ };
+
++static const u32 golden_settings_fiji_a10[] =
++{
++ mmVM_PRT_APERTURE0_LOW_ADDR, 0x0fffffff, 0x0fffffff,
++ mmVM_PRT_APERTURE1_LOW_ADDR, 0x0fffffff, 0x0fffffff,
++ mmVM_PRT_APERTURE2_LOW_ADDR, 0x0fffffff, 0x0fffffff,
++ mmVM_PRT_APERTURE3_LOW_ADDR, 0x0fffffff, 0x0fffffff,
++};
++
++static const u32 fiji_mgcg_cgcg_init[] =
++{
++ mmMC_MEM_POWER_LS, 0xffffffff, 0x00000104
++};
++
+ static const u32 golden_settings_iceland_a11[] =
+ {
+ mmVM_PRT_APERTURE0_LOW_ADDR, 0x0fffffff, 0x0fffffff,
+@@ -90,6 +104,14 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev)
+ golden_settings_iceland_a11,
+ (const u32)ARRAY_SIZE(golden_settings_iceland_a11));
+ break;
++ case CHIP_FIJI:
++ amdgpu_program_register_sequence(adev,
++ fiji_mgcg_cgcg_init,
++ (const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init));
++ amdgpu_program_register_sequence(adev,
++ golden_settings_fiji_a10,
++ (const u32)ARRAY_SIZE(golden_settings_fiji_a10));
++ break;
+ case CHIP_TONGA:
+ amdgpu_program_register_sequence(adev,
+ tonga_mgcg_cgcg_init,
+@@ -202,6 +224,9 @@ static int gmc_v8_0_init_microcode(struct amdgpu_device *adev)
+ case CHIP_TONGA:
+ chip_name = "tonga";
+ break;
++ case CHIP_FIJI:
++ chip_name = "fiji";
++ break;
+ case CHIP_CARRIZO:
+ return 0;
+ default: BUG();
+diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
+index 7d1ae24..e295088 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vi.c
++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
+@@ -1173,7 +1173,14 @@ static const struct amdgpu_ip_block_version fiji_ip_blocks[] =
+ .minor = 0,
+ .rev = 0,
+ .funcs = &vi_common_ip_funcs,
+- }
++ },
++ {
++ .type = AMD_IP_BLOCK_TYPE_GMC,
++ .major = 8,
++ .minor = 5,
++ .rev = 0,
++ .funcs = &gmc_v8_0_ip_funcs,
++ },
+ };
+
+ static const struct amdgpu_ip_block_version cz_ip_blocks[] =
+--
+1.9.1
+