Skip to content

Commit 844b03f

Browse files
vsyrjaladanvet
authored andcommitted
drm: Don't clear vblank timestamps when vblank interrupt is disabled
Clearing the timestamps causes us to send zeroed timestamps to userspace if they get sent out in response to the drm_vblank_off(). It's better to send the very latest timestamp and count instead. Testcase: igt/kms_flip/modeset-vs-vblank-race Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 08c71e5 commit 844b03f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/gpu/drm/drm_irq.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@
5555
*/
5656
#define DRM_REDUNDANT_VBLIRQ_THRESH_NS 1000000
5757

58-
/*
59-
* Clear vblank timestamp buffer for a crtc.
60-
*/
61-
static void clear_vblank_timestamps(struct drm_device *dev, int crtc)
62-
{
63-
memset(dev->vblank[crtc].time, 0, sizeof(dev->vblank[crtc].time));
64-
}
65-
6658
/*
6759
* Disable vblank irq's on crtc, make sure that last vblank count
6860
* of hardware and corresponding consistent software vblank counter
@@ -131,9 +123,6 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
131123
smp_mb__after_atomic();
132124
}
133125

134-
/* Invalidate all timestamps while vblank irq's are off. */
135-
clear_vblank_timestamps(dev, crtc);
136-
137126
spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
138127
}
139128

0 commit comments

Comments
 (0)