public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 4/5] drm/i915: Pull intel_init_power_well() out of intel_modeset_init_hw()
Date: Fri, 13 Sep 2013 23:26:20 +0300	[thread overview]
Message-ID: <20130913202620.GE4531@intel.com> (raw)
In-Reply-To: <CA+gsUGR0yZJrL-dRQWTrYKAVMpmh+Xce7bAKJZvJ8QUGUkWSQw@mail.gmail.com>

On Fri, Sep 13, 2013 at 05:19:34PM -0300, Paulo Zanoni wrote:
> 2013/9/12  <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The init and resume codepaths want to handel the power well in slightly
> > different ways, so pull the power well init out from
> > intel_modeset_init_hw() which gets called in both cases.
> 
> Can you please explain more? Where's the slight difference?

See patch 5. We want to keep the power well powered until we've finished
the vgacon->fbcon handoff, so we need to grab an extra power well
reference between intel_init_power_well() and first ->global_resources()
which would otherwise disable the power well.

> 
> (also, I'm not sure if this code will change due to my comment in patch 1/5)
> 
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_dma.c      | 2 ++
> >  drivers/gpu/drm/i915/i915_drv.c      | 2 ++
> >  drivers/gpu/drm/i915/intel_display.c | 2 --
> >  3 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> > index 9b265a4..e5c7b10 100644
> > --- a/drivers/gpu/drm/i915/i915_dma.c
> > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > @@ -1324,6 +1324,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
> >
> >         INIT_WORK(&dev_priv->console_resume_work, intel_console_resume);
> >
> > +       intel_init_power_well(dev);
> > +
> >         intel_modeset_gem_init(dev);
> >
> >         /* Always safe in the mode setting case. */
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ec690ca..cd5a66d 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -596,6 +596,8 @@ static int __i915_drm_thaw(struct drm_device *dev)
> >                 /* We need working interrupts for modeset enabling ... */
> >                 drm_irq_install(dev);
> >
> > +               intel_init_power_well(dev);
> > +
> >                 intel_modeset_init_hw(dev);
> >
> >                 drm_modeset_lock_all(dev);
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index d06e3b4..53f5a1f 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -10343,8 +10343,6 @@ void i915_disable_vga_mem(struct drm_device *dev)
> >
> >  void intel_modeset_init_hw(struct drm_device *dev)
> >  {
> > -       intel_init_power_well(dev);
> > -
> >         intel_prepare_ddi(dev);
> >
> >         intel_init_clock_gating(dev);
> > --
> > 1.8.1.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Paulo Zanoni

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-09-13 20:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 14:12 [PATCH 0/5] drm/i915: VGA vs. power well ville.syrjala
2013-09-12 14:12 ` [PATCH 1/5] drm/i915: Add intel_display_power_{get, put} to request power for specific domains ville.syrjala
2013-09-13 20:05   ` Paulo Zanoni
2013-09-13 20:49     ` Ville Syrjälä
2013-09-13 21:43       ` Paulo Zanoni
2013-09-12 14:12 ` [PATCH 2/5] drm/i915: Refactor power well refcount inc/dec operations ville.syrjala
2013-09-13 20:09   ` Paulo Zanoni
2013-09-13 20:16     ` Chris Wilson
2013-09-12 14:12 ` [PATCH 3/5] drm/i915: Add POWER_DOMAIN_VGA ville.syrjala
2013-09-13 20:16   ` Paulo Zanoni
2013-09-12 14:12 ` [PATCH 4/5] drm/i915: Pull intel_init_power_well() out of intel_modeset_init_hw() ville.syrjala
2013-09-13 20:19   ` Paulo Zanoni
2013-09-13 20:26     ` Ville Syrjälä [this message]
2013-09-12 14:12 ` [PATCH 5/5] drm/i915: Fix unclaimed register access due to delayed VGA memroy disable ville.syrjala
2013-09-13 20:27   ` Paulo Zanoni
2013-09-13 20:59     ` Ville Syrjälä

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=20130913202620.GE4531@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=przanoni@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox