diff options
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_present.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c index da642330..eca09e60 100644 --- a/src/sna/sna_present.c +++ b/src/sna/sna_present.c @@ -150,9 +150,7 @@ static uint32_t msc_to_delay(xf86CrtcPtr crtc, uint64_t target) const struct ust_msc *swap = sna_crtc_last_swap(crtc); int64_t delay, subframe; - /* XXX How to handle CRTC being off? */ - if (mode->Clock == 0) - return 0; + assert(mode->Clock); delay = target - swap->msc; assert(delay >= 0); @@ -403,6 +401,9 @@ sna_present_queue_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) struct sna_present_event *info, *tmp; const struct ust_msc *swap; + if (!sna_crtc_is_on(crtc->devPrivate)) + return BadAlloc; + swap = sna_crtc_last_swap(crtc->devPrivate); DBG(("%s(pipe=%d, event=%lld, msc=%lld, last swap=%lld)\n", __FUNCTION__, sna_crtc_pipe(crtc->devPrivate), |