[PATCH 1/4] drm/amdgpu/atpx: check for ATIF dGPU wake for display events support

Alex Deucher alexdeucher at gmail.com
Mon Sep 19 16:00:23 UTC 2016


On Wed, Sep 14, 2016 at 2:49 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
> 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 at amd.com>

Ping on this series?

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h              | 2 ++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 9 +++++++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 588baaf..681e920 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -2463,11 +2463,13 @@ void amdgpu_register_atpx_handler(void);
>  void amdgpu_unregister_atpx_handler(void);
>  bool amdgpu_has_atpx_dgpu_power_cntl(void);
>  bool amdgpu_is_atpx_hybrid(void);
> +bool amdgpu_atpx_dgpu_req_power_for_displays(void);
>  #else
>  static inline void amdgpu_register_atpx_handler(void) {}
>  static inline void amdgpu_unregister_atpx_handler(void) {}
>  static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; }
>  static inline bool amdgpu_is_atpx_hybrid(void) { return false; }
> +static inline bool amdgpu_atpx_dgpu_req_power_for_displays(void) { return false; }
>  #endif
>
>  /*
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> index 49de926..550c5ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> @@ -29,6 +29,7 @@ struct amdgpu_atpx {
>         acpi_handle handle;
>         struct amdgpu_atpx_functions functions;
>         bool is_hybrid;
> +       bool dgpu_req_power_for_displays;
>  };
>
>  static struct amdgpu_atpx_priv {
> @@ -73,6 +74,10 @@ bool amdgpu_is_atpx_hybrid(void) {
>         return amdgpu_atpx_priv.atpx.is_hybrid;
>  }
>
> +bool amdgpu_atpx_dgpu_req_power_for_displays(void) {
> +       return amdgpu_atpx_priv.atpx.dgpu_req_power_for_displays;
> +}
> +
>  /**
>   * amdgpu_atpx_call - call an ATPX method
>   *
> @@ -213,6 +218,10 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
>                 atpx->is_hybrid = true;
>         }
>
> +       atpx->dgpu_req_power_for_displays = false;
> +       if (valid_bits & ATPX_DGPU_REQ_POWER_FOR_DISPLAYS)
> +               atpx->dgpu_req_power_for_displays = true;
> +
>         return 0;
>  }
>
> --
> 2.5.5
>


More information about the amd-gfx mailing list