[Freedreno] [Intel-gfx] [PATCH 21/24] drm/msm: Simplify vblank event delivery

Sean Paul seanpaul at chromium.org
Mon Mar 13 19:26:41 UTC 2017


On Wed, Mar 08, 2017 at 03:12:54PM +0100, Daniel Vetter wrote:
> The core takes care of handling the send_event vs. close() issues, we
> can remove that driver code.
> 
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: linux-arm-msm at vger.kernel.org
> Cc: freedreno at lists.freedesktop.org
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++---------
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++---------
>  2 files changed, 6 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> index 1c29618f4ddb..f29194a74a19 100644
> --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> @@ -114,15 +114,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file)

file unused now?

>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	event = mdp4_crtc->event;
>  	if (event) {
> -		/* if regular vblank case (!file) or if cancel-flip from
> -		 * preclose on file that requested flip, then send the
> -		 * event:
> -		 */
> -		if (!file || (event->base.file_priv == file)) {
> -			mdp4_crtc->event = NULL;
> -			DBG("%s: send event: %p", mdp4_crtc->name, event);
> -			drm_crtc_send_vblank_event(crtc, event);
> -		}
> +		mdp4_crtc->event = NULL;
> +		DBG("%s: send event: %p", mdp4_crtc->name, event);
> +		drm_crtc_send_vblank_event(crtc, event);
>  	}
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
>  }
> diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> index d0c8b38b96ce..87a19e0c0e67 100644
> --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> @@ -138,15 +138,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file)
>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	event = mdp5_crtc->event;
>  	if (event) {
> -		/* if regular vblank case (!file) or if cancel-flip from
> -		 * preclose on file that requested flip, then send the
> -		 * event:
> -		 */
> -		if (!file || (event->base.file_priv == file)) {
> -			mdp5_crtc->event = NULL;
> -			DBG("%s: send event: %p", crtc->name, event);
> -			drm_crtc_send_vblank_event(crtc, event);
> -		}
> +		mdp5_crtc->event = NULL;
> +		DBG("%s: send event: %p", crtc->name, event);
> +		drm_crtc_send_vblank_event(crtc, event);
>  	}
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
>  
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Freedreno mailing list