Commit e1052b35 authored by Alex Deucher's avatar Alex Deucher

drm/radeon/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: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d814b24f
...@@ -63,6 +63,10 @@ bool radeon_has_atpx(void) { ...@@ -63,6 +63,10 @@ bool radeon_has_atpx(void) {
return radeon_atpx_priv.atpx_detected; return radeon_atpx_priv.atpx_detected;
} }
bool radeon_has_atpx_dgpu_power_cntl(void) {
return radeon_atpx_priv.atpx.functions.power_cntl;
}
/** /**
* radeon_atpx_call - call an ATPX method * radeon_atpx_call - call an ATPX method
* *
......
...@@ -163,9 +163,11 @@ void radeon_debugfs_cleanup(struct drm_minor *minor); ...@@ -163,9 +163,11 @@ void radeon_debugfs_cleanup(struct drm_minor *minor);
#if defined(CONFIG_VGA_SWITCHEROO) #if defined(CONFIG_VGA_SWITCHEROO)
void radeon_register_atpx_handler(void); void radeon_register_atpx_handler(void);
void radeon_unregister_atpx_handler(void); void radeon_unregister_atpx_handler(void);
bool radeon_has_atpx_dgpu_power_cntl(void);
#else #else
static inline void radeon_register_atpx_handler(void) {} static inline void radeon_register_atpx_handler(void) {}
static inline void radeon_unregister_atpx_handler(void) {} static inline void radeon_unregister_atpx_handler(void) {}
static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; }
#endif #endif
int radeon_no_wb; int radeon_no_wb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment