All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/i915: use power get/put instead of set for power on after init
Date: Mon, 21 Oct 2013 21:02:27 +0200	[thread overview]
Message-ID: <20131021190227.GL4830@phenom.ffwll.local> (raw)
In-Reply-To: <1381933553-19529-7-git-send-email-imre.deak@intel.com>

On Wed, Oct 16, 2013 at 05:25:53PM +0300, Imre Deak wrote:
> Currently we make sure that all power domains are enabled during driver
> init and turn off unneded ones only after the first modeset. Similarly
> during suspend we enable all power domains, which will remain on through
> the following resume until the first modeset.
> 
> This logic is supported by intel_set_power_well() in the power domain
> framework. It would be nice to simplify the API, so that we only have
> get/put functions and make it more explicit on the higher level how this
> "power well on during init" logic works. This will make it also easier
> if in the future we want to shorten the time the power wells are on.
> 
> For this add a new device private flag tracking whether we have the
> power wells on because of init/suspend and use only
> intel_display_power_get()/put(). As nothing else uses
> intel_set_power_well() we can remove it.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---

[snip]

> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index e4354dd..0557c6b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -100,6 +100,7 @@ enum intel_display_power_domain {
>  	POWER_DOMAIN_TRANSCODER_C,
>  	POWER_DOMAIN_TRANSCODER_EDP,
>  	POWER_DOMAIN_VGA,
> +	POWER_DOMAIN_INIT,
>  
>  	POWER_DOMAIN_NUM,
>  };
> @@ -913,7 +914,6 @@ struct i915_power_well {
>  	struct mutex lock;
>  	/* power well enable/disable usage count */
>  	int count;
> -	int i915_request;
>  };
>  
>  struct i915_dri1_state {
> @@ -1369,6 +1369,11 @@ typedef struct drm_i915_private {
>  	 * mchdev_lock in intel_pm.c */
>  	struct intel_ilk_power_mgmt ips;
>  
> +	/*
> +	 * Power wells needed for initialization at driver init and suspend
> +	 * time are on. They are kept on until after the first modeset.
> +	 */
> +	bool init_power_on;

Please move this into the nice power_well structure we have to avoid
overtly polluting our i915_driver_private thing ... All patches up to this
one merged, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  parent reply	other threads:[~2013-10-21 19:10 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 14:25 [PATCH 0/6] preparation for multiple power-wells Imre Deak
2013-10-16 14:25 ` [PATCH 1/6] drm/i915: make the intel_display_power_domain enum compact Imre Deak
2013-10-18 18:48   ` Jesse Barnes
2013-10-16 14:25 ` [PATCH 2/6] drm/i915: factor out is_always_on_domain Imre Deak
2013-10-18 18:49   ` Jesse Barnes
2013-10-16 14:25 ` [PATCH 3/6] drm/i915: change power_well->lock to be mutex Imre Deak
2013-10-16 16:19   ` Paulo Zanoni
2013-10-16 16:31     ` Imre Deak
2013-10-18 18:50   ` Jesse Barnes
2013-10-19 11:02     ` Daniel Vetter
2013-10-16 14:25 ` [PATCH 4/6] drm/i915: factor out modeset_update_power_wells Imre Deak
2013-10-18 18:51   ` Jesse Barnes
2013-10-16 14:25 ` [PATCH 5/6] drm/i915: enable only the needed power domains during modeset Imre Deak
2013-10-18 18:53   ` Jesse Barnes
2013-10-22 20:07     ` Paulo Zanoni
2013-10-23  9:02       ` Imre Deak
2013-10-16 14:25 ` [PATCH 6/6] drm/i915: use power get/put instead of set for power on after init Imre Deak
2013-10-18 18:56   ` Jesse Barnes
2013-10-21 19:02   ` Daniel Vetter [this message]
2013-10-22 17:47   ` [PATCH 1/2] drm/i915: prepare for multiple power wells Imre Deak
2013-10-22 17:47     ` [PATCH v2 2/2] drm/i915: use power get/put instead of set for power on after init Imre Deak
2013-10-23 13:56     ` [PATCH 1/2] drm/i915: prepare for multiple power wells Paulo Zanoni
2013-10-23 14:46       ` Imre Deak
2013-10-25 14:36     ` [PATCH v3 0/4] " Imre Deak
2013-10-25 14:36     ` [PATCH v3 1/4] drm/i915: " Imre Deak
2013-10-25 14:36     ` [PATCH v3 2/4] drm/i915: use power get/put instead of set for power on after init Imre Deak
2013-10-25 19:31       ` Paulo Zanoni
2013-10-25 14:36     ` [PATCH v3 3/4] drm/i915: remove device field from struct power_well Imre Deak
2013-10-25 19:50       ` Paulo Zanoni
2013-10-27 19:30         ` Daniel Vetter
2013-10-28 17:41           ` Paulo Zanoni
2013-10-28 18:31             ` Imre Deak
2013-10-25 14:36     ` [PATCH v3 4/4] drm/i915: rename i915_init_power_well to i915_init_power_domains Imre Deak
2013-10-25 20:10       ` Paulo Zanoni
2013-10-27 12:44         ` Daniel Vetter
2013-10-28 15:20       ` [PATCH v4] drm/i915: rename i915_init_power_well to init_power_domains_init Imre Deak
2013-10-28 18:51         ` Paulo Zanoni
2013-10-29 17:53           ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131021190227.GL4830@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.