drm/amdgpu: update current ps/requeset ps in adev with real ps.
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 14 Oct 2016 11:29:02 +0000 (19:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Oct 2016 18:38:53 +0000 (14:38 -0400)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/ci_dpm.c
drivers/gpu/drm/amd/amdgpu/cz_dpm.c
drivers/gpu/drm/amd/amdgpu/si_dpm.c

index 2ca019bc7b937d27172dfa9a05423343e2eb5fa5..6ecfc4885b8406cd5eee7170494d3b51f226a769 100644 (file)
@@ -5225,6 +5225,7 @@ static void ci_update_current_ps(struct amdgpu_device *adev,
        pi->current_rps = *rps;
        pi->current_ps = *new_ps;
        pi->current_rps.ps_priv = &pi->current_ps;
+       adev->pm.dpm.current_ps = &pi->current_rps;
 }
 
 static void ci_update_requested_ps(struct amdgpu_device *adev,
@@ -5236,6 +5237,7 @@ static void ci_update_requested_ps(struct amdgpu_device *adev,
        pi->requested_rps = *rps;
        pi->requested_ps = *new_ps;
        pi->requested_rps.ps_priv = &pi->requested_ps;
+       adev->pm.dpm.requested_ps = &pi->requested_rps;
 }
 
 static int ci_dpm_pre_set_power_state(struct amdgpu_device *adev)
index adbb6e150acc7179b383eb2745d730b9860d00b5..352b5fad5a06394ab08db80defaa5d39a2492137 100644 (file)
@@ -1250,7 +1250,8 @@ static void cz_update_current_ps(struct amdgpu_device *adev,
 
        pi->current_ps = *ps;
        pi->current_rps = *rps;
-       pi->current_rps.ps_priv = ps;
+       pi->current_rps.ps_priv = &pi->current_ps;
+       adev->pm.dpm.current_ps = &pi->current_rps;
 
 }
 
@@ -1262,7 +1263,8 @@ static void cz_update_requested_ps(struct amdgpu_device *adev,
 
        pi->requested_ps = *ps;
        pi->requested_rps = *rps;
-       pi->requested_rps.ps_priv = ps;
+       pi->requested_rps.ps_priv = &pi->requested_ps;
+       adev->pm.dpm.requested_ps = &pi->requested_rps;
 
 }
 
index 62edc87f33f6b2101fbf2acc7bfa364e7d38d38e..91721339678709385d125d4b4d85defccfe5d61c 100644 (file)
@@ -3171,6 +3171,7 @@ static void ni_update_current_ps(struct amdgpu_device *adev,
        eg_pi->current_rps = *rps;
        ni_pi->current_ps = *new_ps;
        eg_pi->current_rps.ps_priv = &ni_pi->current_ps;
+       adev->pm.dpm.current_ps = &eg_pi->current_rps;
 }
 
 static void ni_update_requested_ps(struct amdgpu_device *adev,
@@ -3183,6 +3184,7 @@ static void ni_update_requested_ps(struct amdgpu_device *adev,
        eg_pi->requested_rps = *rps;
        ni_pi->requested_ps = *new_ps;
        eg_pi->requested_rps.ps_priv = &ni_pi->requested_ps;
+       adev->pm.dpm.requested_ps = &eg_pi->requested_rps;
 }
 
 static void ni_set_uvd_clock_before_set_eng_clock(struct amdgpu_device *adev,