* [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
@ 2019-02-15 21:25 Liu, Shaoyun
[not found] ` <1550265947-27948-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Liu, Shaoyun @ 2019-02-15 21:25 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun
When DPM for the specific clock is difabled, driver should still able to
get fix clock info from the pptable
Change-Id: Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index aad79aff..2eae0b4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -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;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
[not found] ` <1550265947-27948-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-19 17:08 ` Huang, JinHuiEric
[not found] ` <46cb8d19-c218-a4b4-fd4d-b84d227eb16f-5C7GfCeVMHo@public.gmane.org>
2019-02-20 2:25 ` Quan, Evan
1 sibling, 1 reply; 6+ messages in thread
From: Huang, JinHuiEric @ 2019-02-19 17:08 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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
On 2019-02-15 4:25 p.m., Liu, Shaoyun wrote:
> When DPM for the specific clock is difabled, driver should still able to
> get fix clock info from the pptable
>
> Change-Id: Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> index aad79aff..2eae0b4 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> @@ -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;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
[not found] ` <46cb8d19-c218-a4b4-fd4d-b84d227eb16f-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-19 19:51 ` Kuehling, Felix
[not found] ` <81292437-4c40-7428-fa87-d67f04868f4f-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Kuehling, Felix @ 2019-02-19 19:51 UTC (permalink / raw)
To: Huang, JinHuiEric, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Russell, Kent
[+Kent]
On 2019-02-19 12:08 p.m., Huang, JinHuiEric wrote:
> 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
>
> Regards,
>
> Eric
>
> On 2019-02-15 4:25 p.m., Liu, Shaoyun wrote:
>> When DPM for the specific clock is difabled, driver should still able to
>> get fix clock info from the pptable
>>
>> Change-Id: Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
>> ---
>> drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
>> 1 file changed, 16 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>> index aad79aff..2eae0b4 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>> @@ -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;
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
[not found] ` <81292437-4c40-7428-fa87-d67f04868f4f-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-19 19:57 ` Huang, JinHuiEric
[not found] ` <f70d16ca-df96-8cd5-dbb6-30ecdfdae4f5-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Huang, JinHuiEric @ 2019-02-19 19:57 UTC (permalink / raw)
To: Kuehling, Felix, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Russell, Kent
"rocm-smi -s" doesn't parse output from driver and it directly display
output, so it will not break rocm-smi.
Regards,
Eric
On 2019-02-19 2:51 p.m., Kuehling, Felix wrote:
> [+Kent]
>
> On 2019-02-19 12:08 p.m., Huang, JinHuiEric wrote:
>
>> 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
>
>
>> Regards,
>>
>> Eric
>>
>> On 2019-02-15 4:25 p.m., Liu, Shaoyun wrote:
>>> When DPM for the specific clock is difabled, driver should still able to
>>> get fix clock info from the pptable
>>>
>>> Change-Id: Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
>>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ----------------
>>> 1 file changed, 16 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>>> index aad79aff..2eae0b4 100644
>>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
>>> @@ -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;
>>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
[not found] ` <1550265947-27948-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-02-19 17:08 ` Huang, JinHuiEric
@ 2019-02-20 2:25 ` Quan, Evan
1 sibling, 0 replies; 6+ messages in thread
From: Quan, Evan @ 2019-02-20 2:25 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun
Reviewed-by: Evan Quan <evan.quan@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Liu,
> Shaoyun
> Sent: 2019年2月16日 5:26
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Shaoyun <Shaoyun.Liu@amd.com>
> 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
> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 --------------
> --
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> index aad79aff..2eae0b4 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> @@ -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;
>
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock
[not found] ` <f70d16ca-df96-8cd5-dbb6-30ecdfdae4f5-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-20 13:35 ` Russell, Kent
0 siblings, 0 replies; 6+ messages in thread
From: Russell, Kent @ 2019-02-20 13:35 UTC (permalink / raw)
To: Huang, JinHuiEric, Kuehling, Felix,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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
> -----Original Message-----
> From: Huang, JinHuiEric
> Sent: Tuesday, February 19, 2019 2:58 PM
> To: Kuehling, Felix <Felix.Kuehling@amd.com>; amd-
> gfx@lists.freedesktop.org; Russell, Kent <Kent.Russell@amd.com>
> 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
>
> On 2019-02-19 2:51 p.m., Kuehling, Felix wrote:
> > [+Kent]
> >
> > On 2019-02-19 12:08 p.m., Huang, JinHuiEric wrote:
> >
> >> 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
> >
> >
> >> Regards,
> >>
> >> Eric
> >>
> >> On 2019-02-15 4:25 p.m., Liu, Shaoyun wrote:
> >>> When DPM for the specific clock is difabled, driver should still
> >>> able to get fix clock info from the pptable
> >>>
> >>> Change-Id: Ic609203b3b87aa75b0cfd57b57717b3bb89daf48
> >>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
> >>> ---
> >>> drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 -------
> ---------
> >>> 1 file changed, 16 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> >>> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> >>> index aad79aff..2eae0b4 100644
> >>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> >>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
> >>> @@ -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;
> >>>
> >> _______________________________________________
> >> amd-gfx mailing list
> >> amd-gfx@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-20 13:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 21:25 [PATCH] drm/powerplay: Get fix clock info when dpm is disabled for the clock Liu, Shaoyun
[not found] ` <1550265947-27948-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-02-19 17:08 ` Huang, JinHuiEric
[not found] ` <46cb8d19-c218-a4b4-fd4d-b84d227eb16f-5C7GfCeVMHo@public.gmane.org>
2019-02-19 19:51 ` Kuehling, Felix
[not found] ` <81292437-4c40-7428-fa87-d67f04868f4f-5C7GfCeVMHo@public.gmane.org>
2019-02-19 19:57 ` Huang, JinHuiEric
[not found] ` <f70d16ca-df96-8cd5-dbb6-30ecdfdae4f5-5C7GfCeVMHo@public.gmane.org>
2019-02-20 13:35 ` Russell, Kent
2019-02-20 2:25 ` Quan, Evan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.