提交 a78fe133 编写于 作者: A Alex Deucher

drm/amdgpu/atpx: add a query for ATPX dGPU power control

The runtime pm sequence is different depending on whether or
not the platform supports ATPX dGPU power control.
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 f81eb1a3
...@@ -2400,9 +2400,11 @@ bool amdgpu_device_is_px(struct drm_device *dev); ...@@ -2400,9 +2400,11 @@ bool amdgpu_device_is_px(struct drm_device *dev);
#if defined(CONFIG_VGA_SWITCHEROO) #if defined(CONFIG_VGA_SWITCHEROO)
void amdgpu_register_atpx_handler(void); void amdgpu_register_atpx_handler(void);
void amdgpu_unregister_atpx_handler(void); void amdgpu_unregister_atpx_handler(void);
bool amdgpu_has_atpx_dgpu_power_cntl(void);
#else #else
static inline void amdgpu_register_atpx_handler(void) {} static inline void amdgpu_register_atpx_handler(void) {}
static inline void amdgpu_unregister_atpx_handler(void) {} static inline void amdgpu_unregister_atpx_handler(void) {}
static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; }
#endif #endif
/* /*
......
...@@ -64,6 +64,10 @@ bool amdgpu_has_atpx(void) { ...@@ -64,6 +64,10 @@ bool amdgpu_has_atpx(void) {
return amdgpu_atpx_priv.atpx_detected; return amdgpu_atpx_priv.atpx_detected;
} }
bool amdgpu_has_atpx_dgpu_power_cntl(void) {
return amdgpu_atpx_priv.atpx.functions.power_cntl;
}
/** /**
* amdgpu_atpx_call - call an ATPX method * amdgpu_atpx_call - call an ATPX method
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册