Commit d698a2c4 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: move pp_force_state_enabled member to amdgpu_pm structure

As it lables an internal pm state and amdgpu_pm structure is the more
proper place than amdgpu_device structure for it.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 84176663
...@@ -949,7 +949,6 @@ struct amdgpu_device { ...@@ -949,7 +949,6 @@ struct amdgpu_device {
/* powerplay */ /* powerplay */
struct amd_powerplay powerplay; struct amd_powerplay powerplay;
bool pp_force_state_enabled;
/* smu */ /* smu */
struct smu_context smu; struct smu_context smu;
......
...@@ -469,7 +469,7 @@ static ssize_t amdgpu_get_pp_force_state(struct device *dev, ...@@ -469,7 +469,7 @@ static ssize_t amdgpu_get_pp_force_state(struct device *dev,
if (adev->in_suspend && !adev->in_runpm) if (adev->in_suspend && !adev->in_runpm)
return -EPERM; return -EPERM;
if (adev->pp_force_state_enabled) if (adev->pm.pp_force_state_enabled)
return amdgpu_get_pp_cur_state(dev, attr, buf); return amdgpu_get_pp_cur_state(dev, attr, buf);
else else
return sysfs_emit(buf, "\n"); return sysfs_emit(buf, "\n");
...@@ -492,7 +492,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev, ...@@ -492,7 +492,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
if (adev->in_suspend && !adev->in_runpm) if (adev->in_suspend && !adev->in_runpm)
return -EPERM; return -EPERM;
adev->pp_force_state_enabled = false; adev->pm.pp_force_state_enabled = false;
if (strlen(buf) == 1) if (strlen(buf) == 1)
return count; return count;
...@@ -523,7 +523,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev, ...@@ -523,7 +523,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
if (ret) if (ret)
goto err_out; goto err_out;
adev->pp_force_state_enabled = true; adev->pm.pp_force_state_enabled = true;
} }
pm_runtime_mark_last_busy(ddev->dev); pm_runtime_mark_last_busy(ddev->dev);
......
...@@ -343,6 +343,8 @@ struct amdgpu_pm { ...@@ -343,6 +343,8 @@ struct amdgpu_pm {
* 0 = disabled (default), otherwise enable corresponding debug mode * 0 = disabled (default), otherwise enable corresponding debug mode
*/ */
uint32_t smu_debug_mask; uint32_t smu_debug_mask;
bool pp_force_state_enabled;
}; };
#define R600_SSTU_DFLT 0 #define R600_SSTU_DFLT 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment