[PATCH] drm/amd/powerplay: delete pp dead code on raven
Rex Zhu
Rex.Zhu at amd.com
Fri Aug 25 10:18:08 UTC 2017
Change-Id: Ib2a3cd06c540a90eb33fc9e4ce0f3122c5f2c0d3
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 66 --------------------------
1 file changed, 66 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
index a5fa546..ebbee5f 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
@@ -49,29 +49,6 @@
int rv_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
struct pp_display_clock_request *clock_req);
-struct phm_vq_budgeting_record rv_vqtable[] = {
-/* CUs, SSP low, SSP High, Display Configuration, AWD/non-AWD,
- * Sustainable GFXCLK, Sustainable FCLK, Sustainable CUs,
- * unused, unused, unused
- */
- { 11, 30, 60, VQ_DisplayConfig_NoneAWD, 80000, 160000, 11, 0, 0, 0 },
- { 11, 30, 60, VQ_DisplayConfig_AWD, 80000, 160000, 11, 0, 0, 0 },
-
- { 8, 30, 60, VQ_DisplayConfig_NoneAWD, 100000, 160000, 8, 0, 0, 0 },
- { 8, 30, 60, VQ_DisplayConfig_AWD, 100000, 160000, 8, 0, 0, 0 },
-
- { 10, 12, 30, VQ_DisplayConfig_NoneAWD, 40000, 120000, 10, 0, 0, 0 },
- { 10, 12, 30, VQ_DisplayConfig_AWD, 40000, 120000, 10, 0, 0, 0 },
-
- { 8, 12, 30, VQ_DisplayConfig_NoneAWD, 45000, 120000, 8, 0, 0, 0 },
- { 8, 12, 30, VQ_DisplayConfig_AWD, 45000, 120000, 8, 0, 0, 0 },
-
- { 6, 12, 30, VQ_DisplayConfig_NoneAWD, 45000, 120000, 6, 0, 0, 0 },
- { 6, 12, 30, VQ_DisplayConfig_AWD, 45000, 120000, 6, 0, 0, 0 },
-
- { 3, 12, 30, VQ_DisplayConfig_NoneAWD, 45000, 120000, 3, 0, 0, 0 },
- { 3, 12, 30, VQ_DisplayConfig_AWD, 45000, 120000, 3, 0, 0, 0 },
-};
static struct rv_power_state *cast_rv_ps(struct pp_hw_power_state *hw_ps)
{
@@ -90,42 +67,6 @@ static const struct rv_power_state *cast_const_rv_ps(
return (struct rv_power_state *)hw_ps;
}
-static int rv_init_vq_budget_table(struct pp_hwmgr *hwmgr)
-{
- uint32_t table_size, i;
- struct phm_vq_budgeting_table *ptable;
- uint32_t num_entries = ARRAY_SIZE(rv_vqtable);
-
- if (hwmgr->dyn_state.vq_budgeting_table != NULL)
- return 0;
-
- table_size = sizeof(struct phm_vq_budgeting_table) +
- sizeof(struct phm_vq_budgeting_record) * (num_entries - 1);
-
- ptable = kzalloc(table_size, GFP_KERNEL);
- if (NULL == ptable)
- return -ENOMEM;
-
- ptable->numEntries = (uint8_t) num_entries;
-
- for (i = 0; i < ptable->numEntries; i++) {
- ptable->entries[i].ulCUs = rv_vqtable[i].ulCUs;
- ptable->entries[i].ulSustainableSOCPowerLimitLow = rv_vqtable[i].ulSustainableSOCPowerLimitLow;
- ptable->entries[i].ulSustainableSOCPowerLimitHigh = rv_vqtable[i].ulSustainableSOCPowerLimitHigh;
- ptable->entries[i].ulMinSclkLow = rv_vqtable[i].ulMinSclkLow;
- ptable->entries[i].ulMinSclkHigh = rv_vqtable[i].ulMinSclkHigh;
- ptable->entries[i].ucDispConfig = rv_vqtable[i].ucDispConfig;
- ptable->entries[i].ulDClk = rv_vqtable[i].ulDClk;
- ptable->entries[i].ulEClk = rv_vqtable[i].ulEClk;
- ptable->entries[i].ulSustainableSclk = rv_vqtable[i].ulSustainableSclk;
- ptable->entries[i].ulSustainableCUs = rv_vqtable[i].ulSustainableCUs;
- }
-
- hwmgr->dyn_state.vq_budgeting_table = ptable;
-
- return 0;
-}
-
static int rv_initialize_dpm_defaults(struct pp_hwmgr *hwmgr)
{
struct rv_hwmgr *rv_hwmgr = (struct rv_hwmgr *)(hwmgr->backend);
@@ -589,8 +530,6 @@ static int rv_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
hwmgr->platform_descriptor.minimumClocksReductionPercentage = 50;
- rv_init_vq_budget_table(hwmgr);
-
return result;
}
@@ -635,11 +574,6 @@ static int rv_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
}
- if (NULL != hwmgr->dyn_state.vq_budgeting_table) {
- kfree(hwmgr->dyn_state.vq_budgeting_table);
- hwmgr->dyn_state.vq_budgeting_table = NULL;
- }
-
kfree(hwmgr->backend);
hwmgr->backend = NULL;
--
1.9.1
More information about the amd-gfx
mailing list