aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch')
-rw-r--r--common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch96
1 files changed, 0 insertions, 96 deletions
diff --git a/common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch b/common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
deleted file mode 100644
index 435b3581..00000000
--- a/common/recipes-kernel/linux/files/1029-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From dc08bc87736f8aa882c78d2de63371984ce0e9bf Mon Sep 17 00:00:00 2001
-From: Eric Huang <JinHuiEric.Huang@amd.com>
-Date: Fri, 15 Apr 2016 17:14:53 -0400
-Subject: [PATCH 1029/1110] drm/amd/powerplay: revise reading/writing pptable
- on Tonga
-
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 37 +++++++++++++++--------
- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 2 ++
- 2 files changed, 27 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
-index 0d9cf4d..bc61c07 100644
---- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
-+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
-@@ -4443,17 +4443,14 @@ int tonga_reset_asic_tasks(struct pp_hwmgr *hwmgr)
-
- int tonga_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
- {
-- if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) {
-- kfree(hwmgr->dyn_state.vddc_dep_on_dal_pwrl);
-- hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
-- }
-+ struct tonga_hwmgr *data = (struct tonga_hwmgr *)(hwmgr->backend);
-
-- if (NULL != hwmgr->backend) {
-- kfree(hwmgr->backend);
-- hwmgr->backend = NULL;
-+ if (data->soft_pp_table) {
-+ kfree(data->soft_pp_table);
-+ data->soft_pp_table = NULL;
- }
-
-- return 0;
-+ return phm_hwmgr_backend_fini(hwmgr);
- }
-
- /**
-@@ -6058,18 +6055,34 @@ static int tonga_get_pp_table(struct pp_hwmgr *hwmgr, char **table)
- {
- struct tonga_hwmgr *data = (struct tonga_hwmgr *)(hwmgr->backend);
-
-- *table = (char *)&data->smc_state_table;
-+ if (!data->soft_pp_table) {
-+ data->soft_pp_table = kzalloc(hwmgr->soft_pp_table_size, GFP_KERNEL);
-+ if (!data->soft_pp_table)
-+ return -ENOMEM;
-+ memcpy(data->soft_pp_table, hwmgr->soft_pp_table,
-+ hwmgr->soft_pp_table_size);
-+ }
-+
-+ *table = (char *)&data->soft_pp_table;
-
-- return sizeof(struct SMU72_Discrete_DpmTable);
-+ return hwmgr->soft_pp_table_size;
- }
-
- static int tonga_set_pp_table(struct pp_hwmgr *hwmgr, const char *buf, size_t size)
- {
- struct tonga_hwmgr *data = (struct tonga_hwmgr *)(hwmgr->backend);
-
-- void *table = (void *)&data->smc_state_table;
-+ if (!data->soft_pp_table) {
-+ data->soft_pp_table = kzalloc(hwmgr->soft_pp_table_size, GFP_KERNEL);
-+ if (!data->soft_pp_table)
-+ return -ENOMEM;
-+ }
-+
-+ memcpy(data->soft_pp_table, buf, size);
-+
-+ hwmgr->soft_pp_table = data->soft_pp_table;
-
-- memcpy(table, buf, size);
-+ /* TODO: re-init powerplay to implement modified pptable */
-
- return 0;
- }
-diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
-index f88d3bb..c6a6b40 100644
---- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
-+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h
-@@ -353,6 +353,8 @@ struct tonga_hwmgr {
- bool acp_power_gated; /* 1: gated, 0:not gated */
- bool pg_acp_init;
-
-+ /* soft pptable for re-uploading into smu */
-+ void *soft_pp_table;
- };
-
- typedef struct tonga_hwmgr tonga_hwmgr;
---
-2.7.4
-