Skip to contentSkip to conversation

drm/powerplay: Get fix clock info when dpm is disabled for the clock

PATCH In review Liu, Shaoyun 5 participants 6 messages Feb 15, 2019 – Feb 20, 2019 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/powerplay: Get fix clock info when dpm is disabled for the clock

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -16
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.gfx_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_GFXCLK].enabled,
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-
 	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
 	clocks->num_levels = count;
 
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct pp_hwmgr *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.mem_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_UCLK].enabled,
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-
 	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
 	clocks->num_levels = data->mclk_latency_table.count = count;
 
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct pp_hwmgr *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.dcef_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_DCEFCLK].enabled,
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-
 	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
 	clocks->num_levels = count;
 
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct pp_hwmgr *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.soc_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_SOCCLK].enabled,
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-
 	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
 	clocks->num_levels = count;
 
Signature · 6 lines
2.7.4

_______________________________________________
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): 1550265947-27948-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org

#2 lore raw

It seems redundant to print out all DPM levels when DPM is disabled. Probably it looks meaningful to print out "<current clock>Mhz (DPM disabled)".

Regards,

Eric

Quoted 47 lines · Shaoyun

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
  drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
  1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -12
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr *hwmgr,
  	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.gfx_table);
  	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_GFXCLK].enabled,
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-
  	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
  	clocks->num_levels = count;
 
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct pp_hwmgr *hwmgr,
  	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.mem_table);
  	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_UCLK].enabled,
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-
  	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
  	clocks->num_levels = data->mclk_latency_table.count = count;
 
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct pp_hwmgr *hwmgr,
  	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.dcef_table);
  	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_DCEFCLK].enabled,
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-
  	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
  	clocks->num_levels = count;
 

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct pp_hwmgr *hwmgr, · line 2712

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct pp_hwmgr *hwmgr,
  	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.soc_table);
  	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_SOCCLK].enabled,
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-
  	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
  	clocks->num_levels = count;
 

_______________________________________________
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): 46cb8d19-c218-a4b4-fd4d-b84d227eb16f-5C7GfCeVMHo@public.gmane.org

#4 lore raw

[+Kent]

Quoted 3 lines · JinHuiEric

It seems redundant to print out all DPM levels when DPM is disabled. Probably it looks meaningful to print out "<current clock>Mhz (DPM disabled)".

If you change the format, you risk breaking tools such as rocm-smi. Is there some other way for rocm-smi to tell that DPM is disabled?

Regards,
  Felix

Quoted 56 lines

Regards,

Eric

Quoted 50 lines · Shaoyun

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
   drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
   1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -12
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr *hwmgr,
   	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.gfx_table);
   	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_GFXCLK].enabled,
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-
   	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
   	clocks->num_levels = count;
 
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct pp_hwmgr *hwmgr,
   	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.mem_table);
   	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_UCLK].enabled,
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-
   	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
   	clocks->num_levels = data->mclk_latency_table.count = count;
 
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct pp_hwmgr *hwmgr,
   	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.dcef_table);
   	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_DCEFCLK].enabled,
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-
   	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
   	clocks->num_levels = count;
 
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct pp_hwmgr *hwmgr,
   	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.soc_table);
   	int i, count;
 
Quoted 11 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct pp_hwmgr *hwmgr, · line 2712

Quoted 7 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_SOCCLK].enabled,
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-
   	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
   	clocks->num_levels = count;
 

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): 81292437-4c40-7428-fa87-d67f04868f4f-5C7GfCeVMHo@public.gmane.org

#6 lore raw

"rocm-smi -s" doesn't parse output from driver and it directly display output, so it will not break rocm-smi.

Regards,

Eric

Quoted 4 lines · Felix

[+Kent]

On 2019-02-19 12:08 p.m., Huang, JinHuiEric wrote:

Quoted 76 lines
Quoted 3 lines

It seems redundant to print out all DPM levels when DPM is disabled. Probably it looks meaningful to print out "<current clock>Mhz (DPM disabled)".

