aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch
new file mode 100644
index 00000000..843e4463
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1923-amdgpu-pp-move-amdgpu_fuses_default-into-static-cons.patch
@@ -0,0 +1,73 @@
+From 426cbc32a0d189018cd513fd9ac3496ad82ac422 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 28 Sep 2017 09:36:55 +1000
+Subject: [PATCH 1923/4131] amdgpu/pp: move amdgpu_fuses_default into static
+ const.
+
+There is no reason that this gets passed back into the function
+from outside the file, just reference the table directly.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 4 ++--
+ drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h | 2 --
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +-
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
+index 02d7550..90b2249 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
+@@ -2,7 +2,7 @@
+ #include "pp_overdriver.h"
+ #include <linux/errno.h>
+
+-const struct phm_fuses_default vega10_fuses_default[] = {
++static const struct phm_fuses_default vega10_fuses_default[] = {
+ {"0000001000010011111010101001010011011110000011100100100101100100",0x00003C96,0xFFFFE226,0x00000656,0x00002203,0xFFFFF201,0x000003FF,0x00002203,0xFFFFF201,0x000003FF},
+ {"0000001000010011111010101001010011011110000010100001100010000100",0x00003CC5,0xFFFFE23A,0x0000064E,0x00002258,0xFFFFF1F7,0x000003FC,0x00002258,0xFFFFF1F7,0x000003FC},
+ {"0000001000010011111010101001010011011110000011100011000110100100",0x00003CAF,0xFFFFE36E,0x00000602,0x00001E98,0xFFFFF569,0x00000357,0x00001E98,0xFFFFF569,0x00000357},
+@@ -1241,9 +1241,9 @@ const struct phm_fuses_default vega10_fuses_default[] = {
+ };
+
+ int pp_override_get_default_fuse_value(uint64_t key,
+- const struct phm_fuses_default list[],
+ struct phm_fuses_default *result)
+ {
++ const struct phm_fuses_default *list = vega10_fuses_default;
+ uint32_t i;
+ uint64_t temp_serial_numer;
+ uint32_t bit;
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h
+index 133745f..22e2dd0 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h
+@@ -40,9 +40,7 @@ struct phm_fuses_default {
+ uint32_t VFT0_b;
+ };
+
+-extern const struct phm_fuses_default vega10_fuses_default[];
+ extern int pp_override_get_default_fuse_value(uint64_t key,
+- const struct phm_fuses_default list[],
+ struct phm_fuses_default *result);
+
+ #endif
+\ No newline at end of file
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+index b97b141..5f2e789 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+@@ -2393,7 +2393,7 @@ static int vega10_populate_and_upload_avfs_fuse_override(struct pp_hwmgr *hwmgr)
+
+ serial_number = ((uint64_t)bottom32 << 32) | top32;
+
+- if (pp_override_get_default_fuse_value(serial_number, vega10_fuses_default, &fuse) == 0) {
++ if (pp_override_get_default_fuse_value(serial_number, &fuse) == 0) {
+ avfs_fuse_table->VFT0_b = fuse.VFT0_b;
+ avfs_fuse_table->VFT0_m1 = fuse.VFT0_m1;
+ avfs_fuse_table->VFT0_m2 = fuse.VFT0_m2;
+--
+2.7.4
+