[PATCH] drm: vblank: Fix vblank timestamp update

Daniel Vetter daniel at ffwll.ch
Thu Jun 29 12:42:09 UTC 2017


On Thu, Jun 29, 2017 at 03:37:20PM +0300, Laurent Pinchart wrote:
> Commit 3fcdcb270936 ("drm/vblank: Switch to bool in_vblank_irq in
> get_vblank_timestamp") inverted a condition by mistake that resulted in
> vblank timestamps always being 0 on hardware without a vblank counter.
> Fix it.
> 
> Fixes: 3fcdcb270936 ("drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp")
> Suggested-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

Oops, thanks for fixing this.

> ---
>  drivers/gpu/drm/drm_vblank.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Daniel,
> 
> The offending commit is in Dave's master branch, scheduled for merge in
> v4.13-rc1. How would you like to handle this one ?

drm-misc-next-fixes. Sean Paul will forward it.
-Daniel

> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 05d043e9219f..bfe86fa2d3b1 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -277,7 +277,7 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
>  	 * Otherwise reinitialize delayed at next vblank interrupt and assign 0
>  	 * for now, to mark the vblanktimestamp as invalid.
>  	 */
> -	if (!rc && in_vblank_irq)
> +	if (!rc && !in_vblank_irq)
>  		t_vblank = (struct timeval) {0, 0};
>  
>  	store_vblank(dev, pipe, diff, &t_vblank, cur_vblank);
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list