If you change the format, you risk breaking tools such as rocm-smi. Is there some other way for rocm-smi to tell that DPM is disabled?

Regards,
  Felix

Quoted 66 lines

Regards,

Eric

Quoted 47 lines · Shaoyun

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
    drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
    1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -12
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr *hwmgr,
    	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.gfx_table);
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_GFXCLK].enabled,
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
    	clocks->num_levels = count;
 
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct pp_hwmgr *hwmgr,
    	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.mem_table);
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_UCLK].enabled,
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
    	clocks->num_levels = data->mclk_latency_table.count = count;
 
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct pp_hwmgr *hwmgr,
    	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.dcef_table);
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_DCEFCLK].enabled,
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
    	clocks->num_levels = count;
 

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct pp_hwmgr *hwmgr, · line 2712

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct pp_hwmgr *hwmgr,
    	struct vega20_single_dpm_table *dpm_table = &(data->dpm_table.soc_table);
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data->smu_features[GNLD_DPM_SOCCLK].enabled,
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count;
    	clocks->num_levels = count;
 

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): f70d16ca-df96-8cd5-dbb6-30ecdfdae4f5-5C7GfCeVMHo@public.gmane.org

#8 lore raw

Eric's right. For now, we have a function that is a generic isDPMAvailable, that checks for the presence of the "dpm_state" sysfs file. In this case if we only have 1 clock available, it will just report that one clock for all outputs. So the SMI can handle this effectively. Thanks for checking though Felix, I definitely appreciate it.

Kent

Quoted 101 lines

-----Original Message-----
From: Huang, JinHuiEric
Sent: Tuesday, February 19, 2019 2:58 PM
To: Kuehling, Felix <[email protected]>; amd- [email protected]; Russell, Kent <[email protected]>
Subject: Re: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock

"rocm-smi -s" doesn't parse output from driver and it directly display output, so it will not break rocm-smi.

Regards,

Eric

Quoted 4 lines · Felix

[+Kent]

On 2019-02-19 12:08 p.m., Huang, JinHuiEric wrote:

Quoted 22 lines
Quoted 3 lines

It seems redundant to print out all DPM levels when DPM is disabled. Probably it looks meaningful to print out "<current clock>Mhz (DPM disabled)".

If you change the format, you risk breaking tools such as rocm-smi. Is there some other way for rocm-smi to tell that DPM is disabled?

Regards,
  Felix

Quoted 12 lines

Regards,

Eric

Quoted 7 lines · Shaoyun

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
    drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 -------

