drm/i915: Remove start frame argument to pipe_update_begin/end.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 31 Aug 2015 11:04:25 +0000 (13:04 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 2 Sep 2015 11:51:30 +0000 (13:51 +0200)
There's already a per crtc member that can be used for it.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c

index 3f60cf4fe6fd8a2b6589893c7971ec7ccae9e58b..d38ceb039de63f1dfd45f51f48f60d25277b64cb 100644 (file)
@@ -11142,11 +11142,10 @@ static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
 static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
 {
        struct drm_device *dev = intel_crtc->base.dev;
-       u32 start_vbl_count;
 
        intel_mark_page_flip_active(intel_crtc);
 
-       intel_pipe_update_start(intel_crtc, &start_vbl_count);
+       intel_pipe_update_start(intel_crtc);
 
        if (INTEL_INFO(dev)->gen >= 9)
                skl_do_mmio_flip(intel_crtc);
@@ -11154,7 +11153,7 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
                /* use_mmio_flip() retricts MMIO flips to ilk+ */
                ilk_do_mmio_flip(intel_crtc);
 
-       intel_pipe_update_end(intel_crtc, start_vbl_count);
+       intel_pipe_update_end(intel_crtc);
 }
 
 static void intel_mmio_flip_work_func(struct work_struct *work)
@@ -13463,7 +13462,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
 
        /* Perform vblank evasion around commit operation */
        if (crtc->state->active)
-               intel_pipe_update_start(intel_crtc, &intel_crtc->start_vbl_count);
+               intel_pipe_update_start(intel_crtc);
 
        if (!needs_modeset(crtc->state) && INTEL_INFO(dev)->gen >= 9)
                skl_detach_scalers(intel_crtc);
@@ -13475,7 +13474,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
        struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 
        if (crtc->state->active)
-               intel_pipe_update_end(intel_crtc, intel_crtc->start_vbl_count);
+               intel_pipe_update_end(intel_crtc);
 }
 
 /**
index 30012c8ea42ff85765781a593c98dd1881266349..8f8d320486ff2b5d12ecca9da70c550c27f05697 100644 (file)
@@ -1414,9 +1414,8 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob);
 int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane);
 int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
                              struct drm_file *file_priv);
-void intel_pipe_update_start(struct intel_crtc *crtc,
-                            uint32_t *start_vbl_count);
-void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count);
+void intel_pipe_update_start(struct intel_crtc *crtc);
+void intel_pipe_update_end(struct intel_crtc *crtc);
 
 /* intel_tv.c */
 void intel_tv_init(struct drm_device *dev);
index 9d8af2f8a87596caf23ddc65ae7e13025d9c5f9a..c35c2339f472394189402cc6ad188647f8519f79 100644 (file)
@@ -76,7 +76,7 @@ static int usecs_to_scanlines(const struct drm_display_mode *mode, int usecs)
  * avoid random delays. The value written to @start_vbl_count should be
  * supplied to intel_pipe_update_end() for error checking.
  */
-void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
+void intel_pipe_update_start(struct intel_crtc *crtc)
 {
        struct drm_device *dev = crtc->base.dev;
        const struct drm_display_mode *mode = &crtc->config->base.adjusted_mode;
@@ -95,7 +95,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
        max = vblank_start - 1;
 
        local_irq_disable();
-       *start_vbl_count = 0;
+       crtc->start_vbl_count = 0;
 
        if (min <= 0 || max <= 0)
                return;
@@ -134,9 +134,10 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
 
        drm_crtc_vblank_put(&crtc->base);
 
-       *start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
+       crtc->start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
 
-       trace_i915_pipe_update_vblank_evaded(crtc, min, max, *start_vbl_count);
+       trace_i915_pipe_update_vblank_evaded(crtc, min, max,
+                                            crtc->start_vbl_count);
 }
 
 /**
@@ -148,7 +149,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
  * re-enables interrupts and verifies the update was actually completed
  * before a vblank using the value of @start_vbl_count.
  */
-void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count)
+void intel_pipe_update_end(struct intel_crtc *crtc)
 {
        struct drm_device *dev = crtc->base.dev;
        enum pipe pipe = crtc->pipe;
@@ -158,9 +159,9 @@ void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count)
 
        local_irq_enable();
 
-       if (start_vbl_count && start_vbl_count != end_vbl_count)
+       if (crtc->start_vbl_count && crtc->start_vbl_count != end_vbl_count)
                DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u)\n",
-                         pipe_name(pipe), start_vbl_count, end_vbl_count);
+                         pipe_name(pipe), crtc->start_vbl_count, end_vbl_count);
 }
 
 static void