Skip to content

Commit 91e1601

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amd/pm: Skip power state allocation
Power states are not valid for arcturus and aldebaran, no need to allocate memory. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Yang Wang <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1725270 commit 91e1601

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)
295295
return -ENOMEM;
296296
smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);
297297

298-
smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
299-
GFP_KERNEL);
300-
if (!smu_dpm->dpm_current_power_state)
301-
return -ENOMEM;
302-
303-
smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
304-
GFP_KERNEL);
305-
if (!smu_dpm->dpm_request_power_state)
306-
return -ENOMEM;
307-
308298
return 0;
309299
}
310300

drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)
262262
return -ENOMEM;
263263
smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context);
264264

265-
smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
266-
GFP_KERNEL);
267-
if (!smu_dpm->dpm_current_power_state)
268-
return -ENOMEM;
269-
270-
smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
271-
GFP_KERNEL);
272-
if (!smu_dpm->dpm_request_power_state)
273-
return -ENOMEM;
274-
275265
return 0;
276266
}
277267

0 commit comments

Comments
 (0)