drm/amd/pp: Expose new interface to DC to ctrl auto wattman
Subsystems (2)
PATCH 1/1 drm/amd/pp: Expose new interface to DC to ctrl auto wattman
Disable AutoWattman (if enabled) when FreeSync is enabled.
--- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
drivers/gpu/drm/amd/include/kgd_pp_interface.h +1 -0
@@ -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
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +25 -0
@@ -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, };
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): 1518088825-4744-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Quoted 1 line · Rex Zhu
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
Quoted 57 lines
Change-Id I9a531321d7913b8b40e60070c569a01c4f202002Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)drivers/gpu/drm/amd/include/kgd_pp_interface.h +1
-0@@ -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 drivers/gpu/drm/amd/powerplay/amd_powerplay.c +24
-0@@ -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,
drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_set_mmhub_powergating_by_smu(void *handle) · line 1632
Quoted 5 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1
-0@@ -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
[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): 1a93901f-528c-b28e-d0c0-57809543a759-5C7GfCeVMHo@public.gmane.org
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; [email protected]
Subject: Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
Quoted 1 line · Rex Zhu
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
Quoted 57 lines
Change-Id I9a531321d7913b8b40e60070c569a01c4f202002Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)drivers/gpu/drm/amd/include/kgd_pp_interface.h +1
-0@@ -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 drivers/gpu/drm/amd/powerplay/amd_powerplay.c +24
-0@@ -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,
drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_set_mmhub_powergating_by_smu(void *handle) · line 1632
Quoted 5 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1
-0@@ -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
[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): CY4PR12MB16870B662724C2F6BD1A8014FBF30-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 2 lines · Rex
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
Quoted 74 lines
Best Regards
Rex------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*From:* Wentland, Harry
*Sent:* Thursday, February 8, 2018 10:22:16 PM
*To:* Zhu, Rex; [email protected]
*Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattmanQuoted 1 line · Rex Zhu
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
Quoted 54 lines
Change-Id I9a531321d7913b8b40e60070c569a01c4f202002Signed-off-by Rex Zhu <[email protected]>---
drivers/gpu/drm/amd/include/kgd_pp_interface.h| 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++2 files changed, 26 insertions(+)drivers/gpu/drm/amd/include/kgd_pp_interface.h +1
-0@@ -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); };
#endifdrivers/gpu/drm/amd/powerplay/amd_powerplay.c +0
-0@@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle) return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr); }drivers/gpu/drm/amd/powerplay/amd_powerplay.c +24
-0+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_funcspp_dpm_funcs= {
.load_firmware =pp_dpm_load_fw,
Quoted 8 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_set_mmhub_powergating_by_smu(void *handle) · line 1632
Quoted 8 lines
.wait_for_fw_loading_complete =
pp_dpm_fw_loading_complete,drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1
-0@@ -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
[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): 064c9f69-c87e-34c4-b55e-1a9fb43b6075-5C7GfCeVMHo@public.gmane.org
Quoted 6 lines · Harry Wentland
Quoted 2 lines · Rex
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
Quoted 80 lines
Harry
Quoted 78 lines
Best Regards
Rex------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*From:* Wentland, Harry
*Sent:* Thursday, February 8, 2018 10:22:16 PM
*To:* Zhu, Rex; [email protected]
*Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattmanQuoted 1 line · Rex Zhu
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
Quoted 58 lines
Change-Id I9a531321d7913b8b40e60070c569a01c4f202002Signed-off-by Rex Zhu <[email protected]>---
drivers/gpu/drm/amd/include/kgd_pp_interface.h| 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++2 files changed, 26 insertions(+)drivers/gpu/drm/amd/include/kgd_pp_interface.h +1
-0@@ -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); };
#endifdrivers/gpu/drm/amd/powerplay/amd_powerplay.c +0
-0@@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle) return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr); }drivers/gpu/drm/amd/powerplay/amd_powerplay.c +24
-0+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_funcspp_dpm_funcs= { .load_firmware =pp_dpm_load_fw, .wait_for_fw_loading_complete =pp_dpm_fw_loading_complete,drivers/gpu/drm/amd/powerplay/amd_powerplay.c +0
-0@@ -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,
Quoted 9 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_set_mmhub_powergating_by_smu(void *handle) · line 1632
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1
-0.set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu, + .notify_free_sync_change = pp_notify_free_sync_change, };_______________________________________________
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): d1fde114-78ea-3a79-986a-b6292dde8115-5C7GfCeVMHo@public.gmane.org
Thanks Harry for clarify this question thoroughly.
Quoted 1 line
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; [email protected]
Cc: Koo, Anthony; Cyr, Aric
Subject: Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman
Quoted 6 lines · Harry Wentland
Quoted 2 lines · Rex
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
Quoted 80 lines
Harry
Quoted 78 lines
Best Regards
Rex------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*From:* Wentland, Harry
*Sent:* Thursday, February 8, 2018 10:22:16 PM
*To:* Zhu, Rex; [email protected] *Subject:* Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattmanQuoted 1 line · Rex Zhu
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
Quoted 58 lines
Change-Id I9a531321d7913b8b40e60070c569a01c4f202002Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)drivers/gpu/drm/amd/include/kgd_pp_interface.h +1
-0@@ -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 drivers/gpu/drm/amd/powerplay/amd_powerplay.c +24
-0@@ -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,
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_set_mmhub_powergating_by_smu(void *handle) · line 1632
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1
-0.set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu, + .notify_free_sync_change = pp_notify_free_sync_change, };_______________________________________________
amd-gfx mailing list [email protected]
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 ...
Quoted 1 line
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx