aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cz_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cz_dpm.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
index 3c082e143730..352b5fad5a06 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
@@ -1250,7 +1250,8 @@ static void cz_update_current_ps(struct amdgpu_device *adev,
1250 1250
1251 pi->current_ps = *ps; 1251 pi->current_ps = *ps;
1252 pi->current_rps = *rps; 1252 pi->current_rps = *rps;
1253 pi->current_rps.ps_priv = ps; 1253 pi->current_rps.ps_priv = &pi->current_ps;
1254 adev->pm.dpm.current_ps = &pi->current_rps;
1254 1255
1255} 1256}
1256 1257
@@ -1262,7 +1263,8 @@ static void cz_update_requested_ps(struct amdgpu_device *adev,
1262 1263
1263 pi->requested_ps = *ps; 1264 pi->requested_ps = *ps;
1264 pi->requested_rps = *rps; 1265 pi->requested_rps = *rps;
1265 pi->requested_rps.ps_priv = ps; 1266 pi->requested_rps.ps_priv = &pi->requested_ps;
1267 adev->pm.dpm.requested_ps = &pi->requested_rps;
1266 1268
1267} 1269}
1268 1270
@@ -2257,6 +2259,18 @@ static void cz_dpm_powergate_vce(struct amdgpu_device *adev, bool gate)
2257 } 2259 }
2258} 2260}
2259 2261
2262static int cz_check_state_equal(struct amdgpu_device *adev,
2263 struct amdgpu_ps *cps,
2264 struct amdgpu_ps *rps,
2265 bool *equal)
2266{
2267 if (equal == NULL)
2268 return -EINVAL;
2269
2270 *equal = false;
2271 return 0;
2272}
2273
2260const struct amd_ip_funcs cz_dpm_ip_funcs = { 2274const struct amd_ip_funcs cz_dpm_ip_funcs = {
2261 .name = "cz_dpm", 2275 .name = "cz_dpm",
2262 .early_init = cz_dpm_early_init, 2276 .early_init = cz_dpm_early_init,
@@ -2289,6 +2303,7 @@ static const struct amdgpu_dpm_funcs cz_dpm_funcs = {
2289 .vblank_too_short = NULL, 2303 .vblank_too_short = NULL,
2290 .powergate_uvd = cz_dpm_powergate_uvd, 2304 .powergate_uvd = cz_dpm_powergate_uvd,
2291 .powergate_vce = cz_dpm_powergate_vce, 2305 .powergate_vce = cz_dpm_powergate_vce,
2306 .check_state_equal = cz_check_state_equal,
2292}; 2307};
2293 2308
2294static void cz_dpm_set_funcs(struct amdgpu_device *adev) 2309static void cz_dpm_set_funcs(struct amdgpu_device *adev)
@@ -2296,3 +2311,12 @@ static void cz_dpm_set_funcs(struct amdgpu_device *adev)
2296 if (NULL == adev->pm.funcs) 2311 if (NULL == adev->pm.funcs)
2297 adev->pm.funcs = &cz_dpm_funcs; 2312 adev->pm.funcs = &cz_dpm_funcs;
2298} 2313}
2314
2315const struct amdgpu_ip_block_version cz_dpm_ip_block =
2316{
2317 .type = AMD_IP_BLOCK_TYPE_SMC,
2318 .major = 8,
2319 .minor = 0,
2320 .rev = 0,
2321 .funcs = &cz_dpm_ip_funcs,
2322};