| /kernel/linux/linux-5.10/drivers/gpu/drm/ |
| D | drm_vblank_work.c | 13 * DOC: vblank works 39 * particular vblank has passed, and then executes the work at realtime 46 void drm_handle_vblank_works(struct drm_vblank_crtc *vblank) in drm_handle_vblank_works() argument 49 u64 count = atomic64_read(&vblank->count); in drm_handle_vblank_works() 52 assert_spin_locked(&vblank->dev->event_lock); in drm_handle_vblank_works() 54 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_handle_vblank_works() 59 drm_vblank_put(vblank->dev, vblank->pipe); in drm_handle_vblank_works() 60 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works() 64 wake_up_all(&vblank->work_wait_queue); in drm_handle_vblank_works() 67 /* Handle cancelling any pending vblank work items and drop respective vblank [all …]
|
| D | drm_vblank.c | 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 [all …]
|
| D | drm_internal.h | 112 static inline void drm_vblank_flush_worker(struct drm_vblank_crtc *vblank) in drm_vblank_flush_worker() argument 114 kthread_flush_worker(vblank->worker); in drm_vblank_flush_worker() 117 static inline void drm_vblank_destroy_worker(struct drm_vblank_crtc *vblank) in drm_vblank_destroy_worker() argument 119 if (vblank->worker) in drm_vblank_destroy_worker() 120 kthread_destroy_worker(vblank->worker); in drm_vblank_destroy_worker() 123 int drm_vblank_worker_init(struct drm_vblank_crtc *vblank); 124 void drm_vblank_cancel_pending_works(struct drm_vblank_crtc *vblank); 125 void drm_handle_vblank_works(struct drm_vblank_crtc *vblank);
|
| D | drm_irq.c | 2 * drm_irq.c IRQ and vblank support 78 * need to set &drm_device.irq_enabled to signal the DRM core that vblank 96 * that vblank interrupts are available. 181 * vblank/irq handling. KMS drivers must ensure that vblanks are all in drm_irq_uninstall() 187 struct drm_vblank_crtc *vblank = &dev->vblank[i]; in drm_irq_uninstall() local 189 if (!vblank->enabled) in drm_irq_uninstall() 195 wake_up(&vblank->queue); in drm_irq_uninstall()
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/ |
| D | drm_vblank_work.c | 13 * DOC: vblank works 39 * particular vblank has passed, and then executes the work at realtime 46 void drm_handle_vblank_works(struct drm_vblank_crtc *vblank) in drm_handle_vblank_works() argument 49 u64 count = atomic64_read(&vblank->count); in drm_handle_vblank_works() 52 assert_spin_locked(&vblank->dev->event_lock); in drm_handle_vblank_works() 54 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_handle_vblank_works() 59 drm_vblank_put(vblank->dev, vblank->pipe); in drm_handle_vblank_works() 60 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works() 64 wake_up_all(&vblank->work_wait_queue); in drm_handle_vblank_works() 67 /* Handle cancelling any pending vblank work items and drop respective vblank [all …]
|
| D | drm_vblank.c | 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 [all …]
|
| D | drm_internal.h | 100 static inline void drm_vblank_flush_worker(struct drm_vblank_crtc *vblank) in drm_vblank_flush_worker() argument 102 kthread_flush_worker(vblank->worker); in drm_vblank_flush_worker() 105 static inline void drm_vblank_destroy_worker(struct drm_vblank_crtc *vblank) in drm_vblank_destroy_worker() argument 107 if (vblank->worker) in drm_vblank_destroy_worker() 108 kthread_destroy_worker(vblank->worker); in drm_vblank_destroy_worker() 111 int drm_vblank_worker_init(struct drm_vblank_crtc *vblank); 112 void drm_vblank_cancel_pending_works(struct drm_vblank_crtc *vblank); 113 void drm_handle_vblank_works(struct drm_vblank_crtc *vblank);
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/i915/display/ |
| D | intel_vblank.c | 23 * start of vblank: 26 * generate start of vblank interrupt (gen4+) 29 * | generate frame start interrupt (aka. vblank interrupt) (gmch) 58 * (depending on TRANSCONF settings) after the start of vblank 69 struct drm_vblank_crtc *vblank = &dev_priv->drm.vblank[drm_crtc_index(crtc)]; in i915_get_vblank_counter() local 70 const struct drm_display_mode *mode = &vblank->hwmode; in i915_get_vblank_counter() 79 * vblank wait before enabling the TV encoder and so we in i915_get_vblank_counter() 80 * have to enable vblank interrupts while the frame counter in i915_get_vblank_counter() 81 * is still in a working state. However the core vblank code in i915_get_vblank_counter() 86 if (!vblank->max_vblank_count) in i915_get_vblank_counter() [all …]
|
| D | intel_crtc.c | 41 "[CRTC:%d:%s] vblank assertion failure (expected off, current on)\n", in assert_vblank_disabled() 81 struct drm_vblank_crtc *vblank = &dev->vblank[drm_crtc_index(&crtc->base)]; in intel_crtc_get_vblank_counter() local 86 if (!vblank->max_vblank_count) in intel_crtc_get_vblank_counter() 134 * requires vblank support on some platforms/outputs. in intel_crtc_vblank_on() 146 * requires vblank support on some platforms/outputs. in intel_crtc_vblank_off() 291 /* no hw vblank counter */ 428 * Interrupt latency is critical for getting the vblank in intel_crtc_vblank_work_init() 429 * work executed as early as possible during the vblank. in intel_crtc_vblank_work_init() 476 * atomically regarding vblank. If the next vblank will happens within 477 * the next 100 us, this function waits until the vblank passes. [all …]
|
| /kernel/linux/linux-6.6/include/drm/ |
| D | drm_vblank.h | 40 * struct drm_pending_vblank_event - pending vblank event tracking 67 * Event payload for vblank events, requested through 82 * struct drm_vblank_crtc - vblank tracking for a CRTC 84 * This structure tracks the vblank state for one CRTC. 86 * Note that for historical reasons - the vblank handling code is still shared 97 * @queue: Wait queue for vblank waiters. 101 * @disable_timer: Disable timer for the delayed vblank disabling 102 * hysteresis logic. Vblank disabling is controlled through the 109 * @seqlock: Protect vblank count and time. 116 * Current software vblank counter. [all …]
|
| D | drm_device.h | 210 * If true, vblank interrupt will be disabled immediately when the 211 * refcount drops to zero, as opposed to via the vblank disable 214 * This can be set to true it the hardware has a working vblank counter 223 * @vblank: 225 * Array of vblank tracking structures, one per &struct drm_crtc. For 226 * historical reasons (vblank support predates kernel modesetting) this 230 struct drm_vblank_crtc *vblank; member 235 * Protects vblank count and time updates during vblank enable/disable 239 * @vbl_lock: Top-level vblank references lock, wraps the low-level 247 * Maximum value of the vblank registers. This value +1 will result in a [all …]
|
| D | drm_crtc.h | 158 * Reflects the ability of a CRTC to send VBLANK events. This state 160 * atomic helpers will send out a fake VBLANK event during display 164 * One usage is for drivers and/or hardware without support for VBLANK 168 * drm_atomic_helper_check_modeset(), and a fake VBLANK event will be 173 * oneshot mode. In this case the fake VBLANK event is only generated 175 * core to fake VBLANK events when this part of the pipeline hasn't 186 * this case the driver will send the VBLANK event on its own when the 331 * last vblank before the display pipeline was shut off. The simplest 336 * undergoes an full modeset) the vblank timestamp and counter must 337 * be for the vblank right before the first frame that scans out the [all …]
|
| D | drm_vblank_work.h | 12 * vblank passes, and then executes at realtime priority outside of IRQ 31 * @vblank: A pointer to &drm_vblank_crtc this work item belongs to. 33 struct drm_vblank_crtc *vblank; member 36 * @count: The target vblank this work will execute on. Drivers should
|
| /kernel/linux/linux-5.10/include/drm/ |
| D | drm_vblank.h | 40 * struct drm_pending_vblank_event - pending vblank event tracking 67 * Event payload for vblank events, requested through 82 * struct drm_vblank_crtc - vblank tracking for a CRTC 84 * This structure tracks the vblank state for one CRTC. 86 * Note that for historical reasons - the vblank handling code is still shared 97 * @queue: Wait queue for vblank waiters. 101 * @disable_timer: Disable timer for the delayed vblank disabling 102 * hysteresis logic. Vblank disabling is controlled through the 109 * @seqlock: Protect vblank count and time. 116 * Current software vblank counter. [all …]
|
| D | drm_device.h | 204 * Indicates that interrupt handling is enabled, specifically vblank 218 * If true, vblank interrupt will be disabled immediately when the 219 * refcount drops to zero, as opposed to via the vblank disable 222 * This can be set to true it the hardware has a working vblank counter 231 * @vblank: 233 * Array of vblank tracking structures, one per &struct drm_crtc. For 234 * historical reasons (vblank support predates kernel modesetting) this 238 struct drm_vblank_crtc *vblank; member 243 * Protects vblank count and time updates during vblank enable/disable 247 * @vbl_lock: Top-level vblank references lock, wraps the low-level [all …]
|
| D | drm_crtc.h | 176 * Reflects the ability of a CRTC to send VBLANK events. This state 178 * atomic helpers will send out a fake VBLANK event during display 182 * One usage is for drivers and/or hardware without support for VBLANK 186 * drm_atomic_helper_check_modeset(), and a fake VBLANK event will be 191 * oneshot mode. In this case the fake VBLANK event is only generated 193 * core to fake VBLANK events when this part of the pipeline hasn't 204 * this case the driver will send the VBLANK event on its own when the 338 * last vblank before the display pipeline was shut off. The simplest 343 * undergoes an full modeset) the vblank timestamp and counter must 344 * be for the vblank right before the first frame that scans out the [all …]
|
| D | drm_vblank_work.h | 12 * vblank passes, and then executes at realtime priority outside of IRQ 31 * @vblank: A pointer to &drm_vblank_crtc this work item belongs to. 33 struct drm_vblank_crtc *vblank; member 36 * @count: The target vblank this work will execute on. Drivers should
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/engine/sw/ |
| D | nv50.c | 42 container_of(notify, typeof(*chan), vblank.notify[notify->id]); in nv50_sw_chan_vblsem_release() 47 nvkm_wr32(device, 0x001710, 0x80000000 | chan->vblank.ctxdma); in nv50_sw_chan_vblsem_release() 51 nvkm_wr32(device, 0x001570, chan->vblank.offset); in nv50_sw_chan_vblsem_release() 52 nvkm_wr32(device, 0x001574, chan->vblank.value); in nv50_sw_chan_vblsem_release() 54 nvkm_wr32(device, 0x060010, chan->vblank.offset); in nv50_sw_chan_vblsem_release() 55 nvkm_wr32(device, 0x060014, chan->vblank.value); in nv50_sw_chan_vblsem_release() 68 case 0x018c: chan->vblank.ctxdma = data; return true; in nv50_sw_chan_mthd() 69 case 0x0400: chan->vblank.offset = data; return true; in nv50_sw_chan_mthd() 70 case 0x0404: chan->vblank.value = data; return true; in nv50_sw_chan_mthd() 72 if (data < device->disp->vblank.index_nr) { in nv50_sw_chan_mthd() [all …]
|
| D | gf100.c | 42 container_of(notify, typeof(*chan), vblank.notify[notify->id]); in gf100_sw_chan_vblsem_release() 49 nvkm_wr32(device, 0x06000c, upper_32_bits(chan->vblank.offset)); in gf100_sw_chan_vblsem_release() 50 nvkm_wr32(device, 0x060010, lower_32_bits(chan->vblank.offset)); in gf100_sw_chan_vblsem_release() 51 nvkm_wr32(device, 0x060014, chan->vblank.value); in gf100_sw_chan_vblsem_release() 64 chan->vblank.offset &= 0x00ffffffffULL; in gf100_sw_chan_mthd() 65 chan->vblank.offset |= (u64)data << 32; in gf100_sw_chan_mthd() 68 chan->vblank.offset &= 0xff00000000ULL; in gf100_sw_chan_mthd() 69 chan->vblank.offset |= data; in gf100_sw_chan_mthd() 72 chan->vblank.value = data; in gf100_sw_chan_mthd() 75 if (data < device->disp->vblank.index_nr) { in gf100_sw_chan_mthd() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/engine/sw/ |
| D | nv50.c | 42 container_of(notify, typeof(*chan), vblank.notify[notify->index]); in nv50_sw_chan_vblsem_release() 47 nvkm_wr32(device, 0x001710, 0x80000000 | chan->vblank.ctxdma); in nv50_sw_chan_vblsem_release() 51 nvkm_wr32(device, 0x001570, chan->vblank.offset); in nv50_sw_chan_vblsem_release() 52 nvkm_wr32(device, 0x001574, chan->vblank.value); in nv50_sw_chan_vblsem_release() 54 nvkm_wr32(device, 0x060010, chan->vblank.offset); in nv50_sw_chan_vblsem_release() 55 nvkm_wr32(device, 0x060014, chan->vblank.value); in nv50_sw_chan_vblsem_release() 68 case 0x018c: chan->vblank.ctxdma = data; return true; in nv50_sw_chan_mthd() 69 case 0x0400: chan->vblank.offset = data; return true; in nv50_sw_chan_mthd() 70 case 0x0404: chan->vblank.value = data; return true; in nv50_sw_chan_mthd() 72 if (data < device->disp->vblank.index_nr) { in nv50_sw_chan_mthd() [all …]
|
| D | gf100.c | 42 container_of(notify, typeof(*chan), vblank.notify[notify->index]); in gf100_sw_chan_vblsem_release() 49 nvkm_wr32(device, 0x06000c, upper_32_bits(chan->vblank.offset)); in gf100_sw_chan_vblsem_release() 50 nvkm_wr32(device, 0x060010, lower_32_bits(chan->vblank.offset)); in gf100_sw_chan_vblsem_release() 51 nvkm_wr32(device, 0x060014, chan->vblank.value); in gf100_sw_chan_vblsem_release() 64 chan->vblank.offset &= 0x00ffffffffULL; in gf100_sw_chan_mthd() 65 chan->vblank.offset |= (u64)data << 32; in gf100_sw_chan_mthd() 68 chan->vblank.offset &= 0xff00000000ULL; in gf100_sw_chan_mthd() 69 chan->vblank.offset |= data; in gf100_sw_chan_mthd() 72 chan->vblank.value = data; in gf100_sw_chan_mthd() 75 if (data < device->disp->vblank.index_nr) { in gf100_sw_chan_mthd() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/vkms/ |
| D | vkms_crtc.c | 22 pr_warn("%s: vblank timer overrun\n", __func__); in vkms_vblank_simulate() 27 DRM_ERROR("vkms failure on handling vblank"); in vkms_vblank_simulate() 60 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in vkms_enable_vblank() local 67 out->period_ns = ktime_set(0, vblank->framedur_ns); in vkms_enable_vblank() 88 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in vkms_get_vblank_timestamp() local 90 if (!READ_ONCE(vblank->enabled)) { in vkms_get_vblank_timestamp() 97 if (WARN_ON(*vblank_time == vblank->time)) in vkms_get_vblank_timestamp() 103 * only generated after all the vblank registers are updated) and what in vkms_get_vblank_timestamp() 104 * the vblank core expects. Therefore we need to always correct the in vkms_get_vblank_timestamp() 234 /* This lock is held across the atomic commit to block vblank timer in vkms_crtc_atomic_begin()
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/vkms/ |
| D | vkms_crtc.c | 26 pr_warn("%s: vblank timer overrun\n", __func__); in vkms_vblank_simulate() 31 DRM_ERROR("vkms failure on handling vblank"); in vkms_vblank_simulate() 66 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in vkms_enable_vblank() local 73 out->period_ns = ktime_set(0, vblank->framedur_ns); in vkms_enable_vblank() 94 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in vkms_get_vblank_timestamp() local 96 if (!READ_ONCE(vblank->enabled)) { in vkms_get_vblank_timestamp() 103 if (WARN_ON(*vblank_time == vblank->time)) in vkms_get_vblank_timestamp() 109 * only generated after all the vblank registers are updated) and what in vkms_get_vblank_timestamp() 110 * the vblank core expects. Therefore we need to always correct the in vkms_get_vblank_timestamp() 241 /* This lock is held across the atomic commit to block vblank timer in vkms_crtc_atomic_begin()
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/ |
| D | amdgpu_display.c | 777 * USE_REAL_VBLANKSTART to use the real start of vblank instead 778 * of a fudged earlier start of vblank. 781 * fudged earlier start of vblank in *vpos and the distance 782 * to true start of vblank in *hpos. 792 * Returns vpos as a negative number inside vblank, counting the number 793 * of scanlines to go until end of vblank, e.g., -1 means "one scanline 794 * until start of active scanout / end of vblank." 799 * DRM_SCANOUTPOS_INVBL = Inside vblank. 835 /* Valid vblank area boundaries from gpu retrieved? */ in amdgpu_display_get_crtc_scanoutpos() 848 /* Called from driver internal vblank counter query code? */ in amdgpu_display_get_crtc_scanoutpos() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/loongson/ |
| D | loongson_module.c | 17 MODULE_PARM_DESC(vblank, "Disable/Enable hw vblank support"); 18 module_param_named(vblank, loongson_vblank, int, 0400);
|