From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 14/19] drm/i915: switch order of power domain init wrt. irq install Date: Thu, 20 Feb 2014 11:48:10 -0800 Message-ID: <20140220114810.1452fd50@jbarnes-desktop> References: <1392674540-10915-1-git-send-email-imre.deak@intel.com> <1392674540-10915-15-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from alt-proxy71.mail.unifiedlayer.com (alt-proxy71.mail.unifiedlayer.com [69.195.104.6]) by gabe.freedesktop.org (Postfix) with SMTP id 04D16FB3AE for ; Thu, 20 Feb 2014 11:47:58 -0800 (PST) In-Reply-To: <1392674540-10915-15-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Imre Deak Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 18 Feb 2014 00:02:15 +0200 Imre Deak wrote: > On VLV at least the display IRQ register access and functionality > depends on its power well to be on, so move the power domain HW init > before we install the IRQs. > > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/i915_dma.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 8177c17..f8f7a59 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1321,12 +1321,12 @@ static int i915_load_modeset_init(struct drm_device *dev) > if (ret) > goto cleanup_vga_switcheroo; > > + intel_power_domains_init_hw(dev_priv); > + > ret = drm_irq_install(dev); > if (ret) > goto cleanup_gem_stolen; > > - intel_power_domains_init_hw(dev_priv); > - > /* Important: The output setup functions called by modeset_init need > * working irqs for e.g. gmbus and dp aux transfers. */ > intel_modeset_init(dev); Reviewed-by: Jesse Barnes That said, this was always one part of the PM code that confused me and caused some refcounts to get messed up last time I worked on it. I think it would be better to not treat init specially, and let the power wells get turned on and off through normal power well get/put calls during init and resume. It's a bit noisy, power wise, but ultimately it might make for clearer code and one less special case. -- Jesse Barnes, Intel Open Source Technology Center