From: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
To: "david.weinehall@linux.intel.com" <david.weinehall@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Avoid vblank counter for gen9+
Date: Fri, 12 Feb 2016 16:21:33 +0000 [thread overview]
Message-ID: <1455294140.5591.418.camel@intel.com> (raw)
In-Reply-To: <1455292681.5591.412.camel@intel.com>
Oh, actually please just ignore this patch completely.
More work here need to be done. This apparently helped on the issue
that I was facing here but doesnt' solve completely.
On Fri, 2016-02-12 at 07:58 -0800, Rodrigo Vivi wrote:
> On Fri, 2016-02-12 at 11:34 +0200, David Weinehall wrote:
> > On Thu, Feb 11, 2016 at 09:00:47AM -0800, Rodrigo Vivi wrote:
> > > Framecounter register is read-only so DMC cannot restore it
> > > after exiting DC5 and DC6.
> > >
> > > Easiest way to go is to avoid the counter and use vblank
> > > interruptions for this platform and for all the following
> > > ones since DMC came to stay. At least while we can't change
> > > this register to read-write.
> > >
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/i915_irq.c | 7 +++++--
> > > 1 file changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_irq.c
> > > b/drivers/gpu/drm/i915/i915_irq.c
> > > index 25a8937..c294a4b 100644
> > > --- a/drivers/gpu/drm/i915/i915_irq.c
> > > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > > @@ -4556,7 +4556,10 @@ void intel_irq_init(struct
> > > drm_i915_private
> > > *dev_priv)
> > >
> > > pm_qos_add_request(&dev_priv->pm_qos,
> > > PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
> > >
> > > - if (IS_GEN2(dev_priv)) {
> > > + if (INTEL_INFO(dev_priv)->gen >= 9) {
> > > + dev->max_vblank_count = 0;
> > > + dev->driver->get_vblank_counter =
> > > g4x_get_vblank_counter;
> > > + } else if (IS_GEN2(dev_priv)) {
> > > dev->max_vblank_count = 0;
> > > dev->driver->get_vblank_counter =
> > > i8xx_get_vblank_counter;
> > > } else if (IS_G4X(dev_priv) || INTEL_INFO(dev_priv)->gen
> > > > = 5) {
> > > @@ -4572,7 +4575,7 @@ void intel_irq_init(struct drm_i915_private
> > > *dev_priv)
> > > * Gen2 doesn't have a hardware frame counter and so
> > > depends on
> > > * vblank interrupts to produce sane vblank seuquence
> > > numbers.
> > > */
> > > - if (!IS_GEN2(dev_priv))
> > > + if (!IS_GEN2(dev_priv) && !INTEL_INFO(dev_priv)->gen >=
> > > 9)
> >
> > I think this should be:
> >
> > if (INTEL_INFO(dev_priv)->gen < 9)
>
> Yeap, < 9 is better...
>
> >
> > If gen < 9, then IS_GEN2 is always true, also ! has higher
> > precedence
> > than >=, so you're essentially comparing whether the logical
> > negation
> > of
> > INTEL_INFO(dev_priv)->gen is >= 9.
>
> but it is also !gen2
>
> So I believe the right is
>
> if (INTEL_INFO(dev_priv)->gen < 9 && !IS_GEN2(dev_priv))
>
> agree?
>
> >
> >
> > Kind regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-02-12 16:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 17:00 [PATCH] drm/i915: Avoid vblank counter for gen9+ Rodrigo Vivi
2016-02-12 1:19 ` kbuild test robot
2016-02-12 1:32 ` kbuild test robot
2016-02-12 15:51 ` Vivi, Rodrigo
2016-02-12 9:34 ` David Weinehall
2016-02-12 15:57 ` Vivi, Rodrigo
2016-02-12 16:21 ` Vivi, Rodrigo [this message]
2016-02-12 16:04 ` Ville Syrjälä
2016-02-16 8:09 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-02-16 15:50 ` [PATCH] " Daniel Vetter
2016-02-17 23:14 ` Rodrigo Vivi
2016-02-18 16:56 ` Fwd: " Rodrigo Vivi
2016-02-18 17:55 ` Imre Deak
2016-02-22 14:33 ` Imre Deak
2016-02-26 18:02 ` Rodrigo Vivi
2016-03-02 17:13 ` Imre Deak
2016-03-03 10:14 ` Patrik Jakobsson
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=1455294140.5591.418.camel@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=david.weinehall@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).