]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu: add BACO interfaces in pm and hwmgr function table
authorJim Qu <Jim.Qu@amd.com>
Mon, 5 Nov 2018 09:45:56 +0000 (17:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:43:01 +0000 (15:43 -0500)
Signed-off-by: Jim Qu <Jim.Qu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/kgd_pp_interface.h
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

index 789c4f28848520a7f47ba76493e053e7ea344562..a2ea4c93336078349cd7dbb0d117d2645527f2a4 100644 (file)
@@ -281,6 +281,9 @@ struct amd_pm_funcs {
        int (*set_hard_min_dcefclk_by_freq)(void *handle, uint32_t clock);
        int (*set_hard_min_fclk_by_freq)(void *handle, uint32_t clock);
        int (*set_min_deep_sleep_dcefclk)(void *handle, uint32_t clock);
+       int (*get_asic_baco_capability)(void *handle, bool *cap);
+       int (*get_asic_baco_state)(void *handle, int *state);
+       int (*set_asic_baco_state)(void *handle, int state);
 };
 
 #endif
index be4f87aed99c30da3c228b84f191a0da5bb40c09..577cec90aef1c783d6c68a0c36f7fe69e4a44b3a 100644 (file)
@@ -47,6 +47,11 @@ enum DISPLAY_GAP {
 };
 typedef enum DISPLAY_GAP DISPLAY_GAP;
 
+enum BACO_STATE {
+       BACO_STATE_OUT = 0,
+       BACO_STATE_IN,
+};
+
 struct vi_dpm_level {
        bool enabled;
        uint32_t value;
@@ -333,6 +338,9 @@ struct pp_hwmgr_func {
        int (*enable_mgpu_fan_boost)(struct pp_hwmgr *hwmgr);
        int (*set_hard_min_dcefclk_by_freq)(struct pp_hwmgr *hwmgr, uint32_t clock);
        int (*set_hard_min_fclk_by_freq)(struct pp_hwmgr *hwmgr, uint32_t clock);
+       int (*get_asic_baco_capability)(struct pp_hwmgr *hwmgr, bool *cap);
+       int (*get_asic_baco_state)(struct pp_hwmgr *hwmgr, enum BACO_STATE *state);
+       int (*set_asic_baco_state)(struct pp_hwmgr *hwmgr, enum BACO_STATE state);
 };
 
 struct pp_table_func {