drm/radeon/atpx: check for ATIF dGPU wake for display events support
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Sep 2016 18:14:55 +0000 (14:14 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Sep 2016 14:30:45 +0000 (10:30 -0400)
Some ATPX laptops implement special circuitry to generate
display hotplug events via ACPI when the dGPU is powered off.
Check if this is supported.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_atpx_handler.c

index 6de3428612027f5da11ccec1e1827bc828e4e341..a1321b2fa454dc1a6ab8dd87bdbb9ac13a5c2ece 100644 (file)
@@ -29,6 +29,7 @@ struct radeon_atpx {
        acpi_handle handle;
        struct radeon_atpx_functions functions;
        bool is_hybrid;
+       bool dgpu_req_power_for_displays;
 };
 
 static struct radeon_atpx_priv {
@@ -72,6 +73,10 @@ bool radeon_is_atpx_hybrid(void) {
        return radeon_atpx_priv.atpx.is_hybrid;
 }
 
+bool radeon_atpx_dgpu_req_power_for_displays(void) {
+       return radeon_atpx_priv.atpx.dgpu_req_power_for_displays;
+}
+
 /**
  * radeon_atpx_call - call an ATPX method
  *