public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Grab RPM wakeref around enabling vblank interrupts
Date: Fri, 7 Oct 2016 22:17:11 +0300	[thread overview]
Message-ID: <20161007191711.GA4329@intel.com> (raw)
In-Reply-To: <20161007190035.GX22676@nuc-i3427.alporthouse.com>

On Fri, Oct 07, 2016 at 08:00:35PM +0100, Chris Wilson wrote:
> On Fri, Oct 07, 2016 at 07:57:21PM +0100, Chris Wilson wrote:
> > On Fri, Oct 07, 2016 at 09:44:53PM +0300, Ville Syrjälä wrote:
> > > On Fri, Oct 07, 2016 at 07:33:00PM +0100, Chris Wilson wrote:
> > > > On Fri, Oct 07, 2016 at 09:06:07PM +0300, Ville Syrjälä wrote:
> > > > > On Fri, Oct 07, 2016 at 02:50:32PM +0100, Chris Wilson wrote:
> > > > > > Whilst the vblank is configured to send an interrupt everytime, we need
> > > > > > to keep the device awake to process those interrupts.
> > > > > 
> > > > > If we can enable vblanks the pipe will be active, and thus we can't
> > > > > runtime suspend anyway. Also might_sleep() would be a problem.
> > > > 
> > > > Where is the pipe made active? Is it just having any mode is sufficient
> > > > to disable rpm? Will that always be the case?
> > > 
> > > Active pipe holds a power domain reference, which implies an rpm
> > > reference as well.
> > 
> > What's the best way to write
> > 
> > 	/* vblank IRQ requires the powerwell to stay awake */
> > 	WARN_ON(!to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe])->active);

Probably just that. We have some kind of function to hide the details
of the array a bit though, I just never rememer what it's called.
And I think I have patches somewhere to convert all of that over to
storing intel_crtc * instead of drm_crtc * since that's what everyone
wants.

> 
> Also, any reason why we shouldn't merge valleyview_enable_vblank() with
> i915_enable_vblank()?

No reason AFAICS. Same for disable. Though maybe we should add the gen
check to disable to make it symmetric, just to avoid some head scratching.

Hmm. Or actually, maybe just split to i915_*_vblank() and i965_*_vblank()
instead. Not much point in having the if in there when you can just
assign the right function pointer to begin with.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-07 19:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 13:50 [PATCH] drm/i915: Grab RPM wakeref around enabling vblank interrupts Chris Wilson
2016-10-07 18:06 ` Ville Syrjälä
2016-10-07 18:33   ` Chris Wilson
2016-10-07 18:44     ` Ville Syrjälä
2016-10-07 18:57       ` Chris Wilson
2016-10-07 19:00         ` Chris Wilson
2016-10-07 19:17           ` Ville Syrjälä [this message]
2016-10-10 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork

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=20161007191711.GA4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox