diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-06-02 09:24:53 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 14:51:09 -0400 |
commit | b8c9fd5ad4b478ec1a5482177833e1a7082e48bd (patch) | |
tree | bde1728e14bbeaf609e92f81cdc96862ea942db1 /drivers/gpu/drm/radeon | |
parent | 522761cbc80df90e94a77cf699fa0c94f55aa43c (diff) |
drm/radeon/atpx: track whether if this is a hybrid graphics platform
hybrid graphics in this case refers to systems which use the new
platform d3 cold ACPI methods as opposed to ATPX for dGPU power
control.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atpx_handler.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 6996b316d5c5..de17b5ed3ea4 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
@@ -28,6 +28,7 @@ struct radeon_atpx_functions { | |||
28 | struct radeon_atpx { | 28 | struct radeon_atpx { |
29 | acpi_handle handle; | 29 | acpi_handle handle; |
30 | struct radeon_atpx_functions functions; | 30 | struct radeon_atpx_functions functions; |
31 | bool is_hybrid; | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | static struct radeon_atpx_priv { | 34 | static struct radeon_atpx_priv { |
@@ -67,6 +68,10 @@ bool radeon_has_atpx_dgpu_power_cntl(void) { | |||
67 | return radeon_atpx_priv.atpx.functions.power_cntl; | 68 | return radeon_atpx_priv.atpx.functions.power_cntl; |
68 | } | 69 | } |
69 | 70 | ||
71 | bool radeon_is_atpx_hybrid(void) { | ||
72 | return radeon_atpx_priv.atpx.is_hybrid; | ||
73 | } | ||
74 | |||
70 | /** | 75 | /** |
71 | * radeon_atpx_call - call an ATPX method | 76 | * radeon_atpx_call - call an ATPX method |
72 | * | 77 | * |
@@ -190,9 +195,11 @@ static int radeon_atpx_validate(struct radeon_atpx *atpx) | |||
190 | ATPX_DYNAMIC_DGPU_POWER_OFF_SUPPORTED)) | 195 | ATPX_DYNAMIC_DGPU_POWER_OFF_SUPPORTED)) |
191 | atpx->functions.power_cntl = true; | 196 | atpx->functions.power_cntl = true; |
192 | 197 | ||
198 | atpx->is_hybrid = false; | ||
193 | if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) { | 199 | if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) { |
194 | printk("Hybrid Graphics, ATPX dGPU power cntl disabled\n"); | 200 | printk("ATPX Hybrid Graphics\n"); |
195 | atpx->functions.power_cntl = false; | 201 | atpx->functions.power_cntl = false; |
202 | atpx->is_hybrid = true; | ||
196 | } | 203 | } |
197 | 204 | ||
198 | return 0; | 205 | return 0; |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 601eae840b74..1ef9ab3d3ddd 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -164,10 +164,12 @@ void radeon_debugfs_cleanup(struct drm_minor *minor); | |||
164 | void radeon_register_atpx_handler(void); | 164 | void radeon_register_atpx_handler(void); |
165 | void radeon_unregister_atpx_handler(void); | 165 | void radeon_unregister_atpx_handler(void); |
166 | bool radeon_has_atpx_dgpu_power_cntl(void); | 166 | bool radeon_has_atpx_dgpu_power_cntl(void); |
167 | bool radeon_is_atpx_hybrid(void); | ||
167 | #else | 168 | #else |
168 | static inline void radeon_register_atpx_handler(void) {} | 169 | static inline void radeon_register_atpx_handler(void) {} |
169 | static inline void radeon_unregister_atpx_handler(void) {} | 170 | static inline void radeon_unregister_atpx_handler(void) {} |
170 | static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; } | 171 | static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; } |
172 | static inline bool radeon_is_atpx_hybrid(void) { return false; } | ||
171 | #endif | 173 | #endif |
172 | 174 | ||
173 | int radeon_no_wb; | 175 | int radeon_no_wb; |