diff options
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 33bc79e378e1..3cc2bd797e51 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -2400,9 +2400,11 @@ bool amdgpu_device_is_px(struct drm_device *dev); | |||
2400 | #if defined(CONFIG_VGA_SWITCHEROO) | 2400 | #if defined(CONFIG_VGA_SWITCHEROO) |
2401 | void amdgpu_register_atpx_handler(void); | 2401 | void amdgpu_register_atpx_handler(void); |
2402 | void amdgpu_unregister_atpx_handler(void); | 2402 | void amdgpu_unregister_atpx_handler(void); |
2403 | bool amdgpu_has_atpx_dgpu_power_cntl(void); | ||
2403 | #else | 2404 | #else |
2404 | static inline void amdgpu_register_atpx_handler(void) {} | 2405 | static inline void amdgpu_register_atpx_handler(void) {} |
2405 | static inline void amdgpu_unregister_atpx_handler(void) {} | 2406 | static inline void amdgpu_unregister_atpx_handler(void) {} |
2407 | static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; } | ||
2406 | #endif | 2408 | #endif |
2407 | 2409 | ||
2408 | /* | 2410 | /* |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index c5d280ce625b..7b11af1d8c4f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | |||
@@ -64,6 +64,10 @@ bool amdgpu_has_atpx(void) { | |||
64 | return amdgpu_atpx_priv.atpx_detected; | 64 | return amdgpu_atpx_priv.atpx_detected; |
65 | } | 65 | } |
66 | 66 | ||
67 | bool amdgpu_has_atpx_dgpu_power_cntl(void) { | ||
68 | return amdgpu_atpx_priv.atpx.functions.power_cntl; | ||
69 | } | ||
70 | |||
67 | /** | 71 | /** |
68 | * amdgpu_atpx_call - call an ATPX method | 72 | * amdgpu_atpx_call - call an ATPX method |
69 | * | 73 | * |