[PATCH 3/7] drm/i915: add intel_display_power_enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 19, 2013 at 11:54 PM, Paulo Zanoni <przanoni at gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> This should replace intel_using_power_well. The idea is that we're
> adding the requested power domain as an argument, so this might enable
> the code to look less platform-specific and also allows us to easily
> add new domains in case we need.
>
> v2: Add more domains to enum intel_display_power_domain
>
> Requested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h      |   14 ++++++++++++++
>  drivers/gpu/drm/i915/intel_display.c |   16 +++++++++++-----
>  drivers/gpu/drm/i915/intel_drv.h     |    3 ++-
>  drivers/gpu/drm/i915/intel_pm.c      |   27 ++++++++++++++++++++++-----
>  4 files changed, 49 insertions(+), 11 deletions(-)
>
> I hope this reflects the discussions both via email and IRC.
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index bd2d7f1..c79622a 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -88,6 +88,20 @@ enum port {
>  };
>  #define port_name(p) ((p) + 'A')
>
> +enum intel_display_power_domain {
> +       POWER_DOMAIN_PIPE_A_PANEL_FITTER,
> +       POWER_DOMAIN_PIPE_A,
> +       POWER_DOMAIN_PIPE_B,
> +       POWER_DOMAIN_PIPE_C,
> +       POWER_DOMAIN_TRANSCODER_A,
> +       POWER_DOMAIN_TRANSCODER_B,
> +       POWER_DOMAIN_TRANSCODER_C,
> +       POWER_DOMAIN_TRANSCODER_EDP = POWER_DOMAIN_TRANSCODER_A + 0xF,
> +};
> +
> +#define POWER_DOMAIN_PIPE(pipe) ((pipe) + POWER_DOMAIN_PIPE_A)
> +#define POWER_DOMAIN_TRANSCODER(tran) ((tran) + POWER_DOMAIN_TRANSCODER_A)

I think if we go this way we should have a macro (and different
domains) for pfit A/B/C, too. Since now we have imo an ugly middle
ground ....
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux