* [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
@ 2018-02-08 11:20 Rex Zhu
[not found] ` <1518088825-4744-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Rex Zhu @ 2018-02-08 11:20 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
Disable AutoWattman (if enabled) when FreeSync is enabled.
Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
index 22c2fa3..f7bb565 100644
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
@@ -313,6 +313,7 @@ struct amd_pm_funcs {
int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
int (*set_mmhub_powergating_by_smu)(void *handle);
+ int (*notify_free_sync_change)(void *handle, bool en);
};
#endif
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 376ed2d..d0306b6 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
}
+static int pp_notify_free_sync_change(void *handle, bool en)
+{
+ struct pp_hwmgr *hwmgr;
+ struct pp_instance *pp_handle = (struct pp_instance *)handle;
+ int ret = 0;
+
+ ret = pp_check(pp_handle);
+
+ if (ret)
+ return ret;
+
+ hwmgr = pp_handle->hwmgr;
+
+ mutex_lock(&pp_handle->pp_lock);
+ if (hwmgr->autowattman_enabled) {
+ if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
+ if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
+ hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
+ }
+ }
+ mutex_unlock(&pp_handle->pp_lock);
+ return 0;
+}
+
const struct amd_pm_funcs pp_dpm_funcs = {
.load_firmware = pp_dpm_load_fw,
.wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
@@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
.display_clock_voltage_request = pp_display_clock_voltage_request,
.get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
.set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
+ .notify_free_sync_change = pp_notify_free_sync_change,
};
--
1.9.1
_______________________________________________
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/amd/pp: Expose new interface to DC to ctrl auto wattman
[not found] ` <1518088825-4744-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2018-02-08 14:22 ` Harry Wentland
[not found] ` <1a93901f-528c-b28e-d0c0-57809543a759-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2018-02-08 14:22 UTC (permalink / raw)
To: Rex Zhu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 2018-02-08 06:20 AM, Rex Zhu wrote:
> Disable AutoWattman (if enabled) when FreeSync is enabled.
Do you have a DC change calling this?
What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?
What does AutoWattman do?
Harry
>
> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> index 22c2fa3..f7bb565 100644
> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> @@ -313,6 +313,7 @@ struct amd_pm_funcs {
> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
> int (*set_mmhub_powergating_by_smu)(void *handle);
> + int (*notify_free_sync_change)(void *handle, bool en);
> };
>
> #endif
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 376ed2d..d0306b6 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
> }
>
> +static int pp_notify_free_sync_change(void *handle, bool en)
> +{
> + struct pp_hwmgr *hwmgr;
> + struct pp_instance *pp_handle = (struct pp_instance *)handle;
> + int ret = 0;
> +
> + ret = pp_check(pp_handle);
> +
> + if (ret)
> + return ret;
> +
> + hwmgr = pp_handle->hwmgr;
> +
> + mutex_lock(&pp_handle->pp_lock);
> + if (hwmgr->autowattman_enabled) {
> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
> + }
> + }
> + mutex_unlock(&pp_handle->pp_lock);
> + return 0;
> +}
> +
> const struct amd_pm_funcs pp_dpm_funcs = {
> .load_firmware = pp_dpm_load_fw,
> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
> .display_clock_voltage_request = pp_display_clock_voltage_request,
> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
> + .notify_free_sync_change = pp_notify_free_sync_change,
> };
>
_______________________________________________
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/amd/pp: Expose new interface to DC to ctrl auto wattman
[not found] ` <1a93901f-528c-b28e-d0c0-57809543a759-5C7GfCeVMHo@public.gmane.org>
@ 2018-02-08 15:07 ` Zhu, Rex
[not found] ` <CY4PR12MB16870B662724C2F6BD1A8014FBF30-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Zhu, Rex @ 2018-02-08 15:07 UTC (permalink / raw)
To: Wentland, Harry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 3362 bytes --]
when autowattman enabled,we will update uphyst/downhyst/min-sclk/mclk activity value to smu based on the workload.
Best Regards
Rex
________________________________
From: Wentland, Harry
Sent: Thursday, February 8, 2018 10:22:16 PM
To: Zhu, Rex; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
On 2018-02-08 06:20 AM, Rex Zhu wrote:
> Disable AutoWattman (if enabled) when FreeSync is enabled.
Do you have a DC change calling this?
What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?
What does AutoWattman do?
Harry
>
> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
> ---
> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> index 22c2fa3..f7bb565 100644
> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> @@ -313,6 +313,7 @@ struct amd_pm_funcs {
> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
> int (*set_mmhub_powergating_by_smu)(void *handle);
> + int (*notify_free_sync_change)(void *handle, bool en);
> };
>
> #endif
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 376ed2d..d0306b6 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
> }
>
> +static int pp_notify_free_sync_change(void *handle, bool en)
> +{
> + struct pp_hwmgr *hwmgr;
> + struct pp_instance *pp_handle = (struct pp_instance *)handle;
> + int ret = 0;
> +
> + ret = pp_check(pp_handle);
> +
> + if (ret)
> + return ret;
> +
> + hwmgr = pp_handle->hwmgr;
> +
> + mutex_lock(&pp_handle->pp_lock);
> + if (hwmgr->autowattman_enabled) {
> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
> + }
> + }
> + mutex_unlock(&pp_handle->pp_lock);
> + return 0;
> +}
> +
> const struct amd_pm_funcs pp_dpm_funcs = {
> .load_firmware = pp_dpm_load_fw,
> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
> .display_clock_voltage_request = pp_display_clock_voltage_request,
> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
> + .notify_free_sync_change = pp_notify_free_sync_change,
> };
>
[-- Attachment #1.2: Type: text/html, Size: 5686 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
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/amd/pp: Expose new interface to DC to ctrl auto wattman
[not found] ` <CY4PR12MB16870B662724C2F6BD1A8014FBF30-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-02-08 15:10 ` Harry Wentland
[not found] ` <064c9f69-c87e-34c4-b55e-1a9fb43b6075-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2018-02-08 15:10 UTC (permalink / raw)
To: Zhu, Rex, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 2018-02-08 10:07 AM, Zhu, Rex wrote:
> when autowattman enabled,we will update uphyst/downhyst/min-sclk/mclk activity value to smu based on the workload.
>
Why is this incompatible with Freesync?
Harry
> Best Regards
> Rex
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Wentland, Harry
> *Sent:* Thursday, February 8, 2018 10:22:16 PM
> *To:* Zhu, Rex; amd-gfx@lists.freedesktop.org
> *Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
>
> On 2018-02-08 06:20 AM, Rex Zhu wrote:
>> Disable AutoWattman (if enabled) when FreeSync is enabled.
>
> Do you have a DC change calling this?
>
> What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?
>
> What does AutoWattman do?
>
> Harry
>
>>
>> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
>> ---
>> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
>> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
>> 2 files changed, 26 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> index 22c2fa3..f7bb565 100644
>> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> @@ -313,6 +313,7 @@ struct amd_pm_funcs {
>> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
>> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
>> int (*set_mmhub_powergating_by_smu)(void *handle);
>> + int (*notify_free_sync_change)(void *handle, bool en);
>> };
>>
>> #endif
>> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>> index 376ed2d..d0306b6 100644
>> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
>> }
>>
>> +static int pp_notify_free_sync_change(void *handle, bool en)
>> +{
>> + struct pp_hwmgr *hwmgr;
>> + struct pp_instance *pp_handle = (struct pp_instance *)handle;
>> + int ret = 0;
>> +
>> + ret = pp_check(pp_handle);
>> +
>> + if (ret)
>> + return ret;
>> +
>> + hwmgr = pp_handle->hwmgr;
>> +
>> + mutex_lock(&pp_handle->pp_lock);
>> + if (hwmgr->autowattman_enabled) {
>> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
>> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
>> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
>> + }
>> + }
>> + mutex_unlock(&pp_handle->pp_lock);
>> + return 0;
>> +}
>> +
>> const struct amd_pm_funcs pp_dpm_funcs = {
>> .load_firmware = pp_dpm_load_fw,
>> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
>> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>> .display_clock_voltage_request = pp_display_clock_voltage_request,
>> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
>> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
>> + .notify_free_sync_change = pp_notify_free_sync_change,
>> };
>>
_______________________________________________
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/amd/pp: Expose new interface to DC to ctrl auto wattman
[not found] ` <064c9f69-c87e-34c4-b55e-1a9fb43b6075-5C7GfCeVMHo@public.gmane.org>
@ 2018-02-08 15:28 ` Harry Wentland
[not found] ` <d1fde114-78ea-3a79-986a-b6292dde8115-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2018-02-08 15:28 UTC (permalink / raw)
To: Zhu, Rex, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Cyr, Aric, Koo, Anthony
On 2018-02-08 10:10 AM, Harry Wentland wrote:
> On 2018-02-08 10:07 AM, Zhu, Rex wrote:
>> when autowattman enabled,we will update uphyst/downhyst/min-sclk/mclk activity value to smu based on the workload.
>>
>
> Why is this incompatible with Freesync?
>
Just had a chat with the Windows guys. Apparently AutoWattman changes clocks quite aggressively which can make framerates jump significantly and lead to a subpar experience when using Freesync.
We'll still need a patch to call this interface from DC. Is that on your plate or is this something we should hook up?
Harry
> Harry
>
>> Best Regards
>> Rex
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Wentland, Harry
>> *Sent:* Thursday, February 8, 2018 10:22:16 PM
>> *To:* Zhu, Rex; amd-gfx@lists.freedesktop.org
>> *Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
>>
>> On 2018-02-08 06:20 AM, Rex Zhu wrote:
>>> Disable AutoWattman (if enabled) when FreeSync is enabled.
>>
>> Do you have a DC change calling this?
>>
>> What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?
>>
>> What does AutoWattman do?
>>
>> Harry
>>
>>>
>>> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
>>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
>>> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
>>> 2 files changed, 26 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> index 22c2fa3..f7bb565 100644
>>> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> @@ -313,6 +313,7 @@ struct amd_pm_funcs {
>>> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
>>> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
>>> int (*set_mmhub_powergating_by_smu)(void *handle);
>>> + int (*notify_free_sync_change)(void *handle, bool en);
>>> };
>>>
>>> #endif
>>> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> index 376ed2d..d0306b6 100644
>>> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>>> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
>>> }
>>>
>>> +static int pp_notify_free_sync_change(void *handle, bool en)
>>> +{
>>> + struct pp_hwmgr *hwmgr;
>>> + struct pp_instance *pp_handle = (struct pp_instance *)handle;
>>> + int ret = 0;
>>> +
>>> + ret = pp_check(pp_handle);
>>> +
>>> + if (ret)
>>> + return ret;
>>> +
>>> + hwmgr = pp_handle->hwmgr;
>>> +
>>> + mutex_lock(&pp_handle->pp_lock);
>>> + if (hwmgr->autowattman_enabled) {
>>> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
>>> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
>>> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
>>> + }
>>> + }
>>> + mutex_unlock(&pp_handle->pp_lock);
>>> + return 0;
>>> +}
>>> +
>>> const struct amd_pm_funcs pp_dpm_funcs = {
>>> .load_firmware = pp_dpm_load_fw,
>>> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
>>> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>>> .display_clock_voltage_request = pp_display_clock_voltage_request,
>>> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
>>> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
>>> + .notify_free_sync_change = pp_notify_free_sync_change,
>>> };
>>>
> _______________________________________________
> 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/amd/pp: Expose new interface to DC to ctrl auto wattman
[not found] ` <d1fde114-78ea-3a79-986a-b6292dde8115-5C7GfCeVMHo@public.gmane.org>
@ 2018-02-08 15:58 ` Zhu, Rex
0 siblings, 0 replies; 6+ messages in thread
From: Zhu, Rex @ 2018-02-08 15:58 UTC (permalink / raw)
To: Wentland, Harry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Cyr, Aric, Koo, Anthony
[-- Attachment #1.1: Type: text/plain, Size: 6111 bytes --]
Thanks Harry for clarify this question thoroughly.
>We'll still need a patch to call this interface from DC. Is that on your plate or is this something we should hook up?
No, I just implemented the interface in pp. DC need to call this function to enable/disable the auto wattman feature when Freesync disable/enable.
Best Regards
Rex
________________________________
From: Wentland, Harry
Sent: Thursday, February 8, 2018 11:28 PM
To: Zhu, Rex; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Koo, Anthony; Cyr, Aric
Subject: Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
On 2018-02-08 10:10 AM, Harry Wentland wrote:
> On 2018-02-08 10:07 AM, Zhu, Rex wrote:
>> when autowattman enabled,we will update uphyst/downhyst/min-sclk/mclk activity value to smu based on the workload.
>>
>
> Why is this incompatible with Freesync?
>
Just had a chat with the Windows guys. Apparently AutoWattman changes clocks quite aggressively which can make framerates jump significantly and lead to a subpar experience when using Freesync.
We'll still need a patch to call this interface from DC. Is that on your plate or is this something we should hook up?
Harry
> Harry
>
>> Best Regards
>> Rex
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Wentland, Harry
>> *Sent:* Thursday, February 8, 2018 10:22:16 PM
>> *To:* Zhu, Rex; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> *Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
>>
>> On 2018-02-08 06:20 AM, Rex Zhu wrote:
>>> Disable AutoWattman (if enabled) when FreeSync is enabled.
>>
>> Do you have a DC change calling this?
>>
>> What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?
>>
>> What does AutoWattman do?
>>
>> Harry
>>
>>>
>>> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002
>>> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
>>> ---
>>> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
>>> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++
>>> 2 files changed, 26 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> index 22c2fa3..f7bb565 100644
>>> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>>> @@ -313,6 +313,7 @@ struct amd_pm_funcs {
>>> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
>>> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
>>> int (*set_mmhub_powergating_by_smu)(void *handle);
>>> + int (*notify_free_sync_change)(void *handle, bool en);
>>> };
>>>
>>> #endif
>>> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> index 376ed2d..d0306b6 100644
>>> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>>> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>>> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
>>> }
>>>
>>> +static int pp_notify_free_sync_change(void *handle, bool en)
>>> +{
>>> + struct pp_hwmgr *hwmgr;
>>> + struct pp_instance *pp_handle = (struct pp_instance *)handle;
>>> + int ret = 0;
>>> +
>>> + ret = pp_check(pp_handle);
>>> +
>>> + if (ret)
>>> + return ret;
>>> +
>>> + hwmgr = pp_handle->hwmgr;
>>> +
>>> + mutex_lock(&pp_handle->pp_lock);
>>> + if (hwmgr->autowattman_enabled) {
>>> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {
>>> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))
>>> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);
>>> + }
>>> + }
>>> + mutex_unlock(&pp_handle->pp_lock);
>>> + return 0;
>>> +}
>>> +
>>> const struct amd_pm_funcs pp_dpm_funcs = {
>>> .load_firmware = pp_dpm_load_fw,
>>> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
>>> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)
>>> .display_clock_voltage_request = pp_display_clock_voltage_request,
>>> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
>>> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
>>> + .notify_free_sync_change = pp_notify_free_sync_change,
>>> };
>>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
>
[-- Attachment #1.2: Type: text/html, Size: 12950 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
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:[~2018-02-08 15:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 11:20 [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman Rex Zhu
[not found] ` <1518088825-4744-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-02-08 14:22 ` Harry Wentland
[not found] ` <1a93901f-528c-b28e-d0c0-57809543a759-5C7GfCeVMHo@public.gmane.org>
2018-02-08 15:07 ` Zhu, Rex
[not found] ` <CY4PR12MB16870B662724C2F6BD1A8014FBF30-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-02-08 15:10 ` Harry Wentland
[not found] ` <064c9f69-c87e-34c4-b55e-1a9fb43b6075-5C7GfCeVMHo@public.gmane.org>
2018-02-08 15:28 ` Harry Wentland
[not found] ` <d1fde114-78ea-3a79-986a-b6292dde8115-5C7GfCeVMHo@public.gmane.org>
2018-02-08 15:58 ` Zhu, Rex
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.