From: Daniel Vetter <daniel@ffwll.ch>
To: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915: Switch to drm_crtc variants of vblank functions
Date: Fri, 13 Feb 2015 08:46:53 +0100 [thread overview]
Message-ID: <20150213074653.GD24485@phenom.ffwll.local> (raw)
In-Reply-To: <1423781832.3277.32.camel@ideak-mobl>
On Fri, Feb 13, 2015 at 12:57:12AM +0200, Imre Deak wrote:
> On Tue, 2015-02-03 at 11:30 +0100, Daniel Vetter wrote:
> > Where possible right now. Just a small step towards nirvana ...
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 2 +-
> > drivers/gpu/drm/i915/intel_display.c | 9 +++++----
> > drivers/gpu/drm/i915/intel_sprite.c | 4 ++--
> > 3 files changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 3b332a493674..479ea0825166 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -580,7 +580,7 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)
> > seq_printf(m, "Flip queued on frame %d, (was ready on frame %d), now %d\n",
> > work->flip_queued_vblank,
> > work->flip_ready_vblank,
> > - drm_vblank_count(dev, crtc->pipe));
> > + drm_crtc_vblank_count(dev, &crtc->base));
>
> This doesn't compile, did these functions change meanwhile?
Oh dear, git add fail. I'll resend, including the follow-up fix for
drm_irq_uninstall.
Thanks a lot for your review.
-Daniel
>
> > if (work->enable_stall_check)
> > seq_puts(m, "Stall check enabled, ");
> > else
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index f8871a184747..2c33ef5c5f68 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -9674,10 +9674,10 @@ static bool __intel_pageflip_stall_check(struct drm_device *dev,
> > !i915_gem_request_completed(work->flip_queued_req, true))
> > return false;
> >
> > - work->flip_ready_vblank = drm_vblank_count(dev, intel_crtc->pipe);
> > + work->flip_ready_vblank = drm_crtc_vblank_count(dev, crtc);
> > }
> >
> > - if (drm_vblank_count(dev, intel_crtc->pipe) - work->flip_ready_vblank < 3)
> > + if (drm_crtc_vblank_count(dev, crtc) - work->flip_ready_vblank < 3)
> > return false;
> >
> > /* Potential stall - if we see that the flip has happened,
> > @@ -9708,7 +9708,8 @@ void intel_check_page_flip(struct drm_device *dev, int pipe)
> > spin_lock(&dev->event_lock);
> > if (intel_crtc->unpin_work && __intel_pageflip_stall_check(dev, crtc)) {
> > WARN_ONCE(1, "Kicking stuck page flip: queued at %d, now %d\n",
> > - intel_crtc->unpin_work->flip_queued_vblank, drm_vblank_count(dev, pipe));
> > + intel_crtc->unpin_work->flip_queued_vblank,
> > + drm_vblank_count(dev, pipe));
>
> Did you want to change this too? Regardless of this by making it
> compile:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
>
> > page_flip_completed(intel_crtc);
> > }
> > spin_unlock(&dev->event_lock);
> > @@ -9849,7 +9850,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> > intel_ring_get_request(ring));
> > }
> >
> > - work->flip_queued_vblank = drm_vblank_count(dev, intel_crtc->pipe);
> > + work->flip_queued_vblank = drm_crtc_vblank_count(dev, crtc);
> > work->enable_stall_check = true;
> >
> > i915_gem_track_fb(work->old_fb_obj, obj,
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > index 0a52c44ad03d..0f499adfe2e0 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -98,7 +98,7 @@ bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
> > if (min <= 0 || max <= 0)
> > return false;
> >
> > - if (WARN_ON(drm_vblank_get(dev, pipe)))
> > + if (WARN_ON(drm_crtc_vblank_get(dev, &crtc->base)))
> > return false;
> >
> > local_irq_disable();
> > @@ -132,7 +132,7 @@ bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
> >
> > finish_wait(wq, &wait);
> >
> > - drm_vblank_put(dev, pipe);
> > + drm_crtc_vblank_put(dev, &crtc->base);
> >
> > *start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
> >
>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-02-13 7:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 10:30 [PATCH 1/4] drm/irq: Add drm_crtc_vblank_reset Daniel Vetter
2015-02-03 10:30 ` [PATCH 2/4] drm/i915: Drop pipe_enable checks in vblank funcs Daniel Vetter
2015-02-12 22:37 ` Imre Deak
2015-02-13 7:39 ` Daniel Vetter
2015-02-03 10:30 ` [PATCH 3/4] drm/i915: Flatten DRIVER_MODESET checks in i915_irq.c Daniel Vetter
2015-02-12 22:38 ` Imre Deak
2015-02-19 12:25 ` Dave Gordon
2015-02-19 13:39 ` Imre Deak
2015-02-19 13:42 ` Imre Deak
2015-02-23 11:32 ` [Intel-gfx] " Imre Deak
2015-02-03 10:30 ` [PATCH 4/4] drm/i915: Switch to drm_crtc variants of vblank functions Daniel Vetter
2015-02-12 22:57 ` Imre Deak
2015-02-13 7:46 ` Daniel Vetter [this message]
2015-02-03 11:31 ` [PATCH 1/4] drm/irq: Add drm_crtc_vblank_reset Laurent Pinchart
2015-02-03 11:53 ` Daniel Vetter
2015-02-04 9:31 ` [Intel-gfx] " Ville Syrjälä
2015-02-12 21:56 ` Imre Deak
2015-02-13 7:44 ` Daniel Vetter
2015-02-13 11:35 ` Imre Deak
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=20150213074653.GD24485@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox