From: Imre Deak <imre.deak@intel.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: patches@linaro.org, daniel.vetter@ffwll.ch,
dri-devel@lists.freedesktop.org,
laurent.pinchart@ideasonboard.com, gregkh@linuxfoundation.org,
Rob Clark <rob@ti.com>,
bskeggs@redhat.com
Subject: Re: [PATCH 11/11] drm/omap: page-flip fixes
Date: Tue, 09 Oct 2012 12:35:33 +0300 [thread overview]
Message-ID: <1349775333.9882.2.camel@localhost> (raw)
In-Reply-To: <1349725849-22433-12-git-send-email-rob.clark@linaro.org>
On Mon, 2012-10-08 at 14:50 -0500, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
>
> Userspace might not request a vblank event. So it is not an error
> for 'event' to be NULL, and we shouldn't use it to determine if
> there is a pending flip already.
>
> Signed-off-by: Rob Clark <rob@ti.com>
> ---
> drivers/staging/omapdrm/omap_crtc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
> index 74e019a..317b854 100644
> --- a/drivers/staging/omapdrm/omap_crtc.c
> +++ b/drivers/staging/omapdrm/omap_crtc.c
> @@ -119,7 +119,6 @@ static void vblank_cb(void *arg)
> struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
> unsigned long flags;
>
> - WARN_ON(!event);
> spin_lock_irqsave(&dev->event_lock, flags);
>
> /* wakeup userspace */
> @@ -127,6 +126,7 @@ static void vblank_cb(void *arg)
> drm_send_vblank_event(dev, -1, omap_crtc->event);
>
> omap_crtc->event = NULL;
> + omap_crtc->old_fb = NULL;
Is old_fb used anywhere? If not we could just remove it.
Otherwise nice work! On the series:
Reviewed-by: Imre Deak <imre.deak@intel.com>
>
> spin_unlock_irqrestore(&dev->event_lock, flags);
> }
> @@ -138,8 +138,6 @@ static void page_flip_cb(void *arg)
> struct drm_framebuffer *old_fb = omap_crtc->old_fb;
> struct drm_gem_object *bo;
>
> - omap_crtc->old_fb = NULL;
> -
> omap_crtc_mode_set_base(crtc, crtc->x, crtc->y, old_fb);
>
> /* really we'd like to setup the callback atomically w/ setting the
> @@ -162,7 +160,7 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc,
>
> DBG("%d -> %d", crtc->fb ? crtc->fb->base.id : -1, fb->base.id);
>
> - if (omap_crtc->event) {
> + if (omap_crtc->old_fb) {
> dev_err(dev->dev, "already a pending flip\n");
> return -EINVAL;
> }
next prev parent reply other threads:[~2012-10-09 9:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 19:50 [PATCH 00/11] page-flip cleanups and fixes Rob Clark
2012-10-08 19:50 ` [PATCH 01/11] drm: add drm_send_vblank_event() helper Rob Clark
2012-10-08 21:26 ` Marcin Slusarz
2012-10-11 14:19 ` Laurent Pinchart
2012-10-11 14:43 ` Rob Clark
2012-10-13 0:28 ` Mario Kleiner
2012-10-16 12:53 ` Laurent Pinchart
2012-10-08 19:50 ` [PATCH 02/11] drm/i915: use " Rob Clark
2012-10-09 8:02 ` Daniel Vetter
2012-11-21 16:48 ` Daniel Vetter
2012-10-08 19:50 ` [PATCH 03/11] drm/nouveau: " Rob Clark
2012-10-08 19:50 ` [PATCH 04/11] drm/radeon: " Rob Clark
2012-10-08 19:50 ` [PATCH 05/11] drm/exynos: " Rob Clark
2013-05-21 23:19 ` Dave Airlie
2013-05-22 2:28 ` Inki Dae
2013-05-22 4:04 ` [PATCH] " Inki Dae
2013-05-22 4:51 ` Joonyoung Shim
2013-05-22 6:56 ` Inki Dae
2013-05-22 6:59 ` [PATCH RESEND] " Inki Dae
2012-10-08 19:50 ` [PATCH 06/11] drm/exynos: page flip fixes Rob Clark
2013-05-21 23:17 ` Dave Airlie
2013-05-22 2:36 ` Inki Dae
2012-10-08 19:50 ` [PATCH 07/11] drm/shmob: use drm_send_vblank_event() helper Rob Clark
2012-10-08 19:50 ` [PATCH 08/11] drm/imx: " Rob Clark
2012-10-08 19:50 ` [PATCH 09/11] drm/imx: page flip fixes Rob Clark
2013-05-21 23:18 ` Dave Airlie
2012-10-08 19:50 ` [PATCH 10/11] drm/omap: use drm_send_vblank_event() helper Rob Clark
2012-10-10 3:33 ` Mario Kleiner
2012-10-10 11:03 ` Rob Clark
2012-10-12 23:38 ` Mario Kleiner
2012-10-08 19:50 ` [PATCH 11/11] drm/omap: page-flip fixes Rob Clark
2012-10-09 9:35 ` Imre Deak [this message]
2012-10-09 9:38 ` Imre Deak
2012-10-08 20:51 ` [PATCH 00/11] page-flip cleanups and fixes Alex Deucher
2012-10-08 22:10 ` Marcin Slusarz
2012-10-09 5:17 ` Inki Dae
2012-10-22 22:39 ` Greg KH
2012-10-22 22:51 ` Rob Clark
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=1349775333.9882.2.camel@localhost \
--to=imre.deak@intel.com \
--cc=bskeggs@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=patches@linaro.org \
--cc=rob.clark@linaro.org \
--cc=rob@ti.com \
/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