drm/amdgpu: add asic callback for BACO support
BACO - Bus Active, Chip Off Used to check whether the device supports BACO. This will be used to enable runtime pm on devices which support BACO. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -589,6 +589,8 @@ struct amdgpu_asic_funcs {
|
|||||||
bool (*need_reset_on_init)(struct amdgpu_device *adev);
|
bool (*need_reset_on_init)(struct amdgpu_device *adev);
|
||||||
/* PCIe replay counter */
|
/* PCIe replay counter */
|
||||||
uint64_t (*get_pcie_replay_count)(struct amdgpu_device *adev);
|
uint64_t (*get_pcie_replay_count)(struct amdgpu_device *adev);
|
||||||
|
/* device supports BACO */
|
||||||
|
bool (*supports_baco)(struct amdgpu_device *adev);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1120,6 +1122,8 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
|
|||||||
#define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs->get_pcie_usage((adev), (cnt0), (cnt1)))
|
#define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs->get_pcie_usage((adev), (cnt0), (cnt1)))
|
||||||
#define amdgpu_asic_need_reset_on_init(adev) (adev)->asic_funcs->need_reset_on_init((adev))
|
#define amdgpu_asic_need_reset_on_init(adev) (adev)->asic_funcs->need_reset_on_init((adev))
|
||||||
#define amdgpu_asic_get_pcie_replay_count(adev) ((adev)->asic_funcs->get_pcie_replay_count((adev)))
|
#define amdgpu_asic_get_pcie_replay_count(adev) ((adev)->asic_funcs->get_pcie_replay_count((adev)))
|
||||||
|
#define amdgpu_asic_supports_baco(adev) (adev)->asic_funcs->supports_baco((adev))
|
||||||
|
|
||||||
#define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter));
|
#define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter));
|
||||||
|
|
||||||
/* Common functions */
|
/* Common functions */
|
||||||
|
|||||||
Reference in New Issue
Block a user