diff mbox

[02/11] drm/i915: use drm_send_vblank_event() helper

Message ID 1349725849-22433-3-git-send-email-rob.clark@linaro.org
State Accepted
Commit 45a066eba491683beb2d65a19e625b50129dca44
Headers show

Commit Message

Rob Clark Oct. 8, 2012, 7:50 p.m. UTC
From: Rob Clark <rob@ti.com>

Signed-off-by: Rob Clark <rob@ti.com>
---
 drivers/gpu/drm/i915/intel_display.c |   15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

Comments

Daniel Vetter Oct. 9, 2012, 8:02 a.m. UTC | #1
On Mon, Oct 08, 2012 at 02:50:40PM -0500, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
> 
> Signed-off-by: Rob Clark <rob@ti.com>

Maybe note in the commit message that after this change pageflip events
will also fire the vblank_event_delivered tracepoint.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/i915/intel_display.c |   15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f5bcf6f..4716c83 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6158,8 +6158,6 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
>  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>  	struct intel_unpin_work *work;
>  	struct drm_i915_gem_object *obj;
> -	struct drm_pending_vblank_event *e;
> -	struct timeval tvbl;
>  	unsigned long flags;
>  
>  	/* Ignore early vblank irqs */
> @@ -6175,17 +6173,8 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
>  
>  	intel_crtc->unpin_work = NULL;
>  
> -	if (work->event) {
> -		e = work->event;
> -		e->event.sequence = drm_vblank_count_and_time(dev, intel_crtc->pipe, &tvbl);
> -
> -		e->event.tv_sec = tvbl.tv_sec;
> -		e->event.tv_usec = tvbl.tv_usec;
> -
> -		list_add_tail(&e->base.link,
> -			      &e->base.file_priv->event_list);
> -		wake_up_interruptible(&e->base.file_priv->event_wait);
> -	}
> +	if (work->event)
> +		drm_send_vblank_event(dev, intel_crtc->pipe, work->event);
>  
>  	drm_vblank_put(dev, intel_crtc->pipe);
>  
> -- 
> 1.7.9.5
>
Daniel Vetter Nov. 21, 2012, 4:48 p.m. UTC | #2
On Mon, Oct 08, 2012 at 02:50:40PM -0500, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
> 
> Signed-off-by: Rob Clark <rob@ti.com>
Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f5bcf6f..4716c83 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6158,8 +6158,6 @@  static void do_intel_finish_page_flip(struct drm_device *dev,
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	struct intel_unpin_work *work;
 	struct drm_i915_gem_object *obj;
-	struct drm_pending_vblank_event *e;
-	struct timeval tvbl;
 	unsigned long flags;
 
 	/* Ignore early vblank irqs */
@@ -6175,17 +6173,8 @@  static void do_intel_finish_page_flip(struct drm_device *dev,
 
 	intel_crtc->unpin_work = NULL;
 
-	if (work->event) {
-		e = work->event;
-		e->event.sequence = drm_vblank_count_and_time(dev, intel_crtc->pipe, &tvbl);
-
-		e->event.tv_sec = tvbl.tv_sec;
-		e->event.tv_usec = tvbl.tv_usec;
-
-		list_add_tail(&e->base.link,
-			      &e->base.file_priv->event_list);
-		wake_up_interruptible(&e->base.file_priv->event_wait);
-	}
+	if (work->event)
+		drm_send_vblank_event(dev, intel_crtc->pipe, work->event);
 
 	drm_vblank_put(dev, intel_crtc->pipe);