<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks Alex.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I should be more careful when reorder patches .</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best Regards</p>
<p style="margin-top:0;margin-bottom:0">Rex</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Thursday, March 22, 2018 9:13 PM<br>
<b>To:</b> Zhu, Rex<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> Re: [PATCH 2/6] drm/amd/pp: Add hwmgr_sw_init/fini functioins</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, Mar 22, 2018 at 9:13 AM, Alex Deucher <alexdeucher@gmail.com> wrote:<br>
> On Thu, Mar 22, 2018 at 9:10 AM, Alex Deucher <alexdeucher@gmail.com> wrote:<br>
>> On Thu, Mar 22, 2018 at 7:40 AM, Rex Zhu <Rex.Zhu@amd.com> wrote:<br>
>>> Clean up pp ip functions<br>
>>><br>
>>> Change-Id: Id06159202edabdfcb19fcc20e1291ce93db56d5d<br>
>>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
>><br>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
><br>
> Actually, doesn't this patch have a dependency on patch 3? I think<br>
> this part of patch 3:<br>
<br>
Sorry, patch 4.<br>
<br>
> + hwmgr->pm_en = (amdgpu_dpm && hwmgr->not_vf) ? true : false;<br>
> should be in this patch rather than the other patch. With that fixed:<br>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
><br>
>><br>
>>> ---<br>
>>> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 368 ++++++--------------------<br>
>>> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 74 ++++--<br>
>>> drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 7 +-<br>
>>> 3 files changed, 145 insertions(+), 304 deletions(-)<br>
>>><br>
>>> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
>>> index 7e8ad30..5d7d9ec 100644<br>
>>> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
>>> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
>>> @@ -31,24 +31,11 @@<br>
>>> #include "amdgpu.h"<br>
>>> #include "hwmgr.h"<br>
>>><br>
>>> -#define PP_DPM_DISABLED 0xCCCC<br>
>>> -<br>
>>> static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_task task_id,<br>
>>> enum amd_pm_state_type *user_state);<br>
>>><br>
>>> static const struct amd_pm_funcs pp_dpm_funcs;<br>
>>><br>
>>> -static inline int pp_check(struct pp_hwmgr *hwmgr)<br>
>>> -{<br>
>>> - if (hwmgr == NULL || hwmgr->smumgr_funcs == NULL)<br>
>>> - return -EINVAL;<br>
>>> -<br>
>>> - if (hwmgr->pm_en == 0 || hwmgr->hwmgr_func == NULL)<br>
>>> - return PP_DPM_DISABLED;<br>
>>> -<br>
>>> - return 0;<br>
>>> -}<br>
>>> -<br>
>>> static int amd_powerplay_create(struct amdgpu_device *adev)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr;<br>
>>> @@ -73,7 +60,7 @@ static int amd_powerplay_create(struct amdgpu_device *adev)<br>
>>> }<br>
>>><br>
>>><br>
>>> -static int amd_powerplay_destroy(struct amdgpu_device *adev)<br>
>>> +static void amd_powerplay_destroy(struct amdgpu_device *adev)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>><br>
>>> @@ -82,8 +69,6 @@ static int amd_powerplay_destroy(struct amdgpu_device *adev)<br>
>>><br>
>>> kfree(hwmgr);<br>
>>> hwmgr = NULL;<br>
>>> -<br>
>>> - return 0;<br>
>>> }<br>
>>><br>
>>> static int pp_early_init(void *handle)<br>
>>> @@ -109,18 +94,9 @@ static int pp_sw_init(void *handle)<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret >= 0) {<br>
>>> - if (hwmgr->smumgr_funcs->smu_init == NULL)<br>
>>> - return -EINVAL;<br>
>>> + ret = hwmgr_sw_init(hwmgr);<br>
>>><br>
>>> - ret = hwmgr->smumgr_funcs->smu_init(hwmgr);<br>
>>> -<br>
>>> - phm_register_irq_handlers(hwmgr);<br>
>>> -<br>
>>> - pr_debug("amdgpu: powerplay sw initialized\n");<br>
>>> - }<br>
>>> + pr_debug("amdgpu: powerplay sw init %s\n", ret ? "failed" : "successfully");<br>
>>><br>
>>> return ret;<br>
>>> }<br>
>>> @@ -129,13 +105,8 @@ static int pp_sw_fini(void *handle)<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret >= 0) {<br>
>>> - if (hwmgr->smumgr_funcs->smu_fini != NULL)<br>
>>> - hwmgr->smumgr_funcs->smu_fini(hwmgr);<br>
>>> - }<br>
>>> + hwmgr_sw_fini(hwmgr);<br>
>>><br>
>>> if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)<br>
>>> amdgpu_ucode_fini_bo(adev);<br>
>>> @@ -152,40 +123,20 @@ static int pp_hw_init(void *handle)<br>
>>> if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)<br>
>>> amdgpu_ucode_init_bo(adev);<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> + ret = hwmgr_hw_init(hwmgr);<br>
>>><br>
>>> - if (ret >= 0) {<br>
>>> - if (hwmgr->smumgr_funcs->start_smu == NULL)<br>
>>> - return -EINVAL;<br>
>>> + if (ret)<br>
>>> + pr_err("amdgpu: powerplay hw init failed\n");<br>
>>><br>
>>> - if (hwmgr->smumgr_funcs->start_smu(hwmgr)) {<br>
>>> - pr_err("smc start failed\n");<br>
>>> - hwmgr->smumgr_funcs->smu_fini(hwmgr);<br>
>>> - return -EINVAL;<br>
>>> - }<br>
>>> - if (ret == PP_DPM_DISABLED)<br>
>>> - goto exit;<br>
>>> - ret = hwmgr_hw_init(hwmgr);<br>
>>> - if (ret)<br>
>>> - goto exit;<br>
>>> - }<br>
>>> return ret;<br>
>>> -exit:<br>
>>> - hwmgr->pm_en = 0;<br>
>>> - cgs_notify_dpm_enabled(hwmgr->device, false);<br>
>>> - return 0;<br>
>>> -<br>
>>> }<br>
>>><br>
>>> static int pp_hw_fini(void *handle)<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret == 0)<br>
>>> - hwmgr_hw_fini(hwmgr);<br>
>>> + hwmgr_hw_fini(hwmgr);<br>
>>><br>
>>> return 0;<br>
>>> }<br>
>>> @@ -194,11 +145,8 @@ static int pp_late_init(void *handle)<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret == 0)<br>
>>> + if (hwmgr && hwmgr->pm_en)<br>
>>> pp_dpm_dispatch_tasks(hwmgr,<br>
>>> AMD_PP_TASK_COMPLETE_INIT, NULL);<br>
>>><br>
>>> @@ -233,12 +181,9 @@ static int pp_set_powergating_state(void *handle,<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->enable_per_cu_power_gating == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -254,38 +199,16 @@ static int pp_suspend(void *handle)<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret == 0)<br>
>>> - hwmgr_hw_suspend(hwmgr);<br>
>>> - return 0;<br>
>>> + return hwmgr_suspend(hwmgr);<br>
>>> }<br>
>>><br>
>>> static int pp_resume(void *handle)<br>
>>> {<br>
>>> struct amdgpu_device *adev = handle;<br>
>>> struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;<br>
>>> - int ret;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret < 0)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (hwmgr->smumgr_funcs->start_smu == NULL)<br>
>>> - return -EINVAL;<br>
>>> -<br>
>>> - if (hwmgr->smumgr_funcs->start_smu(hwmgr)) {<br>
>>> - pr_err("smc start failed\n");<br>
>>> - hwmgr->smumgr_funcs->smu_fini(hwmgr);<br>
>>> - return -EINVAL;<br>
>>> - }<br>
>>> -<br>
>>> - if (ret == PP_DPM_DISABLED)<br>
>>> - return 0;<br>
>>><br>
>>> - return hwmgr_hw_resume(hwmgr);<br>
>>> + return hwmgr_resume(hwmgr);<br>
>>> }<br>
>>><br>
>>> static int pp_set_clockgating_state(void *handle,<br>
>>> @@ -334,12 +257,9 @@ static int pp_dpm_fw_loading_complete(void *handle)<br>
>>> static int pp_set_clockgating_by_smu(void *handle, uint32_t msg_id)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->update_clock_gatings == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -389,12 +309,9 @@ static int pp_dpm_force_performance_level(void *handle,<br>
>>> enum amd_dpm_forced_level level)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (level == hwmgr->dpm_level)<br>
>>> return 0;<br>
>>> @@ -412,13 +329,10 @@ static enum amd_dpm_forced_level pp_dpm_get_performance_level(<br>
>>> void *handle)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> enum amd_dpm_forced_level level;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> level = hwmgr->dpm_level;<br>
>>> @@ -429,13 +343,10 @@ static enum amd_dpm_forced_level pp_dpm_get_performance_level(<br>
>>> static uint32_t pp_dpm_get_sclk(void *handle, bool low)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> uint32_t clk = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_sclk == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -450,13 +361,10 @@ static uint32_t pp_dpm_get_sclk(void *handle, bool low)<br>
>>> static uint32_t pp_dpm_get_mclk(void *handle, bool low)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> uint32_t clk = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_mclk == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -471,11 +379,8 @@ static uint32_t pp_dpm_get_mclk(void *handle, bool low)<br>
>>> static void pp_dpm_powergate_vce(void *handle, bool gate)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->powergate_vce == NULL) {<br>
>>> @@ -490,11 +395,8 @@ static void pp_dpm_powergate_vce(void *handle, bool gate)<br>
>>> static void pp_dpm_powergate_uvd(void *handle, bool gate)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->powergate_uvd == NULL) {<br>
>>> @@ -512,10 +414,8 @@ static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_task task_id,<br>
>>> int ret = 0;<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> ret = hwmgr_handle_task(hwmgr, task_id, user_state);<br>
>>> @@ -528,15 +428,9 @@ static enum amd_pm_state_type pp_dpm_get_current_power_state(void *handle)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> struct pp_power_state *state;<br>
>>> - int ret = 0;<br>
>>> enum amd_pm_state_type pm_type;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (hwmgr->current_ps == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en || !hwmgr->current_ps)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -568,11 +462,8 @@ static enum amd_pm_state_type pp_dpm_get_current_power_state(void *handle)<br>
>>> static void pp_dpm_set_fan_control_mode(void *handle, uint32_t mode)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_fan_control_mode == NULL) {<br>
>>> @@ -587,13 +478,10 @@ static void pp_dpm_set_fan_control_mode(void *handle, uint32_t mode)<br>
>>> static uint32_t pp_dpm_get_fan_control_mode(void *handle)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> uint32_t mode = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_fan_control_mode == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -610,10 +498,8 @@ static int pp_dpm_set_fan_speed_percent(void *handle, uint32_t percent)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_fan_speed_percent == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -630,10 +516,8 @@ static int pp_dpm_get_fan_speed_percent(void *handle, uint32_t *speed)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_fan_speed_percent == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -651,10 +535,8 @@ static int pp_dpm_get_fan_speed_rpm(void *handle, uint32_t *rpm)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_fan_speed_rpm == NULL)<br>
>>> return -EINVAL;<br>
>>> @@ -670,16 +552,10 @@ static int pp_dpm_get_pp_num_states(void *handle,<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int i;<br>
>>> - int ret = 0;<br>
>>><br>
>>> memset(data, 0, sizeof(*data));<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (hwmgr->ps == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!hwmgr->ps)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -713,15 +589,9 @@ static int pp_dpm_get_pp_num_states(void *handle,<br>
>>> static int pp_dpm_get_pp_table(void *handle, char **table)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> int size = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (!hwmgr->soft_pp_table)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!hwmgr->soft_pp_table)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -736,10 +606,6 @@ static int amd_powerplay_reset(void *handle)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> ret = hwmgr_hw_fini(hwmgr);<br>
>>> if (ret)<br>
>>> return ret;<br>
>>> @@ -756,10 +622,8 @@ static int pp_dpm_set_pp_table(void *handle, const char *buf, size_t size)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> if (!hwmgr->hardcode_pp_table) {<br>
>>> @@ -796,10 +660,8 @@ static int pp_dpm_force_clock_level(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->force_clock_level == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -820,10 +682,8 @@ static int pp_dpm_print_clock_levels(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->print_clock_levels == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -840,10 +700,8 @@ static int pp_dpm_get_sclk_od(void *handle)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_sclk_od == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -860,10 +718,8 @@ static int pp_dpm_set_sclk_od(void *handle, uint32_t value)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_sclk_od == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -881,10 +737,8 @@ static int pp_dpm_get_mclk_od(void *handle)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_mclk_od == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -901,10 +755,8 @@ static int pp_dpm_set_mclk_od(void *handle, uint32_t value)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_mclk_od == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -922,11 +774,7 @@ static int pp_dpm_read_sensor(void *handle, int idx,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (value == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en || !value)<br>
>>> return -EINVAL;<br>
>>><br>
>>> switch (idx) {<br>
>>> @@ -948,14 +796,11 @@ static int pp_dpm_read_sensor(void *handle, int idx,<br>
>>> pp_dpm_get_vce_clock_state(void *handle, unsigned idx)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return NULL;<br>
>>><br>
>>> - if (hwmgr && idx < hwmgr->num_vce_state_tables)<br>
>>> + if (idx < hwmgr->num_vce_state_tables)<br>
>>> return &hwmgr->vce_states[idx];<br>
>>> return NULL;<br>
>>> }<br>
>>> @@ -964,7 +809,7 @@ static int pp_get_power_profile_mode(void *handle, char *buf)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>><br>
>>> - if (!buf || pp_check(hwmgr))<br>
>>> + if (!hwmgr || !hwmgr->pm_en || !buf)<br>
>>> return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->get_power_profile_mode == NULL) {<br>
>>> @@ -980,12 +825,12 @@ static int pp_set_power_profile_mode(void *handle, long *input, uint32_t size)<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = -EINVAL;<br>
>>><br>
>>> - if (pp_check(hwmgr))<br>
>>> - return -EINVAL;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return ret;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_power_profile_mode == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> - return -EINVAL;<br>
>>> + return ret;<br>
>>> }<br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> if (hwmgr->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)<br>
>>> @@ -998,7 +843,7 @@ static int pp_odn_edit_dpm_table(void *handle, uint32_t type, long *input, uint3<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>><br>
>>> - if (pp_check(hwmgr))<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->odn_edit_dpm_table == NULL) {<br>
>>> @@ -1016,7 +861,7 @@ static int pp_dpm_switch_power_profile(void *handle,<br>
>>> long workload;<br>
>>> uint32_t index;<br>
>>><br>
>>> - if (pp_check(hwmgr))<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_power_profile_mode == NULL) {<br>
>>> @@ -1058,10 +903,8 @@ static int pp_dpm_notify_smu_memory_info(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->notify_cac_buffer_info == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -1082,12 +925,9 @@ static int pp_dpm_notify_smu_memory_info(void *handle,<br>
>>> static int pp_set_power_limit(void *handle, uint32_t limit)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_power_limit == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> @@ -1104,20 +944,14 @@ static int pp_set_power_limit(void *handle, uint32_t limit)<br>
>>> hwmgr->hwmgr_func->set_power_limit(hwmgr, limit);<br>
>>> hwmgr->power_limit = limit;<br>
>>> mutex_unlock(&hwmgr->smu_lock);<br>
>>> - return ret;<br>
>>> + return 0;<br>
>>> }<br>
>>><br>
>>> static int pp_get_power_limit(void *handle, uint32_t *limit, bool default_limit)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (limit == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!limit)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1129,19 +963,16 @@ static int pp_get_power_limit(void *handle, uint32_t *limit, bool default_limit)<br>
>>><br>
>>> mutex_unlock(&hwmgr->smu_lock);<br>
>>><br>
>>> - return ret;<br>
>>> + return 0;<br>
>>> }<br>
>>><br>
>>> static int pp_display_configuration_change(void *handle,<br>
>>> const struct amd_pp_display_configuration *display_config)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> phm_store_dal_configuration_data(hwmgr, display_config);<br>
>>> @@ -1155,12 +986,7 @@ static int pp_get_display_power_level(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (output == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!output)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1177,10 +1003,8 @@ static int pp_get_current_clocks(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>><br>
>>> @@ -1225,10 +1049,8 @@ static int pp_get_clock_by_type(void *handle, enum amd_pp_clock_type type, struc<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (clocks == NULL)<br>
>>> return -EINVAL;<br>
>>> @@ -1246,11 +1068,7 @@ static int pp_get_clock_by_type_with_latency(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (!clocks)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!clocks)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1266,11 +1084,7 @@ static int pp_get_clock_by_type_with_voltage(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (!clocks)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!clocks)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1287,11 +1101,7 @@ static int pp_set_watermarks_for_clocks_ranges(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (!wm_with_clock_ranges)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!wm_with_clock_ranges)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1308,11 +1118,7 @@ static int pp_display_clock_voltage_request(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (!clock)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!clock)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1328,12 +1134,7 @@ static int pp_get_display_mode_validation_clocks(void *handle,<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> int ret = 0;<br>
>>><br>
>>> - ret = pp_check(hwmgr);<br>
>>> -<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> - if (clocks == NULL)<br>
>>> + if (!hwmgr || !hwmgr->pm_en ||!clocks)<br>
>>> return -EINVAL;<br>
>>><br>
>>> mutex_lock(&hwmgr->smu_lock);<br>
>>> @@ -1348,12 +1149,9 @@ static int pp_get_display_mode_validation_clocks(void *handle,<br>
>>> static int pp_set_mmhub_powergating_by_smu(void *handle)<br>
>>> {<br>
>>> struct pp_hwmgr *hwmgr = handle;<br>
>>> - int ret = 0;<br>
>>> -<br>
>>> - ret = pp_check(hwmgr);<br>
>>><br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return -EINVAL;<br>
>>><br>
>>> if (hwmgr->hwmgr_func->set_mmhub_powergating_by_smu == NULL) {<br>
>>> pr_info("%s was not implemented.\n", __func__);<br>
>>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
>>> index 4298205..96a2d01 100644<br>
>>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
>>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
>>> @@ -76,7 +76,7 @@ static void hwmgr_init_workload_prority(struct pp_hwmgr *hwmgr)<br>
>>><br>
>>> int hwmgr_early_init(struct pp_hwmgr *hwmgr)<br>
>>> {<br>
>>> - if (hwmgr == NULL)<br>
>>> + if (!hwmgr)<br>
>>> return -EINVAL;<br>
>>><br>
>>> hwmgr->usec_timeout = AMD_MAX_USEC_TIMEOUT;<br>
>>> @@ -170,17 +170,51 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)<br>
>>> return 0;<br>
>>> }<br>
>>><br>
>>> +int hwmgr_sw_init(struct pp_hwmgr *hwmgr)<br>
>>> +{<br>
>>> + if (!hwmgr|| !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->smu_init)<br>
>>> + return -EINVAL;<br>
>>> +<br>
>>> + phm_register_irq_handlers(hwmgr);<br>
>>> +<br>
>>> + return hwmgr->smumgr_funcs->smu_init(hwmgr);<br>
>>> +}<br>
>>> +<br>
>>> +<br>
>>> +int hwmgr_sw_fini(struct pp_hwmgr *hwmgr)<br>
>>> +{<br>
>>> + if (hwmgr && hwmgr->smumgr_funcs && hwmgr->smumgr_funcs->smu_fini)<br>
>>> + hwmgr->smumgr_funcs->smu_fini(hwmgr);<br>
>>> +<br>
>>> + return 0;<br>
>>> +}<br>
>>> +<br>
>>> int hwmgr_hw_init(struct pp_hwmgr *hwmgr)<br>
>>> {<br>
>>> int ret = 0;<br>
>>><br>
>>> - if (hwmgr == NULL)<br>
>>> + if (!hwmgr || !hwmgr->smumgr_funcs)<br>
>>> return -EINVAL;<br>
>>><br>
>>> - if (hwmgr->pptable_func == NULL ||<br>
>>> - hwmgr->pptable_func->pptable_init == NULL ||<br>
>>> - hwmgr->hwmgr_func->backend_init == NULL)<br>
>>> - return -EINVAL;<br>
>>> + if (hwmgr->smumgr_funcs->start_smu) {<br>
>>> + ret = hwmgr->smumgr_funcs->start_smu(hwmgr);<br>
>>> + if (ret) {<br>
>>> + pr_err("smc start failed\n");<br>
>>> + return -EINVAL;<br>
>>> + }<br>
>>> + }<br>
>>> +<br>
>>> + if (!hwmgr->pm_en)<br>
>>> + return 0;<br>
>>> +<br>
>>> + if (!hwmgr->pptable_func ||<br>
>>> + !hwmgr->pptable_func->pptable_init ||<br>
>>> + !hwmgr->hwmgr_func->backend_init) {<br>
>>> + hwmgr->pm_en = false;<br>
>>> + cgs_notify_dpm_enabled(hwmgr->device, false);<br>
>>> + pr_info("dpm not supported \n");<br>
>>> + return 0;<br>
>>> + }<br>
>>><br>
>>> ret = hwmgr->pptable_func->pptable_init(hwmgr);<br>
>>> if (ret)<br>
>>> @@ -214,14 +248,13 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)<br>
>>> if (hwmgr->pptable_func->pptable_fini)<br>
>>> hwmgr->pptable_func->pptable_fini(hwmgr);<br>
>>> err:<br>
>>> - pr_err("amdgpu: powerplay initialization failed\n");<br>
>>> return ret;<br>
>>> }<br>
>>><br>
>>> int hwmgr_hw_fini(struct pp_hwmgr *hwmgr)<br>
>>> {<br>
>>> - if (hwmgr == NULL)<br>
>>> - return -EINVAL;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> phm_stop_thermal_controller(hwmgr);<br>
>>> psm_set_boot_states(hwmgr);<br>
>>> @@ -236,12 +269,12 @@ int hwmgr_hw_fini(struct pp_hwmgr *hwmgr)<br>
>>> return psm_fini_power_state_table(hwmgr);<br>
>>> }<br>
>>><br>
>>> -int hwmgr_hw_suspend(struct pp_hwmgr *hwmgr)<br>
>>> +int hwmgr_suspend(struct pp_hwmgr *hwmgr)<br>
>>> {<br>
>>> int ret = 0;<br>
>>><br>
>>> - if (hwmgr == NULL)<br>
>>> - return -EINVAL;<br>
>>> + if (!hwmgr || !hwmgr->pm_en)<br>
>>> + return 0;<br>
>>><br>
>>> phm_disable_smc_firmware_ctf(hwmgr);<br>
>>> ret = psm_set_boot_states(hwmgr);<br>
>>> @@ -255,13 +288,23 @@ int hwmgr_hw_suspend(struct pp_hwmgr *hwmgr)<br>
>>> return ret;<br>
>>> }<br>
>>><br>
>>> -int hwmgr_hw_resume(struct pp_hwmgr *hwmgr)<br>
>>> +int hwmgr_resume(struct pp_hwmgr *hwmgr)<br>
>>> {<br>
>>> int ret = 0;<br>
>>><br>
>>> - if (hwmgr == NULL)<br>
>>> + if (!hwmgr)<br>
>>> return -EINVAL;<br>
>>><br>
>>> + if (hwmgr->smumgr_funcs && hwmgr->smumgr_funcs->start_smu) {<br>
>>> + if (hwmgr->smumgr_funcs->start_smu(hwmgr)) {<br>
>>> + pr_err("smc start failed\n");<br>
>>> + return -EINVAL;<br>
>>> + }<br>
>>> + }<br>
>>> +<br>
>>> + if (!hwmgr->pm_en)<br>
>>> + return 0;<br>
>>> +<br>
>>> ret = phm_setup_asic(hwmgr);<br>
>>> if (ret)<br>
>>> return ret;<br>
>>> @@ -270,9 +313,6 @@ int hwmgr_hw_resume(struct pp_hwmgr *hwmgr)<br>
>>> if (ret)<br>
>>> return ret;<br>
>>> ret = phm_start_thermal_controller(hwmgr);<br>
>>> - if (ret)<br>
>>> - return ret;<br>
>>> -<br>
>>> ret |= psm_set_performance_states(hwmgr);<br>
>>> if (ret)<br>
>>> return ret;<br>
>>> diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
>>> index 17f811d..d6c9a3b 100644<br>
>>> --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
>>> +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h<br>
>>> @@ -782,10 +782,13 @@ struct pp_hwmgr {<br>
>>> };<br>
>>><br>
>>> int hwmgr_early_init(struct pp_hwmgr *hwmgr);<br>
>>> +int hwmgr_sw_init(struct pp_hwmgr *hwmgr);<br>
>>> +int hwmgr_sw_fini(struct pp_hwmgr *hwmgr);<br>
>>> int hwmgr_hw_init(struct pp_hwmgr *hwmgr);<br>
>>> int hwmgr_hw_fini(struct pp_hwmgr *hwmgr);<br>
>>> -int hwmgr_hw_suspend(struct pp_hwmgr *hwmgr);<br>
>>> -int hwmgr_hw_resume(struct pp_hwmgr *hwmgr);<br>
>>> +int hwmgr_suspend(struct pp_hwmgr *hwmgr);<br>
>>> +int hwmgr_resume(struct pp_hwmgr *hwmgr);<br>
>>> +<br>
>>> int hwmgr_handle_task(struct pp_hwmgr *hwmgr,<br>
>>> enum amd_pp_task task_id,<br>
>>> enum amd_pm_state_type *user_state);<br>
>>> --<br>
>>> 1.9.1<br>
>>><br>
>>> _______________________________________________<br>
>>> amd-gfx mailing list<br>
>>> amd-gfx@lists.freedesktop.org<br>
>>> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk514271" previewremoved="true">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15217296746250.8377676973900243" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15217296746220.4412012350774459" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15217296746230.3999022866005415" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15217296746230.7515492768466687"></div>
<div id="LPTitle_15217296746230.12004872687650803" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15217296746240.5079464424197266" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank" style="text-decoration: none;">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15217296746240.5706125124067862" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15217296746250.7332168276446271" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
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 ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>