drm/i915: Switch to drm_crtc variants of vblank functions
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Feb 2015 20:03:45 +0000 (21:03 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 23 Feb 2015 09:54:28 +0000 (10:54 +0100)
Where possible right now. Just a small step towards nirvana ...

v2: git add. Uggh. Noticed by Imre.

Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c

index 661527cb00ea6cfd8de425f357844451119f617d..3a08684a7af33710536ecd87dcb5916643a67fb8 100644 (file)
@@ -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(&crtc->base));
                        if (work->enable_stall_check)
                                seq_puts(m, "Stall check enabled, ");
                        else
index b901b00a8f2ea4443bce0f3515629b7957f759bd..c5347e1cbb9bb3f414650fbe6b63657150024c34 100644 (file)
@@ -9661,10 +9661,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(crtc);
        }
 
-       if (drm_vblank_count(dev, intel_crtc->pipe) - work->flip_ready_vblank < 3)
+       if (drm_crtc_vblank_count(crtc) - work->flip_ready_vblank < 3)
                return false;
 
        /* Potential stall - if we see that the flip has happened,
@@ -9695,7 +9695,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));
                page_flip_completed(intel_crtc);
        }
        spin_unlock(&dev->event_lock);
@@ -9837,7 +9838,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(crtc);
        work->enable_stall_check = true;
 
        i915_gem_track_fb(intel_fb_obj(work->old_fb), obj,
index f2d408dd7c155f00b0fcea93c0853959f7e56f8f..5ae56ecbca72a00b297c75f8cc8509810abffc53 100644 (file)
@@ -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(&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(&crtc->base);
 
        *start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);