Skip to contentSkip to conversation

drm/amd/powerplay: delete pp dead code on raven

PATCH In review Rex Zhu 3 participants 3 messages Aug 25, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: delete pp dead code on raven

Change-Id Ib2a3cd06c540a90eb33fc9e4ce0f3122c5f2c0d3
---
 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 66 --------------------------
 1 file changed, 66 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +0 -66
index a5fa546..ebbee5f 100644
@@ -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;
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1503656288-15474-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Hawking Zhang
#2 lore raw

Regards,
Hawking
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Friday, August 25, 2017 18:18
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH] drm/amd/powerplay: delete pp dead code on raven

Change-Id Ib2a3cd06c540a90eb33fc9e4ce0f3122c5f2c0d3
---
 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 66 --------------------------
 1 file changed, 66 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +0 -23
index a5fa546..ebbee5f 100644
@@ -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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · Rex Zhu
Change-Id Ib2a3cd06c540a90eb33fc9e4ce0f3122c5f2c0d3
Quoted 105 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 66 --------------------------
 1 file changed, 66 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +0 -67
index a5fa546..ebbee5f 100644
@@ -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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx