mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
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 <lijo.lazar@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
17252701ec
commit
91e16017b6
|
|
@ -295,16 +295,6 @@ static int arcturus_allocate_dpm_context(struct smu_context *smu)
|
|||
return -ENOMEM;
|
||||
smu_dpm->dpm_context_size = sizeof(struct smu_11_0_dpm_context);
|
||||
|
||||
smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
|
||||
GFP_KERNEL);
|
||||
if (!smu_dpm->dpm_current_power_state)
|
||||
return -ENOMEM;
|
||||
|
||||
smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
|
||||
GFP_KERNEL);
|
||||
if (!smu_dpm->dpm_request_power_state)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -262,16 +262,6 @@ static int aldebaran_allocate_dpm_context(struct smu_context *smu)
|
|||
return -ENOMEM;
|
||||
smu_dpm->dpm_context_size = sizeof(struct smu_13_0_dpm_context);
|
||||
|
||||
smu_dpm->dpm_current_power_state = kzalloc(sizeof(struct smu_power_state),
|
||||
GFP_KERNEL);
|
||||
if (!smu_dpm->dpm_current_power_state)
|
||||
return -ENOMEM;
|
||||
|
||||
smu_dpm->dpm_request_power_state = kzalloc(sizeof(struct smu_power_state),
|
||||
GFP_KERNEL);
|
||||
if (!smu_dpm->dpm_request_power_state)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user