diff mbox

[05/11] drm/exynos: use drm_send_vblank_event() helper

Message ID 1349725849-22433-6-git-send-email-rob.clark@linaro.org (mailing list archive)
State New, archived
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/exynos/exynos_drm_fimd.c |   10 ++--------
 drivers/gpu/drm/exynos/exynos_drm_vidi.c |   10 ++--------
 drivers/gpu/drm/exynos/exynos_mixer.c    |    9 ++-------
 3 files changed, 6 insertions(+), 23 deletions(-)

Comments

Dave Airlie May 21, 2013, 11:19 p.m. UTC | #1
Hi Inki,

this doesn't apply cleanly anymore, and I think we want exynos to use
drm_send_vblank_event where possible,

please apply to fixes tree and send to me.

Dave.

On Tue, Oct 9, 2012 at 5:50 AM, Rob Clark <rob.clark@linaro.org> wrote:
> From: Rob Clark <rob@ti.com>
>
> Signed-off-by: Rob Clark <rob@ti.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   10 ++--------
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c |   10 ++--------
>  drivers/gpu/drm/exynos/exynos_mixer.c    |    9 ++-------
>  3 files changed, 6 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index b19cd93..fe8fb78 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -587,7 +587,6 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
>  {
>         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
>         struct drm_pending_vblank_event *e, *t;
> -       struct timeval now;
>         unsigned long flags;
>         bool is_checked = false;
>
> @@ -601,13 +600,8 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
>
>                 is_checked = true;
>
> -               do_gettimeofday(&now);
> -               e->event.sequence = 0;
> -               e->event.tv_sec = now.tv_sec;
> -               e->event.tv_usec = now.tv_usec;
> -
> -               list_move_tail(&e->base.link, &e->base.file_priv->event_list);
> -               wake_up_interruptible(&e->base.file_priv->event_wait);
> +               list_del(&e->base.link);
> +               drm_send_vblank_event(drm_dev, -1, e);
>         }
>
>         if (is_checked) {
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> index e364165..4549efb 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> @@ -370,7 +370,6 @@ static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
>  {
>         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
>         struct drm_pending_vblank_event *e, *t;
> -       struct timeval now;
>         unsigned long flags;
>         bool is_checked = false;
>
> @@ -384,13 +383,8 @@ static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
>
>                 is_checked = true;
>
> -               do_gettimeofday(&now);
> -               e->event.sequence = 0;
> -               e->event.tv_sec = now.tv_sec;
> -               e->event.tv_usec = now.tv_usec;
> -
> -               list_move_tail(&e->base.link, &e->base.file_priv->event_list);
> -               wake_up_interruptible(&e->base.file_priv->event_wait);
> +               list_del(&e->base.link);
> +               drm_send_vblank_event(drm_dev, -1, e);
>         }
>
>         if (is_checked) {
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 25b97d5..325aefd 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -828,7 +828,6 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
>  {
>         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
>         struct drm_pending_vblank_event *e, *t;
> -       struct timeval now;
>         unsigned long flags;
>         bool is_checked = false;
>
> @@ -841,13 +840,9 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
>                         continue;
>
>                 is_checked = true;
> -               do_gettimeofday(&now);
> -               e->event.sequence = 0;
> -               e->event.tv_sec = now.tv_sec;
> -               e->event.tv_usec = now.tv_usec;
>
> -               list_move_tail(&e->base.link, &e->base.file_priv->event_list);
> -               wake_up_interruptible(&e->base.file_priv->event_wait);
> +               list_del(&e->base.link);
> +               drm_send_vblank_event(drm_dev, -1, e);
>         }
>
>         if (is_checked)
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae May 22, 2013, 2:28 a.m. UTC | #2
Hi Dave,

Got it. we have to re-work this patch. Will send it soon.

Thanks,
Inki Dae

> -----Original Message-----
> From: Dave Airlie [mailto:airlied@gmail.com]
> Sent: Wednesday, May 22, 2013 8:20 AM
> To: Inki Dae
> Cc: dri-devel@lists.freedesktop.org
> Subject: Re: [PATCH 05/11] drm/exynos: use drm_send_vblank_event() helper
> 
> Hi Inki,
> 
> this doesn't apply cleanly anymore, and I think we want exynos to use
> drm_send_vblank_event where possible,
> 
> please apply to fixes tree and send to me.
> 
> Dave.
> 
> On Tue, Oct 9, 2012 at 5:50 AM, Rob Clark <rob.clark@linaro.org> wrote:
> > From: Rob Clark <rob@ti.com>
> >
> > Signed-off-by: Rob Clark <rob@ti.com>
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   10 ++--------
> >  drivers/gpu/drm/exynos/exynos_drm_vidi.c |   10 ++--------
> >  drivers/gpu/drm/exynos/exynos_mixer.c    |    9 ++-------
> >  3 files changed, 6 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> > index b19cd93..fe8fb78 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> > @@ -587,7 +587,6 @@ static void fimd_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >  {
> >         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
> >         struct drm_pending_vblank_event *e, *t;
> > -       struct timeval now;
> >         unsigned long flags;
> >         bool is_checked = false;
> >
> > @@ -601,13 +600,8 @@ static void fimd_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >
> >                 is_checked = true;
> >
> > -               do_gettimeofday(&now);
> > -               e->event.sequence = 0;
> > -               e->event.tv_sec = now.tv_sec;
> > -               e->event.tv_usec = now.tv_usec;
> > -
> > -               list_move_tail(&e->base.link, &e->base.file_priv-
> >event_list);
> > -               wake_up_interruptible(&e->base.file_priv->event_wait);
> > +               list_del(&e->base.link);
> > +               drm_send_vblank_event(drm_dev, -1, e);
> >         }
> >
> >         if (is_checked) {
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> > index e364165..4549efb 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> > @@ -370,7 +370,6 @@ static void vidi_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >  {
> >         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
> >         struct drm_pending_vblank_event *e, *t;
> > -       struct timeval now;
> >         unsigned long flags;
> >         bool is_checked = false;
> >
> > @@ -384,13 +383,8 @@ static void vidi_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >
> >                 is_checked = true;
> >
> > -               do_gettimeofday(&now);
> > -               e->event.sequence = 0;
> > -               e->event.tv_sec = now.tv_sec;
> > -               e->event.tv_usec = now.tv_usec;
> > -
> > -               list_move_tail(&e->base.link, &e->base.file_priv-
> >event_list);
> > -               wake_up_interruptible(&e->base.file_priv->event_wait);
> > +               list_del(&e->base.link);
> > +               drm_send_vblank_event(drm_dev, -1, e);
> >         }
> >
> >         if (is_checked) {
> > diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
> b/drivers/gpu/drm/exynos/exynos_mixer.c
> > index 25b97d5..325aefd 100644
> > --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> > +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> > @@ -828,7 +828,6 @@ static void mixer_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >  {
> >         struct exynos_drm_private *dev_priv = drm_dev->dev_private;
> >         struct drm_pending_vblank_event *e, *t;
> > -       struct timeval now;
> >         unsigned long flags;
> >         bool is_checked = false;
> >
> > @@ -841,13 +840,9 @@ static void mixer_finish_pageflip(struct drm_device
> *drm_dev, int crtc)
> >                         continue;
> >
> >                 is_checked = true;
> > -               do_gettimeofday(&now);
> > -               e->event.sequence = 0;
> > -               e->event.tv_sec = now.tv_sec;
> > -               e->event.tv_usec = now.tv_usec;
> >
> > -               list_move_tail(&e->base.link, &e->base.file_priv-
> >event_list);
> > -               wake_up_interruptible(&e->base.file_priv->event_wait);
> > +               list_del(&e->base.link);
> > +               drm_send_vblank_event(drm_dev, -1, e);
> >         }
> >
> >         if (is_checked)
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index b19cd93..fe8fb78 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -587,7 +587,6 @@  static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 {
 	struct exynos_drm_private *dev_priv = drm_dev->dev_private;
 	struct drm_pending_vblank_event *e, *t;
-	struct timeval now;
 	unsigned long flags;
 	bool is_checked = false;
 
@@ -601,13 +600,8 @@  static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 
 		is_checked = true;
 
-		do_gettimeofday(&now);
-		e->event.sequence = 0;
-		e->event.tv_sec = now.tv_sec;
-		e->event.tv_usec = now.tv_usec;
-
-		list_move_tail(&e->base.link, &e->base.file_priv->event_list);
-		wake_up_interruptible(&e->base.file_priv->event_wait);
+		list_del(&e->base.link);
+		drm_send_vblank_event(drm_dev, -1, e);
 	}
 
 	if (is_checked) {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index e364165..4549efb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -370,7 +370,6 @@  static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
 {
 	struct exynos_drm_private *dev_priv = drm_dev->dev_private;
 	struct drm_pending_vblank_event *e, *t;
-	struct timeval now;
 	unsigned long flags;
 	bool is_checked = false;
 
@@ -384,13 +383,8 @@  static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
 
 		is_checked = true;
 
-		do_gettimeofday(&now);
-		e->event.sequence = 0;
-		e->event.tv_sec = now.tv_sec;
-		e->event.tv_usec = now.tv_usec;
-
-		list_move_tail(&e->base.link, &e->base.file_priv->event_list);
-		wake_up_interruptible(&e->base.file_priv->event_wait);
+		list_del(&e->base.link);
+		drm_send_vblank_event(drm_dev, -1, e);
 	}
 
 	if (is_checked) {
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 25b97d5..325aefd 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -828,7 +828,6 @@  static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
 {
 	struct exynos_drm_private *dev_priv = drm_dev->dev_private;
 	struct drm_pending_vblank_event *e, *t;
-	struct timeval now;
 	unsigned long flags;
 	bool is_checked = false;
 
@@ -841,13 +840,9 @@  static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
 			continue;
 
 		is_checked = true;
-		do_gettimeofday(&now);
-		e->event.sequence = 0;
-		e->event.tv_sec = now.tv_sec;
-		e->event.tv_usec = now.tv_usec;
 
-		list_move_tail(&e->base.link, &e->base.file_priv->event_list);
-		wake_up_interruptible(&e->base.file_priv->event_wait);
+		list_del(&e->base.link);
+		drm_send_vblank_event(drm_dev, -1, e);
 	}
 
 	if (is_checked)