All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Daniel Stone <daniels-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Sjoerd Simons
	<sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/2] drm/rockchip: Send events for same-fb flips
Date: Mon, 23 Nov 2015 15:46:06 +0800	[thread overview]
Message-ID: <5652C43E.10606@rock-chips.com> (raw)
In-Reply-To: <1447678222-6858-2-git-send-email-daniels-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

Hi,

于 2015年11月16日 20:50, Daniel Stone 写道:
> Rockchip previously treated a pageflip to the same framebuffer as a
> no-op, discarding the event if one was requested. This breaks Weston,
> which, when idle, sends a no-op vblank event to discover vblank
> timings if the vblank query interface is not usable.
>
> Silently dropping events is also quite a hostile thing to do to
> userspace in general.
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> Cc: Heiko Stuebner <heiko@sntech.de>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 30 ++++++++++++++---------------
>   1 file changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index ddf6dc2..dad607e 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -916,25 +916,23 @@ static int vop_update_plane_event(struct drm_plane *plane,
>   	 * unreference any previous framebuffers.
>   	 */
>   	mutex_lock(&vop->vsync_mutex);
> -	if (fb != vop_win_last_pending_fb(vop_win)) {

There is a warning for building.

CC drivers/gpu/drm/rockchip/rockchip_drm_vop.o
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:753:32: warning: 
'vop_win_last_pending_fb' defined but not used [-Wunused-function]

Maybe, we can also remove the vop_win_last_pending_fb() function.

> -		ret = drm_vblank_get(plane->dev, vop->pipe);
> -		if (ret) {
> -			DRM_ERROR("failed to get vblank, %d\n", ret);
> -			mutex_unlock(&vop->vsync_mutex);
> -			return ret;
> -		}
> +	ret = drm_vblank_get(plane->dev, vop->pipe);
> +	if (ret) {
> +		DRM_ERROR("failed to get vblank, %d\n", ret);
> +		mutex_unlock(&vop->vsync_mutex);
> +		return ret;
> +	}
>   
> -		drm_framebuffer_reference(fb);
> +	drm_framebuffer_reference(fb);
>   
> -		ret = vop_win_queue_fb(vop_win, fb, yrgb_mst, event);
> -		if (ret) {
> -			drm_vblank_put(plane->dev, vop->pipe);
> -			mutex_unlock(&vop->vsync_mutex);
> -			return ret;
> -		}
> -
> -		vop->vsync_work_pending = true;
> +	ret = vop_win_queue_fb(vop_win, fb, yrgb_mst, event);
> +	if (ret) {
> +		drm_vblank_put(plane->dev, vop->pipe);
> +		mutex_unlock(&vop->vsync_mutex);
> +		return ret;
>   	}
> +
> +	vop->vsync_work_pending = true;
>   	mutex_unlock(&vop->vsync_mutex);
>   
>   	spin_lock(&vop->reg_lock);


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2015-11-23  7:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 12:50 [PATCH 1/2] drm/rockchip: Use CRTC vblank event interface Daniel Stone
2015-11-16 12:50 ` [PATCH 2/2] drm/rockchip: Send events for same-fb flips Daniel Stone
2015-11-16 12:57   ` Sjoerd Simons
     [not found]   ` <1447678222-6858-2-git-send-email-daniels-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2015-11-16 14:37     ` Heiko Stübner
2015-11-23  7:46     ` Caesar Wang [this message]
2015-12-02  1:01       ` Mark yao
2015-12-02 14:07         ` Daniel Stone
2015-11-16 12:54 ` [PATCH 1/2] drm/rockchip: Use CRTC vblank event interface Sjoerd Simons
2015-11-16 14:37 ` Heiko Stübner
2015-11-16 15:13 ` Thierry Reding
2015-12-02  1:02 ` Mark yao

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=5652C43E.10606@rock-chips.com \
    --to=wxt-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=daniels-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.