Skip to content

Commit

Permalink
drm: Don't clear vblank timestamps when vblank interrupt is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vsyrjala authored and danvet committed Aug 6, 2014
1 parent 08c71e5 commit 844b03f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@
*/
#define DRM_REDUNDANT_VBLIRQ_THRESH_NS 1000000

/*
* Clear vblank timestamp buffer for a crtc.
*/
static void clear_vblank_timestamps(struct drm_device *dev, int crtc)
{
memset(dev->vblank[crtc].time, 0, sizeof(dev->vblank[crtc].time));
}

/*
* Disable vblank irq's on crtc, make sure that last vblank count
* of hardware and corresponding consistent software vblank counter
Expand Down Expand Up @@ -131,9 +123,6 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
smp_mb__after_atomic();
}

/* Invalidate all timestamps while vblank irq's are off. */
clear_vblank_timestamps(dev, crtc);

spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
}

Expand Down

0 comments on commit 844b03f

Please sign in to comment.