drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
Since DAL settings come between .hw_init and .late_init of SMU. And DAL needs to know the maximum sustainable clocks.
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +13 -6
@@ -819,12 +819,6 @@ static int smu_late_init(void *handle)return ret; } - ret =smu_init_max_sustainable_clocks (smu); -if (ret) { -dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); -return ret; - } - ret =smu_populate_umd_state_clk (smu);if (ret) {dev_err (adev->dev,"Failed to populate UMD state clocks!\n" );
@@ -1364,6 +1358,19 @@ static int smu_hw_init(void *handle)return ret; } +/* +* Move maximum sustainable clock retrieving here considering +* 1. It is not needed on resume(from S3). +* 2. DAL settings come between .hw_init and .late_init of SMU. +* And DAL needs to know the maximum sustainable clocks. Thus +* it cannot be put in .late_init(). +*/ + ret =smu_init_max_sustainable_clocks (smu); +if (ret) { +dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); +return ret; + } + adev->pm.dpm_enabled = true;dev_info (adev->dev,"SMU is initialized successfully!\n" );
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
________________________________
From: Quan, Evan <[email protected]>
Sent: Monday, June 8, 2020 6:46 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Cui, Flora <[email protected]>
Subject: [PATCH] drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
Since DAL settings come between .hw_init and .late_init of SMU. And DAL needs to know the maximum sustainable clocks.
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +13 -6
@@ -819,12 +819,6 @@ static int smu_late_init(void *handle)return ret; } - ret =smu_init_max_sustainable_clocks (smu); -if (ret) { -dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); -return ret; - } - ret =smu_populate_umd_state_clk (smu);if (ret) {dev_err (adev->dev,"Failed to populate UMD state clocks!\n" );
@@ -1364,6 +1358,19 @@ static int smu_hw_init(void *handle)return ret; } +/* +* Move maximum sustainable clock retrieving here considering +* 1. It is not needed on resume(from S3). +* 2. DAL settings come between .hw_init and .late_init of SMU. +* And DAL needs to know the maximum sustainable clocks. Thus +* it cannot be put in .late_init(). +*/ + ret =smu_init_max_sustainable_clocks (smu); +if (ret) { +dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); +return ret; + } + adev->pm.dpm_enabled = true;dev_info (adev->dev,"SMU is initialized successfully!\n" );
--
2.27.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Cui, Flora
Acked-by Alex Deucher[AMD Public Use]
From: Deucher, Alexander <[email protected]>
Sent: Monday, June 8, 2020 11:02 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Cui, Flora <[email protected]>
Subject: Re: [PATCH] drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
[AMD Public Use]
________________________________
From: Quan, Evan <[email protected]<mailto:[email protected]>>
Sent: Monday, June 8, 2020 6:46 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>; Cui, Flora <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
Since DAL settings come between .hw_init and .late_init of SMU. And DAL needs to know the maximum sustainable clocks.
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +13 -6
@@ -819,12 +819,6 @@ static int smu_late_init(void *handle)return ret; } - ret =smu_init_max_sustainable_clocks (smu); -if (ret) { -dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); -return ret; - } - ret =smu_populate_umd_state_clk (smu);if (ret) {dev_err (adev->dev,"Failed to populate UMD state clocks!\n" );
@@ -1364,6 +1358,19 @@ static int smu_hw_init(void *handle)return ret; } +/* +* Move maximum sustainable clock retrieving here considering +* 1. It is not needed on resume(from S3). +* 2. DAL settings come between .hw_init and .late_init of SMU. +* And DAL needs to know the maximum sustainable clocks. Thus +* it cannot be put in .late_init(). +*/ + ret =smu_init_max_sustainable_clocks (smu); +if (ret) { +dev_err (adev->dev,"Failed to init max sustainable clocks!\n" ); +return ret; + } + adev->pm.dpm_enabled = true;dev_info (adev->dev,"SMU is initialized successfully!\n" );
--
2.27.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx