Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 138b87fa authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Daniel Vetter
Browse files

drm: vblank: Fix vblank timestamp update



Commit 3fcdcb27 ("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: 3fcdcb27 ("drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp")
Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170629123720.27173-1-laurent.pinchart+renesas@ideasonboard.com
parent c048c984
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -242,7 +242,7 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
	 * Otherwise reinitialize delayed at next vblank interrupt and assign 0
	 * Otherwise reinitialize delayed at next vblank interrupt and assign 0
	 * for now, to mark the vblanktimestamp as invalid.
	 * for now, to mark the vblanktimestamp as invalid.
	 */
	 */
	if (!rc && in_vblank_irq)
	if (!rc && !in_vblank_irq)
		t_vblank = (struct timeval) {0, 0};
		t_vblank = (struct timeval) {0, 0};


	store_vblank(dev, pipe, diff, &t_vblank, cur_vblank);
	store_vblank(dev, pipe, diff, &t_vblank, cur_vblank);