Lines Matching full:vblank

2  * drm_irq.c IRQ and vblank support
43 * DOC: vblank handling
54 * scanlines is referred to as the vertical blanking region, or vblank for
98 * this programming has to both start and end in the same vblank. To help
101 * The interrupt is in this context named the vblank interrupt.
103 * The vblank interrupt may be fired at different points depending on the
122 * drm_crtc_handle_vblank() in its vblank interrupt handler for working vblank
129 * call drm_crtc_vblank_get() and release the vblank reference again with
130 * drm_crtc_vblank_put(). In between these two calls vblank interrupts are
133 * On many hardware disabling the vblank interrupt cannot be done in a race-free
135 * &drm_driver.max_vblank_count. In that case the vblank core only disables the
141 * automatically generate fake vblank events as part of the display update.
152 * vblank irq in drm_handle_vblank(). 1 msec should be ok.
166 MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable [msecs] (0: never disable, <0…
173 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in store_vblank() local
177 vblank->last = last; in store_vblank()
179 write_seqlock(&vblank->seqlock); in store_vblank()
180 vblank->time = t_vblank; in store_vblank()
181 atomic64_add(vblank_count_inc, &vblank->count); in store_vblank()
182 write_sequnlock(&vblank->seqlock); in store_vblank()
187 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_max_vblank_count() local
189 return vblank->max_vblank_count ?: dev->max_vblank_count; in drm_max_vblank_count()
223 * Reset the stored timestamp for the current vblank count to correspond
224 * to the last vblank occurred.
229 * device vblank fields.
250 * Only reinitialize corresponding vblank timestamp if high-precision query in drm_reset_vblank_timestamp()
251 * available and didn't fail. Otherwise reinitialize delayed at next vblank in drm_reset_vblank_timestamp()
259 * vblank counter value before and after a modeset in drm_reset_vblank_timestamp()
267 * Call back into the driver to update the appropriate vblank counter
276 * device vblank fields.
281 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_update_vblank_count() local
286 int framedur_ns = vblank->framedur_ns; in drm_update_vblank_count()
293 * here if the register is small or we had vblank interrupts off for in drm_update_vblank_count()
296 * We repeat the hardware vblank counter & timestamp query until in drm_update_vblank_count()
299 * corresponding vblank timestamp. in drm_update_vblank_count()
308 diff = (cur_vblank - vblank->last) & max_vblank_count; in drm_update_vblank_count()
310 u64 diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time)); in drm_update_vblank_count()
334 * interval? If so then vblank irqs keep running and it will likely in drm_update_vblank_count()
335 * happen that the hardware vblank counter is not trustworthy as it in drm_update_vblank_count()
336 * might reset at some point in that interval and vblank timestamps in drm_update_vblank_count()
339 * random large forward jumps of the software vblank counter. in drm_update_vblank_count()
341 if (diff > 1 && (vblank->inmodeset & 0x2)) { in drm_update_vblank_count()
343 "clamping vblank bump to 1 on crtc %u: diffr=%u" in drm_update_vblank_count()
348 drm_dbg_vbl(dev, "updating vblank count on crtc %u:" in drm_update_vblank_count()
350 pipe, (unsigned long long)atomic64_read(&vblank->count), in drm_update_vblank_count()
351 diff, cur_vblank, vblank->last); in drm_update_vblank_count()
354 drm_WARN_ON_ONCE(dev, cur_vblank != vblank->last); in drm_update_vblank_count()
359 * Only reinitialize corresponding vblank timestamp if high-precision query in drm_update_vblank_count()
360 * available and didn't fail, or we were called from the vblank interrupt. in drm_update_vblank_count()
361 * Otherwise reinitialize delayed at next vblank interrupt and assign 0 in drm_update_vblank_count()
372 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_count() local
378 count = atomic64_read(&vblank->count); in drm_vblank_count()
393 * drm_crtc_accurate_vblank_count - retrieve the master vblank counter
397 * interpolates to handle a race with vblank interrupts using the high precision
407 u64 vblank; in drm_crtc_accurate_vblank_count() local
412 "This function requires support for accurate vblank timestamps."); in drm_crtc_accurate_vblank_count()
417 vblank = drm_vblank_count(dev, pipe); in drm_crtc_accurate_vblank_count()
421 return vblank; in drm_crtc_accurate_vblank_count()
444 * Disable vblank irq's on crtc, make sure that last vblank count
445 * of hardware and corresponding consistent software vblank counter
446 * are preserved, even if there are any spurious vblank irq's after
451 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_disable_and_save() local
456 /* Prevent vblank irq processing while disabling vblank irqs, in drm_vblank_disable_and_save()
463 * Update vblank count and disable vblank interrupts only if the in drm_vblank_disable_and_save()
468 if (!vblank->enabled) in drm_vblank_disable_and_save()
479 vblank->enabled = false; in drm_vblank_disable_and_save()
487 struct drm_vblank_crtc *vblank = from_timer(vblank, t, disable_timer); in vblank_disable_fn() local
488 struct drm_device *dev = vblank->dev; in vblank_disable_fn()
489 unsigned int pipe = vblank->pipe; in vblank_disable_fn()
493 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) { in vblank_disable_fn()
494 drm_dbg_core(dev, "disabling vblank on crtc %u\n", pipe); in vblank_disable_fn()
502 struct drm_vblank_crtc *vblank = ptr; in drm_vblank_init_release() local
504 drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && in drm_vblank_init_release()
507 drm_vblank_destroy_worker(vblank); in drm_vblank_init_release()
508 del_timer_sync(&vblank->disable_timer); in drm_vblank_init_release()
512 * drm_vblank_init - initialize vblank support
516 * This function initializes vblank support for @num_crtcs display pipelines.
531 dev->vblank = drmm_kcalloc(dev, num_crtcs, sizeof(*dev->vblank), GFP_KERNEL); in drm_vblank_init()
532 if (!dev->vblank) in drm_vblank_init()
538 struct drm_vblank_crtc *vblank = &dev->vblank[i]; in drm_vblank_init() local
540 vblank->dev = dev; in drm_vblank_init()
541 vblank->pipe = i; in drm_vblank_init()
542 init_waitqueue_head(&vblank->queue); in drm_vblank_init()
543 timer_setup(&vblank->disable_timer, vblank_disable_fn, 0); in drm_vblank_init()
544 seqlock_init(&vblank->seqlock); in drm_vblank_init()
547 vblank); in drm_vblank_init()
551 ret = drm_vblank_worker_init(vblank); in drm_vblank_init()
565 * Drivers may call this function to test if vblank support is
583 * drm_crtc_vblank_waitqueue - get vblank waitqueue for the CRTC
584 * @crtc: which CRTC's vblank waitqueue to retrieve
586 * This function returns a pointer to the vblank waitqueue for the CRTC.
587 * Drivers can use this to implement vblank waits using wait_event() and related
592 return &crtc->dev->vblank[drm_crtc_index(crtc)].queue; in drm_crtc_vblank_waitqueue()
598 * drm_calc_timestamping_constants - calculate vblank timestamp constants
602 * Calculate and store various constants which are later needed by vblank and
613 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_calc_timestamping_constants() local
645 vblank->linedur_ns = linedur_ns; in drm_calc_timestamping_constants()
646 vblank->framedur_ns = framedur_ns; in drm_calc_timestamping_constants()
647 drm_mode_copy(&vblank->hwmode, mode); in drm_calc_timestamping_constants()
659 * drm_crtc_vblank_helper_get_vblank_timestamp_internal - precise vblank
661 * @crtc: CRTC whose vblank timestamp to retrieve
667 * need to apply some workarounds for gpu-specific vblank irq quirks
673 * Implements calculation of exact vblank timestamps from given drm_display_mode
698 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_helper_get_vblank_timestamp_internal() local
718 mode = &vblank->hwmode; in drm_crtc_vblank_helper_get_vblank_timestamp_internal()
783 * vblank_time timestamp for end of vblank. in drm_crtc_vblank_helper_get_vblank_timestamp_internal()
805 * drm_crtc_vblank_helper_get_vblank_timestamp - precise vblank timestamp
807 * @crtc: CRTC whose vblank timestamp to retrieve
813 * need to apply some workarounds for gpu-specific vblank irq quirks
816 * Implements calculation of exact vblank timestamps from given drm_display_mode
848 * vblank interval
850 * @pipe: index of CRTC whose vblank timestamp to retrieve
854 * need to apply some workarounds for gpu-specific vblank irq quirks
858 * vblank interval on specified CRTC. May call into kms-driver to
862 * call, i.e., it isn't very precisely locked to the true vblank.
895 * drm_crtc_vblank_count - retrieve "cooked" vblank counter value
898 * Fetches the "cooked" vblank count value that represents the number of
899 * vblank events since the system was booted, including lost events due to
901 * vblank interrupt (since it only reports the software vblank counter), see
904 * Note that for a given vblank counter value drm_crtc_handle_vblank()
908 * functions, if the vblank count is the same or a later one.
913 * The software vblank counter.
922 * drm_vblank_count_and_time - retrieve "cooked" vblank counter value and the
923 * system timestamp corresponding to that vblank counter value.
926 * @vblanktime: Pointer to ktime_t to receive the vblank timestamp.
928 * Fetches the "cooked" vblank count value that represents the number of
929 * vblank events since the system was booted, including lost events due to
931 * of the vblank interval that corresponds to the current vblank counter value.
938 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_count_and_time() local
948 seq = read_seqbegin(&vblank->seqlock); in drm_vblank_count_and_time()
949 vblank_count = atomic64_read(&vblank->count); in drm_vblank_count_and_time()
950 *vblanktime = vblank->time; in drm_vblank_count_and_time()
951 } while (read_seqretry(&vblank->seqlock, seq)); in drm_vblank_count_and_time()
957 * drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter value
958 * and the system timestamp corresponding to that vblank counter value
960 * @vblanktime: Pointer to time to receive the vblank timestamp.
962 * Fetches the "cooked" vblank count value that represents the number of
963 * vblank events since the system was booted, including lost events due to
965 * of the vblank interval that corresponds to the current vblank counter value.
967 * Note that for a given vblank counter value drm_crtc_handle_vblank()
971 * functions, if the vblank count is the same or a later one.
1020 * drm_crtc_arm_vblank_event - arm vblank event after pageflip
1021 * @crtc: the source CRTC of the vblank event
1024 * A lot of drivers need to generate vblank events for the very next vblank
1026 * flip gets armed, but not when it actually executes within the next vblank
1027 * period. This helper function implements exactly the required vblank arming
1031 * atomic commit must ensure that the next vblank happens at exactly the same
1033 * does **not** protect against the next vblank interrupt racing with either this
1036 * 1. Driver commits new hardware state into vblank-synchronized registers.
1037 * 2. A vblank happens, committing the hardware state. Also the corresponding
1038 * vblank interrupt is fired off and fully processed by the interrupt
1041 * 4. The event is only send out for the next vblank, which is wrong.
1046 * The only way to make this work safely is to prevent the vblank from firing
1054 * Caller must hold a vblank reference for the event @e acquired by a
1055 * drm_crtc_vblank_get(), which will be dropped when the next vblank arrives.
1072 * drm_crtc_send_vblank_event - helper to send vblank event after pageflip
1073 * @crtc: the source CRTC of the vblank event
1077 * vblank, and sends it to userspace. Caller must hold event lock.
1124 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_enable() local
1131 if (!vblank->enabled) { in drm_vblank_enable()
1133 * Enable vblank irqs under vblank_time_lock protection. in drm_vblank_enable()
1134 * All vblank count & timestamp updates are held off in drm_vblank_enable()
1137 * prevent double-accounting of same vblank interval. in drm_vblank_enable()
1140 drm_dbg_core(dev, "enabling vblank on crtc %u, ret: %d\n", in drm_vblank_enable()
1143 atomic_dec(&vblank->refcount); in drm_vblank_enable()
1148 * to mark the vblank as enabled after the call in drm_vblank_enable()
1151 WRITE_ONCE(vblank->enabled, true); in drm_vblank_enable()
1162 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_get() local
1174 if (atomic_add_return(1, &vblank->refcount) == 1) { in drm_vblank_get()
1177 if (!vblank->enabled) { in drm_vblank_get()
1178 atomic_dec(&vblank->refcount); in drm_vblank_get()
1188 * drm_crtc_vblank_get - get a reference count on vblank events
1191 * Acquire a reference count on vblank events to avoid having them disabled
1205 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_put() local
1210 if (drm_WARN_ON(dev, atomic_read(&vblank->refcount) == 0)) in drm_vblank_put()
1214 if (atomic_dec_and_test(&vblank->refcount)) { in drm_vblank_put()
1218 vblank_disable_fn(&vblank->disable_timer); in drm_vblank_put()
1220 mod_timer(&vblank->disable_timer, in drm_vblank_put()
1226 * drm_crtc_vblank_put - give up ownership of vblank events
1229 * Release ownership of a given vblank counter, turning off interrupts
1239 * drm_wait_one_vblank - wait for one vblank
1243 * This waits for one vblank to pass on @pipe, using the irq driver interfaces.
1244 * It is a failure to call this when the vblank irq for @pipe is disabled, e.g.
1251 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_wait_one_vblank() local
1259 if (drm_WARN(dev, ret, "vblank not available on crtc %i, ret=%i\n", in drm_wait_one_vblank()
1265 ret = wait_event_timeout(vblank->queue, in drm_wait_one_vblank()
1269 drm_WARN(dev, ret == 0, "vblank wait timed out on crtc %i\n", pipe); in drm_wait_one_vblank()
1276 * drm_crtc_wait_one_vblank - wait for one vblank
1279 * This waits for one vblank to pass on @crtc, using the irq driver interfaces.
1280 * It is a failure to call this when the vblank irq for @crtc is disabled, e.g.
1290 * drm_crtc_vblank_off - disable vblank events on a CRTC
1293 * Drivers can use this function to shut down the vblank interrupt handling when
1294 * disabling a crtc. This function ensures that the latest vblank frame count is
1297 * Drivers must use this function when the hardware vblank counter can get
1304 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_off() local
1313 * Grab event_lock early to prevent vblank work from being scheduled in drm_crtc_vblank_off()
1314 * while we're in the middle of shutting down vblank interrupts in drm_crtc_vblank_off()
1319 drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n", in drm_crtc_vblank_off()
1320 pipe, vblank->enabled, vblank->inmodeset); in drm_crtc_vblank_off()
1322 /* Avoid redundant vblank disables without previous in drm_crtc_vblank_off()
1324 if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) in drm_crtc_vblank_off()
1327 wake_up(&vblank->queue); in drm_crtc_vblank_off()
1331 * the vblank interrupt by bumping the refcount. in drm_crtc_vblank_off()
1333 if (!vblank->inmodeset) { in drm_crtc_vblank_off()
1334 atomic_inc(&vblank->refcount); in drm_crtc_vblank_off()
1335 vblank->inmodeset = 1; in drm_crtc_vblank_off()
1339 /* Send any queued vblank events, lest the natives grow disquiet */ in drm_crtc_vblank_off()
1345 drm_dbg_core(dev, "Sending premature vblank event on disable: " in drm_crtc_vblank_off()
1353 /* Cancel any leftover pending vblank work */ in drm_crtc_vblank_off()
1354 drm_vblank_cancel_pending_works(vblank); in drm_crtc_vblank_off()
1360 vblank->hwmode.crtc_clock = 0; in drm_crtc_vblank_off()
1362 /* Wait for any vblank work that's still executing to finish */ in drm_crtc_vblank_off()
1363 drm_vblank_flush_worker(vblank); in drm_crtc_vblank_off()
1368 * drm_crtc_vblank_reset - reset vblank state to off on a CRTC
1371 * Drivers can use this function to reset the vblank state to off at load time.
1374 * drm_crtc_vblank_off() is that this function doesn't save the vblank counter
1383 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_reset() local
1387 * Prevent subsequent drm_vblank_get() from enabling the vblank in drm_crtc_vblank_reset()
1390 if (!vblank->inmodeset) { in drm_crtc_vblank_reset()
1391 atomic_inc(&vblank->refcount); in drm_crtc_vblank_reset()
1392 vblank->inmodeset = 1; in drm_crtc_vblank_reset()
1397 drm_WARN_ON(dev, !list_empty(&vblank->pending_work)); in drm_crtc_vblank_reset()
1402 * drm_crtc_set_max_vblank_count - configure the hw max vblank counter value
1404 * @max_vblank_count: max hardware vblank counter value
1406 * Update the maximum hardware vblank counter value for @crtc
1408 * hardware vblank counter depends on the currently active
1411 * For example, if the hardware vblank counter does not work
1423 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_set_max_vblank_count() local
1426 drm_WARN_ON(dev, !READ_ONCE(vblank->inmodeset)); in drm_crtc_set_max_vblank_count()
1428 vblank->max_vblank_count = max_vblank_count; in drm_crtc_set_max_vblank_count()
1433 * drm_crtc_vblank_on - enable vblank events on a CRTC
1436 * This functions restores the vblank interrupt state captured with
1446 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_on() local
1452 drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n", in drm_crtc_vblank_on()
1453 pipe, vblank->enabled, vblank->inmodeset); in drm_crtc_vblank_on()
1456 if (vblank->inmodeset) { in drm_crtc_vblank_on()
1457 atomic_dec(&vblank->refcount); in drm_crtc_vblank_on()
1458 vblank->inmodeset = 0; in drm_crtc_vblank_on()
1465 * user wishes vblank interrupts to be enabled all the time. in drm_crtc_vblank_on()
1467 if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) in drm_crtc_vblank_on()
1476 struct drm_vblank_crtc *vblank; in drm_vblank_restore() local
1489 vblank = &dev->vblank[pipe]; in drm_vblank_restore()
1491 drm_debug_enabled(DRM_UT_VBL) && !vblank->framedur_ns, in drm_vblank_restore()
1493 framedur_ns = vblank->framedur_ns; in drm_vblank_restore()
1500 diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time)); in drm_vblank_restore()
1507 diff, diff_ns, framedur_ns, cur_vblank - vblank->last); in drm_vblank_restore()
1508 vblank->last = (cur_vblank - diff) & max_vblank_count; in drm_vblank_restore()
1512 * drm_crtc_vblank_restore - estimate missed vblanks and update vblank count.
1515 * Power manamement features can cause frame counter resets between vblank
1519 * vblank counter.
1524 * time-stamping functions are race-free against vblank hardware counter
1539 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_legacy_vblank_pre_modeset() local
1541 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_legacy_vblank_pre_modeset()
1555 if (!vblank->inmodeset) { in drm_legacy_vblank_pre_modeset()
1556 vblank->inmodeset = 0x1; in drm_legacy_vblank_pre_modeset()
1558 vblank->inmodeset |= 0x2; in drm_legacy_vblank_pre_modeset()
1565 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_legacy_vblank_post_modeset() local
1567 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_legacy_vblank_post_modeset()
1574 if (vblank->inmodeset) { in drm_legacy_vblank_post_modeset()
1579 if (vblank->inmodeset & 0x2) in drm_legacy_vblank_post_modeset()
1582 vblank->inmodeset = 0; in drm_legacy_vblank_post_modeset()
1623 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_queue_vblank_event() local
1652 * vblank disable, so no need for further locking. The reference from in drm_queue_vblank_event()
1653 * drm_vblank_get() protects against vblank disable from another source. in drm_queue_vblank_event()
1655 if (!READ_ONCE(vblank->enabled)) { in drm_queue_vblank_event()
1668 drm_dbg_core(dev, "event on vblank count %llu, current %llu, crtc %u\n", in drm_queue_vblank_event()
1753 struct drm_vblank_crtc *vblank; in drm_wait_vblank_ioctl() local
1802 vblank = &dev->vblank[pipe]; in drm_wait_vblank_ioctl()
1805 * queries to return the cached timestamp of the last vblank. in drm_wait_vblank_ioctl()
1809 READ_ONCE(vblank->enabled)) { in drm_wait_vblank_ioctl()
1817 "crtc %d failed to acquire vblank counter, %d\n", in drm_wait_vblank_ioctl()
1845 /* must hold on to the vblank ref until the event fires in drm_wait_vblank_ioctl()
1854 drm_dbg_core(dev, "waiting on vblank count %llu, crtc %u\n", in drm_wait_vblank_ioctl()
1856 wait = wait_event_interruptible_timeout(vblank->queue, in drm_wait_vblank_ioctl()
1858 !READ_ONCE(vblank->enabled), in drm_wait_vblank_ioctl()
1882 drm_dbg_core(dev, "crtc %d vblank wait interrupted by signal\n", in drm_wait_vblank_ioctl()
1909 drm_dbg_core(dev, "vblank event on %llu, current %llu\n", in drm_handle_vblank_events()
1924 * drm_handle_vblank - handle a vblank event
1928 * Drivers should call this routine in their vblank interrupt handlers to
1929 * update the vblank counter and send any signals that may be pending.
1935 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_handle_vblank() local
1948 * vblank enable/disable, as this would cause inconsistent in drm_handle_vblank()
1949 * or corrupted timestamps and vblank counts. in drm_handle_vblank()
1953 /* Vblank irq handling disabled. Nothing to do. */ in drm_handle_vblank()
1954 if (!vblank->enabled) { in drm_handle_vblank()
1964 wake_up(&vblank->queue); in drm_handle_vblank()
1967 * we finish processing the following vblank after all events have in drm_handle_vblank()
1973 !atomic_read(&vblank->refcount)); in drm_handle_vblank()
1976 drm_handle_vblank_works(vblank); in drm_handle_vblank()
1981 vblank_disable_fn(&vblank->disable_timer); in drm_handle_vblank()
1988 * drm_crtc_handle_vblank - handle a vblank event
1991 * Drivers should call this routine in their vblank interrupt handlers to
1992 * update the vblank counter and send any signals that may be pending.
1996 * Note that for a given vblank counter value drm_crtc_handle_vblank()
2000 * functions, if the vblank count is the same or a later one.
2014 * Get crtc VBLANK count.
2025 struct drm_vblank_crtc *vblank; in drm_crtc_get_sequence_ioctl() local
2044 vblank = &dev->vblank[pipe]; in drm_crtc_get_sequence_ioctl()
2045 vblank_enabled = dev->vblank_disable_immediate && READ_ONCE(vblank->enabled); in drm_crtc_get_sequence_ioctl()
2051 "crtc %d failed to acquire vblank counter, %d\n", in drm_crtc_get_sequence_ioctl()
2070 * Queue a event for VBLANK sequence
2081 struct drm_vblank_crtc *vblank; in drm_crtc_queue_sequence_ioctl() local
2109 vblank = &dev->vblank[pipe]; in drm_crtc_queue_sequence_ioctl()
2118 "crtc %d failed to acquire vblank counter, %d\n", in drm_crtc_queue_sequence_ioctl()
2142 * vblank disable, so no need for further locking. The reference from in drm_crtc_queue_sequence_ioctl()
2143 * drm_crtc_vblank_get() protects against vblank disable from another source. in drm_crtc_queue_sequence_ioctl()
2145 if (!READ_ONCE(vblank->enabled)) { in drm_crtc_queue_sequence_ioctl()