aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch')
-rw-r--r--common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch88
1 files changed, 0 insertions, 88 deletions
diff --git a/common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch b/common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
deleted file mode 100644
index 1eb1785b..00000000
--- a/common/recipes-kernel/linux/files/1030-drm-amd-powerplay-revise-reading-writing-pptable-on-.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From dc3a9282aa5b0953823710628c71160653dbcb44 Mon Sep 17 00:00:00 2001
-From: Eric Huang <JinHuiEric.Huang@amd.com>
-Date: Fri, 15 Apr 2016 17:23:14 -0400
-Subject: [PATCH 1030/1110] drm/amd/powerplay: revise reading/writing pptable
- on Polaris10
-
-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>
----
- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 31 +++++++++++++++++++---
- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 3 +++
- 2 files changed, 30 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
-index 3e59a87..d9948c0 100644
---- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
-+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
-@@ -2560,6 +2560,13 @@ int polaris10_reset_asic_tasks(struct pp_hwmgr *hwmgr)
-
- int polaris10_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
- {
-+ struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);
-+
-+ if (data->soft_pp_table) {
-+ kfree(data->soft_pp_table);
-+ data->soft_pp_table = NULL;
-+ }
-+
- return phm_hwmgr_backend_fini(hwmgr);
- }
-
-@@ -4750,18 +4757,34 @@ static int polaris10_get_pp_table(struct pp_hwmgr *hwmgr, char **table)
- {
- struct polaris10_hwmgr *data = (struct polaris10_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);
-+ }
-
-- return sizeof(struct SMU74_Discrete_DpmTable);
-+ *table = (char *)&data->soft_pp_table;
-+
-+ return hwmgr->soft_pp_table_size;
- }
-
- static int polaris10_set_pp_table(struct pp_hwmgr *hwmgr, const char *buf, size_t size)
- {
- struct polaris10_hwmgr *data = (struct polaris10_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/polaris10_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h
-index 2507404..b022964 100644
---- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h
-+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h
-@@ -309,6 +309,9 @@ struct polaris10_hwmgr {
- uint32_t up_hyst;
- uint32_t disable_dpm_mask;
- bool apply_optimized_settings;
-+
-+ /* soft pptable for re-uploading into smu */
-+ void *soft_pp_table;
- };
-
- /* To convert to Q8.8 format for firmware */
---
-2.7.4
-