diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-12 15:55:52 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-02-24 16:05:47 -0800 |
commit | 04e34ce020c59608af67fe905f5409b7d8b482b9 (patch) | |
tree | 2d8f04918f2cb75f637075b86a9e60974369547e | |
parent | 8f4668d4e700a352bb5300748943c3434f0dc809 (diff) |
Bump vblank error check from 200 frames to 1000 frames
My little 'present' demo program uses MSCNotify with an interval of 5
seconds, which is more than 200 frames. Crank it up to 1000 frames so
that the demo works.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | src/uxa/intel_display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index e1dc6a84..708e1025 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -1953,6 +1953,9 @@ intel_get_crtc_msc_ust(ScrnInfoPtr scrn, xf86CrtcPtr crtc, uint64_t *msc, uint64 * This also updates the vblank_offset when it notices that the value should * change. */ + +#define MAX_VBLANK_OFFSET 1000 + uint32_t intel_crtc_msc_to_sequence(ScrnInfoPtr scrn, xf86CrtcPtr crtc, uint64_t expect) { @@ -1967,9 +1970,9 @@ intel_crtc_msc_to_sequence(ScrnInfoPtr scrn, xf86CrtcPtr crtc, uint64_t expect) /* We're way off here, assume that the kernel has lost its mind * and smack the vblank back to something sensible */ - if (diff < -200 || 200 < diff) { + if (diff < -MAX_VBLANK_OFFSET || MAX_VBLANK_OFFSET < diff) { intel_crtc->vblank_offset += (int32_t) diff; - if (-200 < intel_crtc->vblank_offset && intel_crtc->vblank_offset < 200) + if (-MAX_VBLANK_OFFSET < intel_crtc->vblank_offset && intel_crtc->vblank_offset < MAX_VBLANK_OFFSET) intel_crtc->vblank_offset = 0; } return (uint32_t) (expect - intel_crtc->vblank_offset); |