---------

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_sclks(struct pp_hwmgr

Quoted 8 lines
    1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr

*hwmgr,

Quoted 10 lines
Quoted 1 line

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_sclks(struct pp_hwmgr · line 2641

Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	struct vega20_single_dpm_table *dpm_table = &(data-

dpm_table.gfx_table);

Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_sclks(struct pp_hwmgr · line 2644

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -1
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-

smu_features[GNLD_DPM_GFXCLK].enabled,

Quoted 4 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_sclks(struct pp_hwmgr · line 2644

Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -3
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ?

MAX_NUM_CLOCKS : dpm_table->count;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_memclocks(struct

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	clocks->num_levels = count;
 
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct

pp_hwmgr *hwmgr,

Quoted 10 lines
Quoted 1 line

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_memclocks(struct · line 2666

Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	struct vega20_single_dpm_table *dpm_table = &(data-

dpm_table.mem_table);

Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_memclocks(struct · line 2673

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -1
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-

smu_features[GNLD_DPM_UCLK].enabled,

Quoted 4 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_memclocks(struct · line 2669

Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -3
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ?

MAX_NUM_CLOCKS : dpm_table->count;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_dcefclocks(struct

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	clocks->num_levels = data->mclk_latency_table.count = count;
 
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct

pp_hwmgr *hwmgr,

Quoted 10 lines
Quoted 1 line

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_dcefclocks(struct · line 2688

Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	struct vega20_single_dpm_table *dpm_table = &(data-

dpm_table.dcef_table);

Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_dcefclocks(struct · line 2699

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -1
    	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-

smu_features[GNLD_DPM_DCEFCLK].enabled,

Quoted 4 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_dcefclocks(struct · line 2691

Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -3
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ?

MAX_NUM_CLOCKS : dpm_table->count;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct

Quoted 3 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	clocks->num_levels = count;
 
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct

pp_hwmgr *hwmgr,

Quoted 4 lines
Quoted 1 line

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct · line 2707

Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	struct vega20_single_dpm_table *dpm_table = &(data-

dpm_table.soc_table);

Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	int i, count;
 
Quoted 13 lines
Quoted 6 lines
Quoted 1 line

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct · line 2722

Quoted 1 line
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -1
-	PP_ASSERT_WITH_CODE(data-

smu_features[GNLD_DPM_SOCCLK].enabled,

Quoted 4 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct · line 2710

Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -3
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-
    	count = (dpm_table->count > MAX_NUM_CLOCKS) ?

MAX_NUM_CLOCKS : dpm_table->count;

Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c static int vega20_get_socclocks(struct · line 2712

Quoted 2 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -0
    	clocks->num_levels = count;
 

_______________________________________________
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 Evan Quan
#9 lore raw
In reply to a message not in the archive
Quoted 84 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liu, Shaoyun
Sent: 2019年2月16日 5:26
To: [email protected]
Cc: Liu, Shaoyun <[email protected]>
Subject: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock

When DPM for the specific clock is difabled, driver should still able to get fix clock info from the pptable

Change-Id Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 --------------
--
 1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
index aad79aff..2eae0b4 100644
@@ -2641,10 +2641,6 @@ static int vega20_get_sclks(struct pp_hwmgr
 *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data-
 >dpm_table.gfx_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-
 >smu_features[GNLD_DPM_GFXCLK].enabled,
-		"[GetSclks]: gfxclk dpm not enabled!\n",
-		return -EPERM);
-

count = (dpm_table->count > MAX_NUM_CLOCKS) ?
MAX_NUM_CLOCKS : dpm_table->count;

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
 	clocks->num_levels = count;
@@ -2670,10 +2666,6 @@ static int vega20_get_memclocks(struct
 pp_hwmgr *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data-
 >dpm_table.mem_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-
 >smu_features[GNLD_DPM_UCLK].enabled,
-		"[GetMclks]: uclk dpm not enabled!\n",
-		return -EPERM);
-

count = (dpm_table->count > MAX_NUM_CLOCKS) ?
MAX_NUM_CLOCKS : dpm_table->count;

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
 	clocks->num_levels = data->mclk_latency_table.count = count;
@@ -2696,10 +2688,6 @@ static int vega20_get_dcefclocks(struct pp_hwmgr
 *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data-
 >dpm_table.dcef_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-
 >smu_features[GNLD_DPM_DCEFCLK].enabled,
-		"[GetDcfclocks]: dcefclk dpm not enabled!\n",
-		return -EPERM);
-

count = (dpm_table->count > MAX_NUM_CLOCKS) ?
MAX_NUM_CLOCKS : dpm_table->count;

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0 -4
 	clocks->num_levels = count;
@@ -2719,10 +2707,6 @@ static int vega20_get_socclocks(struct pp_hwmgr
 *hwmgr,
 	struct vega20_single_dpm_table *dpm_table = &(data-
 >dpm_table.soc_table);
 	int i, count;
 
-	PP_ASSERT_WITH_CODE(data-
 >smu_features[GNLD_DPM_SOCCLK].enabled,
-		"[GetSocclks]: socclk dpm not enabled!\n",
-		return -EPERM);
-

count = (dpm_table->count > MAX_NUM_CLOCKS) ?
MAX_NUM_CLOCKS : dpm_table->count;
clocks->num_levels = count;

Quoted 7 lines

--
2.7.4

_______________________________________________
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