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()
220 * Reset the stored timestamp for the current vblank count to correspond
221 * to the last vblank occurred.
226 * device vblank fields.
247 * Only reinitialize corresponding vblank timestamp if high-precision query in drm_reset_vblank_timestamp()
248 * available and didn't fail. Otherwise reinitialize delayed at next vblank in drm_reset_vblank_timestamp()
256 * vblank counter value before and after a modeset in drm_reset_vblank_timestamp()
264 * Call back into the driver to update the appropriate vblank counter
273 * device vblank fields.
278 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_update_vblank_count() local
283 int framedur_ns = vblank->framedur_ns; in drm_update_vblank_count()
290 * here if the register is small or we had vblank interrupts off for in drm_update_vblank_count()
293 * We repeat the hardware vblank counter & timestamp query until in drm_update_vblank_count()
296 * corresponding vblank timestamp. in drm_update_vblank_count()
305 diff = (cur_vblank - vblank->last) & max_vblank_count; in drm_update_vblank_count()
307 u64 diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time)); in drm_update_vblank_count()
331 * interval? If so then vblank irqs keep running and it will likely in drm_update_vblank_count()
332 * happen that the hardware vblank counter is not trustworthy as it in drm_update_vblank_count()
333 * might reset at some point in that interval and vblank timestamps in drm_update_vblank_count()
336 * random large forward jumps of the software vblank counter. in drm_update_vblank_count()
338 if (diff > 1 && (vblank->inmodeset & 0x2)) { in drm_update_vblank_count()
340 "clamping vblank bump to 1 on crtc %u: diffr=%u" in drm_update_vblank_count()
345 drm_dbg_vbl(dev, "updating vblank count on crtc %u:" in drm_update_vblank_count()
347 pipe, (unsigned long long)atomic64_read(&vblank->count), in drm_update_vblank_count()
348 diff, cur_vblank, vblank->last); in drm_update_vblank_count()
351 drm_WARN_ON_ONCE(dev, cur_vblank != vblank->last); in drm_update_vblank_count()
356 * Only reinitialize corresponding vblank timestamp if high-precision query in drm_update_vblank_count()
357 * available and didn't fail, or we were called from the vblank interrupt. in drm_update_vblank_count()
358 * Otherwise reinitialize delayed at next vblank interrupt and assign 0 in drm_update_vblank_count()
369 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_count() local
375 count = atomic64_read(&vblank->count); in drm_vblank_count()
390 * drm_crtc_accurate_vblank_count - retrieve the master vblank counter
394 * interpolates to handle a race with vblank interrupts using the high precision
404 u64 vblank; in drm_crtc_accurate_vblank_count() local
409 "This function requires support for accurate vblank timestamps."); in drm_crtc_accurate_vblank_count()
414 vblank = drm_vblank_count(dev, pipe); in drm_crtc_accurate_vblank_count()
418 return vblank; in drm_crtc_accurate_vblank_count()
438 * Disable vblank irq's on crtc, make sure that last vblank count
439 * of hardware and corresponding consistent software vblank counter
440 * are preserved, even if there are any spurious vblank irq's after
445 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_disable_and_save() local
450 /* Prevent vblank irq processing while disabling vblank irqs, in drm_vblank_disable_and_save()
457 * Update vblank count and disable vblank interrupts only if the in drm_vblank_disable_and_save()
462 if (!vblank->enabled) in drm_vblank_disable_and_save()
473 vblank->enabled = false; in drm_vblank_disable_and_save()
481 struct drm_vblank_crtc *vblank = from_timer(vblank, t, disable_timer); in vblank_disable_fn() local
482 struct drm_device *dev = vblank->dev; in vblank_disable_fn()
483 unsigned int pipe = vblank->pipe; in vblank_disable_fn()
487 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) { in vblank_disable_fn()
488 drm_dbg_core(dev, "disabling vblank on crtc %u\n", pipe); in vblank_disable_fn()
496 struct drm_vblank_crtc *vblank = ptr; in drm_vblank_init_release() local
498 drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && in drm_vblank_init_release()
501 drm_vblank_destroy_worker(vblank); in drm_vblank_init_release()
502 del_timer_sync(&vblank->disable_timer); in drm_vblank_init_release()
506 * drm_vblank_init - initialize vblank support
510 * This function initializes vblank support for @num_crtcs display pipelines.
525 dev->vblank = drmm_kcalloc(dev, num_crtcs, sizeof(*dev->vblank), GFP_KERNEL); in drm_vblank_init()
526 if (!dev->vblank) in drm_vblank_init()
532 struct drm_vblank_crtc *vblank = &dev->vblank[i]; in drm_vblank_init() local
534 vblank->dev = dev; in drm_vblank_init()
535 vblank->pipe = i; in drm_vblank_init()
536 init_waitqueue_head(&vblank->queue); in drm_vblank_init()
537 timer_setup(&vblank->disable_timer, vblank_disable_fn, 0); in drm_vblank_init()
538 seqlock_init(&vblank->seqlock); in drm_vblank_init()
541 vblank); in drm_vblank_init()
545 ret = drm_vblank_worker_init(vblank); in drm_vblank_init()
559 * Drivers may call this function to test if vblank support is
577 * drm_crtc_vblank_waitqueue - get vblank waitqueue for the CRTC
578 * @crtc: which CRTC's vblank waitqueue to retrieve
580 * This function returns a pointer to the vblank waitqueue for the CRTC.
581 * Drivers can use this to implement vblank waits using wait_event() and related
586 return &crtc->dev->vblank[drm_crtc_index(crtc)].queue; in drm_crtc_vblank_waitqueue()
592 * drm_calc_timestamping_constants - calculate vblank timestamp constants
596 * Calculate and store various constants which are later needed by vblank and
607 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_calc_timestamping_constants() local
639 vblank->linedur_ns = linedur_ns; in drm_calc_timestamping_constants()
640 vblank->framedur_ns = framedur_ns; in drm_calc_timestamping_constants()
641 vblank->hwmode = *mode; in drm_calc_timestamping_constants()
653 * drm_crtc_vblank_helper_get_vblank_timestamp_internal - precise vblank
655 * @crtc: CRTC whose vblank timestamp to retrieve
661 * need to apply some workarounds for gpu-specific vblank irq quirks
667 * Implements calculation of exact vblank timestamps from given drm_display_mode
692 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_helper_get_vblank_timestamp_internal() local
712 mode = &vblank->hwmode; in drm_crtc_vblank_helper_get_vblank_timestamp_internal()
777 * vblank_time timestamp for end of vblank. in drm_crtc_vblank_helper_get_vblank_timestamp_internal()
799 * drm_crtc_vblank_helper_get_vblank_timestamp - precise vblank timestamp
801 * @crtc: CRTC whose vblank timestamp to retrieve
807 * need to apply some workarounds for gpu-specific vblank irq quirks
810 * Implements calculation of exact vblank timestamps from given drm_display_mode
842 * vblank interval
844 * @pipe: index of CRTC whose vblank timestamp to retrieve
848 * need to apply some workarounds for gpu-specific vblank irq quirks
852 * vblank interval on specified CRTC. May call into kms-driver to
856 * call, i.e., it isn't very precisely locked to the true vblank.
889 * drm_crtc_vblank_count - retrieve "cooked" vblank counter value
892 * Fetches the "cooked" vblank count value that represents the number of
893 * vblank events since the system was booted, including lost events due to
895 * vblank interrupt (since it only reports the software vblank counter), see
898 * Note that for a given vblank counter value drm_crtc_handle_vblank()
902 * functions, iff the vblank count is the same or a later one.
907 * The software vblank counter.
916 * drm_vblank_count_and_time - retrieve "cooked" vblank counter value and the
917 * system timestamp corresponding to that vblank counter value.
920 * @vblanktime: Pointer to ktime_t to receive the vblank timestamp.
922 * Fetches the "cooked" vblank count value that represents the number of
923 * vblank events since the system was booted, including lost events due to
925 * of the vblank interval that corresponds to the current vblank counter value.
932 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_count_and_time() local
942 seq = read_seqbegin(&vblank->seqlock); in drm_vblank_count_and_time()
943 vblank_count = atomic64_read(&vblank->count); in drm_vblank_count_and_time()
944 *vblanktime = vblank->time; in drm_vblank_count_and_time()
945 } while (read_seqretry(&vblank->seqlock, seq)); in drm_vblank_count_and_time()
951 * drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter value
952 * and the system timestamp corresponding to that vblank counter value
954 * @vblanktime: Pointer to time to receive the vblank timestamp.
956 * Fetches the "cooked" vblank count value that represents the number of
957 * vblank events since the system was booted, including lost events due to
959 * of the vblank interval that corresponds to the current vblank counter value.
961 * Note that for a given vblank counter value drm_crtc_handle_vblank()
965 * functions, iff the vblank count is the same or a later one.
1007 * drm_crtc_arm_vblank_event - arm vblank event after pageflip
1008 * @crtc: the source CRTC of the vblank event
1011 * A lot of drivers need to generate vblank events for the very next vblank
1013 * flip gets armed, but not when it actually executes within the next vblank
1014 * period. This helper function implements exactly the required vblank arming
1018 * atomic commit must ensure that the next vblank happens at exactly the same
1020 * does **not** protect against the next vblank interrupt racing with either this
1023 * 1. Driver commits new hardware state into vblank-synchronized registers.
1024 * 2. A vblank happens, committing the hardware state. Also the corresponding
1025 * vblank interrupt is fired off and fully processed by the interrupt
1028 * 4. The event is only send out for the next vblank, which is wrong.
1033 * The only way to make this work safely is to prevent the vblank from firing
1041 * Caller must hold a vblank reference for the event @e acquired by a
1042 * drm_crtc_vblank_get(), which will be dropped when the next vblank arrives.
1059 * drm_crtc_send_vblank_event - helper to send vblank event after pageflip
1060 * @crtc: the source CRTC of the vblank event
1064 * vblank, and sends it to userspace. Caller must hold event lock.
1108 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_enable() local
1115 if (!vblank->enabled) { in drm_vblank_enable()
1117 * Enable vblank irqs under vblank_time_lock protection. in drm_vblank_enable()
1118 * All vblank count & timestamp updates are held off in drm_vblank_enable()
1121 * prevent double-accounting of same vblank interval. in drm_vblank_enable()
1124 drm_dbg_core(dev, "enabling vblank on crtc %u, ret: %d\n", in drm_vblank_enable()
1127 atomic_dec(&vblank->refcount); in drm_vblank_enable()
1132 * to mark the vblank as enabled after the call in drm_vblank_enable()
1135 WRITE_ONCE(vblank->enabled, true); in drm_vblank_enable()
1146 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_get() local
1158 if (atomic_add_return(1, &vblank->refcount) == 1) { in drm_vblank_get()
1161 if (!vblank->enabled) { in drm_vblank_get()
1162 atomic_dec(&vblank->refcount); in drm_vblank_get()
1172 * drm_crtc_vblank_get - get a reference count on vblank events
1175 * Acquire a reference count on vblank events to avoid having them disabled
1189 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_vblank_put() local
1194 if (drm_WARN_ON(dev, atomic_read(&vblank->refcount) == 0)) in drm_vblank_put()
1198 if (atomic_dec_and_test(&vblank->refcount)) { in drm_vblank_put()
1202 vblank_disable_fn(&vblank->disable_timer); in drm_vblank_put()
1204 mod_timer(&vblank->disable_timer, in drm_vblank_put()
1210 * drm_crtc_vblank_put - give up ownership of vblank events
1213 * Release ownership of a given vblank counter, turning off interrupts
1223 * drm_wait_one_vblank - wait for one vblank
1227 * This waits for one vblank to pass on @pipe, using the irq driver interfaces.
1228 * It is a failure to call this when the vblank irq for @pipe is disabled, e.g.
1235 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_wait_one_vblank() local
1243 if (drm_WARN(dev, ret, "vblank not available on crtc %i, ret=%i\n", in drm_wait_one_vblank()
1249 ret = wait_event_timeout(vblank->queue, in drm_wait_one_vblank()
1253 drm_WARN(dev, ret == 0, "vblank wait timed out on crtc %i\n", pipe); in drm_wait_one_vblank()
1260 * drm_crtc_wait_one_vblank - wait for one vblank
1263 * This waits for one vblank to pass on @crtc, using the irq driver interfaces.
1264 * It is a failure to call this when the vblank irq for @crtc is disabled, e.g.
1274 * drm_crtc_vblank_off - disable vblank events on a CRTC
1277 * Drivers can use this function to shut down the vblank interrupt handling when
1278 * disabling a crtc. This function ensures that the latest vblank frame count is
1281 * Drivers must use this function when the hardware vblank counter can get
1288 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_off() local
1297 * Grab event_lock early to prevent vblank work from being scheduled in drm_crtc_vblank_off()
1298 * while we're in the middle of shutting down vblank interrupts in drm_crtc_vblank_off()
1303 drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n", in drm_crtc_vblank_off()
1304 pipe, vblank->enabled, vblank->inmodeset); in drm_crtc_vblank_off()
1306 /* Avoid redundant vblank disables without previous in drm_crtc_vblank_off()
1308 if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) in drm_crtc_vblank_off()
1311 wake_up(&vblank->queue); in drm_crtc_vblank_off()
1315 * the vblank interrupt by bumping the refcount. in drm_crtc_vblank_off()
1317 if (!vblank->inmodeset) { in drm_crtc_vblank_off()
1318 atomic_inc(&vblank->refcount); in drm_crtc_vblank_off()
1319 vblank->inmodeset = 1; in drm_crtc_vblank_off()
1323 /* Send any queued vblank events, lest the natives grow disquiet */ in drm_crtc_vblank_off()
1329 drm_dbg_core(dev, "Sending premature vblank event on disable: " in drm_crtc_vblank_off()
1337 /* Cancel any leftover pending vblank work */ in drm_crtc_vblank_off()
1338 drm_vblank_cancel_pending_works(vblank); in drm_crtc_vblank_off()
1344 vblank->hwmode.crtc_clock = 0; in drm_crtc_vblank_off()
1346 /* Wait for any vblank work that's still executing to finish */ in drm_crtc_vblank_off()
1347 drm_vblank_flush_worker(vblank); in drm_crtc_vblank_off()
1352 * drm_crtc_vblank_reset - reset vblank state to off on a CRTC
1355 * Drivers can use this function to reset the vblank state to off at load time.
1358 * drm_crtc_vblank_off() is that this function doesn't save the vblank counter
1367 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_reset() local
1371 * Prevent subsequent drm_vblank_get() from enabling the vblank in drm_crtc_vblank_reset()
1374 if (!vblank->inmodeset) { in drm_crtc_vblank_reset()
1375 atomic_inc(&vblank->refcount); in drm_crtc_vblank_reset()
1376 vblank->inmodeset = 1; in drm_crtc_vblank_reset()
1381 drm_WARN_ON(dev, !list_empty(&vblank->pending_work)); in drm_crtc_vblank_reset()
1386 * drm_crtc_set_max_vblank_count - configure the hw max vblank counter value
1388 * @max_vblank_count: max hardware vblank counter value
1390 * Update the maximum hardware vblank counter value for @crtc
1392 * hardware vblank counter depends on the currently active
1395 * For example, if the hardware vblank counter does not work
1407 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_set_max_vblank_count() local
1410 drm_WARN_ON(dev, !READ_ONCE(vblank->inmodeset)); in drm_crtc_set_max_vblank_count()
1412 vblank->max_vblank_count = max_vblank_count; in drm_crtc_set_max_vblank_count()
1417 * drm_crtc_vblank_on - enable vblank events on a CRTC
1420 * This functions restores the vblank interrupt state captured with
1430 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_crtc_vblank_on() local
1436 drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n", in drm_crtc_vblank_on()
1437 pipe, vblank->enabled, vblank->inmodeset); in drm_crtc_vblank_on()
1440 if (vblank->inmodeset) { in drm_crtc_vblank_on()
1441 atomic_dec(&vblank->refcount); in drm_crtc_vblank_on()
1442 vblank->inmodeset = 0; in drm_crtc_vblank_on()
1449 * user wishes vblank interrupts to be enabled all the time. in drm_crtc_vblank_on()
1451 if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) in drm_crtc_vblank_on()
1458 * drm_vblank_restore - estimate missed vblanks and update vblank count.
1462 * Power manamement features can cause frame counter resets between vblank
1466 * vblank counter.
1473 struct drm_vblank_crtc *vblank; in drm_vblank_restore() local
1485 vblank = &dev->vblank[pipe]; in drm_vblank_restore()
1487 drm_debug_enabled(DRM_UT_VBL) && !vblank->framedur_ns, in drm_vblank_restore()
1489 framedur_ns = vblank->framedur_ns; in drm_vblank_restore()
1496 diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time)); in drm_vblank_restore()
1503 diff, diff_ns, framedur_ns, cur_vblank - vblank->last); in drm_vblank_restore()
1509 * drm_crtc_vblank_restore - estimate missed vblanks and update vblank count.
1512 * Power manamement features can cause frame counter resets between vblank
1516 * vblank counter.
1527 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_legacy_vblank_pre_modeset() local
1529 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_legacy_vblank_pre_modeset()
1543 if (!vblank->inmodeset) { in drm_legacy_vblank_pre_modeset()
1544 vblank->inmodeset = 0x1; in drm_legacy_vblank_pre_modeset()
1546 vblank->inmodeset |= 0x2; in drm_legacy_vblank_pre_modeset()
1553 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_legacy_vblank_post_modeset() local
1555 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_legacy_vblank_post_modeset()
1562 if (vblank->inmodeset) { in drm_legacy_vblank_post_modeset()
1567 if (vblank->inmodeset & 0x2) in drm_legacy_vblank_post_modeset()
1570 vblank->inmodeset = 0; in drm_legacy_vblank_post_modeset()
1611 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_queue_vblank_event() local
1640 * vblank disable, so no need for further locking. The reference from in drm_queue_vblank_event()
1641 * drm_vblank_get() protects against vblank disable from another source. in drm_queue_vblank_event()
1643 if (!READ_ONCE(vblank->enabled)) { in drm_queue_vblank_event()
1656 drm_dbg_core(dev, "event on vblank count %llu, current %llu, crtc %u\n", in drm_queue_vblank_event()
1732 struct drm_vblank_crtc *vblank; in drm_wait_vblank_ioctl() local
1781 vblank = &dev->vblank[pipe]; in drm_wait_vblank_ioctl()
1784 * queries to return the cached timestamp of the last vblank. in drm_wait_vblank_ioctl()
1788 READ_ONCE(vblank->enabled)) { in drm_wait_vblank_ioctl()
1796 "crtc %d failed to acquire vblank counter, %d\n", in drm_wait_vblank_ioctl()
1824 /* must hold on to the vblank ref until the event fires in drm_wait_vblank_ioctl()
1833 drm_dbg_core(dev, "waiting on vblank count %llu, crtc %u\n", in drm_wait_vblank_ioctl()
1835 wait = wait_event_interruptible_timeout(vblank->queue, in drm_wait_vblank_ioctl()
1837 !READ_ONCE(vblank->enabled), in drm_wait_vblank_ioctl()
1861 drm_dbg_core(dev, "crtc %d vblank wait interrupted by signal\n", in drm_wait_vblank_ioctl()
1888 drm_dbg_core(dev, "vblank event on %llu, current %llu\n", in drm_handle_vblank_events()
1903 * drm_handle_vblank - handle a vblank event
1907 * Drivers should call this routine in their vblank interrupt handlers to
1908 * update the vblank counter and send any signals that may be pending.
1914 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in drm_handle_vblank() local
1927 * vblank enable/disable, as this would cause inconsistent in drm_handle_vblank()
1928 * or corrupted timestamps and vblank counts. in drm_handle_vblank()
1932 /* Vblank irq handling disabled. Nothing to do. */ in drm_handle_vblank()
1933 if (!vblank->enabled) { in drm_handle_vblank()
1943 wake_up(&vblank->queue); in drm_handle_vblank()
1946 * we finish processing the following vblank after all events have in drm_handle_vblank()
1952 !atomic_read(&vblank->refcount)); in drm_handle_vblank()
1955 drm_handle_vblank_works(vblank); in drm_handle_vblank()
1960 vblank_disable_fn(&vblank->disable_timer); in drm_handle_vblank()
1967 * drm_crtc_handle_vblank - handle a vblank event
1970 * Drivers should call this routine in their vblank interrupt handlers to
1971 * update the vblank counter and send any signals that may be pending.
1975 * Note that for a given vblank counter value drm_crtc_handle_vblank()
1979 * functions, iff the vblank count is the same or a later one.
1993 * Get crtc VBLANK count.
2004 struct drm_vblank_crtc *vblank; in drm_crtc_get_sequence_ioctl() local
2023 vblank = &dev->vblank[pipe]; in drm_crtc_get_sequence_ioctl()
2024 vblank_enabled = dev->vblank_disable_immediate && READ_ONCE(vblank->enabled); in drm_crtc_get_sequence_ioctl()
2030 "crtc %d failed to acquire vblank counter, %d\n", in drm_crtc_get_sequence_ioctl()
2049 * Queue a event for VBLANK sequence
2060 struct drm_vblank_crtc *vblank; in drm_crtc_queue_sequence_ioctl() local
2088 vblank = &dev->vblank[pipe]; in drm_crtc_queue_sequence_ioctl()
2097 "crtc %d failed to acquire vblank counter, %d\n", in drm_crtc_queue_sequence_ioctl()
2121 * vblank disable, so no need for further locking. The reference from in drm_crtc_queue_sequence_ioctl()
2122 * drm_crtc_vblank_get() protects against vblank disable from another source. in drm_crtc_queue_sequence_ioctl()
2124 if (!READ_ONCE(vblank->enabled)) { in drm_crtc_queue_sequence_ioctl()