drm/amd/pm: store and reinstate swsmu user power configurations
authorArunpravin <Arunpravin.PaneerSelvam@amd.com>
Tue, 19 Jan 2021 18:17:32 +0000 (23:47 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Jan 2021 22:47:00 +0000 (17:47 -0500)
commiteb3b425166cbdb942b7c38bd9998b97837bd6b29
tree9f1f0ac896182efacdc682a377565a0e63f93f25
parent64dcf2f01d59cf9fad19b1a387bd39736a8f4d69
drm/amd/pm: store and reinstate swsmu user power configurations

store swsmu user power configurations which include
power limit, clock frequencies, fan speed and fan mode
on suspend and reinstate on resume.

V2: Addressed Lijo's review comments
     added a function to set clock interdependencies
     add check on fan control mode to reapply fan speed

V3: Addressed review comments from Alex
     moved store logic and reinstate function call into swSMU

V4: added a logic to keep off storing configurations in suspend

V5: Addressed review comments from Lijo
     add a restore flag
     give restore priority to mclk comparing fclk and socclk

Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c