mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
drm/amd/pm: Rename enable_bapm() to notify_ac_dc()
No functional changes, just change the name of this function pointer to be more generic. BAPM refers to a specific feature on KV, but other kinds of ASICs may also need the SMU to be notified on AC/DC changes. Also remove the argument and use adev->pm.ac_power instead. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6d87e0199f
commit
ba1fcd1bac
|
|
@ -417,7 +417,7 @@ struct amd_pm_funcs {
|
|||
void (*display_configuration_changed)(void *handle);
|
||||
void (*print_power_state)(void *handle, void *ps);
|
||||
bool (*vblank_too_short)(void *handle);
|
||||
void (*enable_bapm)(void *handle, bool enable);
|
||||
void (*notify_ac_dc)(void *handle);
|
||||
int (*check_state_equal)(void *handle,
|
||||
void *cps,
|
||||
void *rps,
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
#include <linux/power_supply.h>
|
||||
#include "amdgpu_smu.h"
|
||||
|
||||
#define amdgpu_dpm_enable_bapm(adev, e) \
|
||||
((adev)->powerplay.pp_funcs->enable_bapm((adev)->powerplay.pp_handle, (e)))
|
||||
#define amdgpu_dpm_notify_ac_dc(adev) \
|
||||
((adev)->powerplay.pp_funcs->notify_ac_dc((adev)->powerplay.pp_handle))
|
||||
|
||||
#define amdgpu_dpm_is_legacy_dpm(adev) ((adev)->powerplay.pp_handle == (adev))
|
||||
|
||||
|
|
@ -504,8 +504,8 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
|
|||
adev->pm.ac_power = false;
|
||||
|
||||
if (adev->powerplay.pp_funcs &&
|
||||
adev->powerplay.pp_funcs->enable_bapm)
|
||||
amdgpu_dpm_enable_bapm(adev, adev->pm.ac_power);
|
||||
adev->powerplay.pp_funcs->notify_ac_dc)
|
||||
amdgpu_dpm_notify_ac_dc(adev);
|
||||
|
||||
if (is_support_sw_smu(adev))
|
||||
smu_set_ac_dc(adev->powerplay.pp_handle);
|
||||
|
|
|
|||
|
|
@ -1233,14 +1233,14 @@ static void kv_update_requested_ps(struct amdgpu_device *adev,
|
|||
adev->pm.dpm.requested_ps = &pi->requested_rps;
|
||||
}
|
||||
|
||||
static void kv_dpm_enable_bapm(void *handle, bool enable)
|
||||
static void kv_dpm_enable_bapm(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct kv_power_info *pi = kv_get_pi(adev);
|
||||
int ret;
|
||||
|
||||
if (pi->bapm_enable) {
|
||||
ret = amdgpu_kv_smc_bapm_enable(adev, enable);
|
||||
ret = amdgpu_kv_smc_bapm_enable(adev, adev->pm.ac_power);
|
||||
if (ret)
|
||||
drm_err(adev_to_drm(adev), "amdgpu_kv_smc_bapm_enable failed\n");
|
||||
}
|
||||
|
|
@ -3341,7 +3341,7 @@ static const struct amd_pm_funcs kv_dpm_funcs = {
|
|||
.debugfs_print_current_performance_level = &kv_dpm_debugfs_print_current_performance_level,
|
||||
.force_performance_level = &kv_dpm_force_performance_level,
|
||||
.set_powergating_by_smu = kv_set_powergating_by_smu,
|
||||
.enable_bapm = &kv_dpm_enable_bapm,
|
||||
.notify_ac_dc = &kv_dpm_enable_bapm,
|
||||
.get_vce_clock_state = amdgpu_get_vce_clock_state,
|
||||
.check_state_equal = kv_check_state_equal,
|
||||
.read_sensor = &kv_dpm_read_sensor,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user