Home
last modified time | relevance | path

Searched full:vblank (Results 1 – 25 of 373) sorted by relevance

12345678910>>...15

/Linux-v6.1/drivers/gpu/drm/
Ddrm_vblank_work.c13 * 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 …]
Ddrm_vblank.c2 * 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 …]
Ddrm_internal.h100 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);
Ddrm_irq.c2 * drm_irq.c IRQ and vblank support
127 * vblank/irq handling. KMS drivers must ensure that vblanks are all in drm_legacy_irq_uninstall()
133 struct drm_vblank_crtc *vblank = &dev->vblank[i]; in drm_legacy_irq_uninstall() local
135 if (!vblank->enabled) in drm_legacy_irq_uninstall()
141 wake_up(&vblank->queue); in drm_legacy_irq_uninstall()
/Linux-v6.1/include/drm/
Ddrm_vblank.h40 * 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 …]
Ddrm_device.h194 * If true, vblank interrupt will be disabled immediately when the
195 * refcount drops to zero, as opposed to via the vblank disable
198 * This can be set to true it the hardware has a working vblank counter
207 * @vblank:
209 * Array of vblank tracking structures, one per &struct drm_crtc. For
210 * historical reasons (vblank support predates kernel modesetting) this
214 struct drm_vblank_crtc *vblank; member
219 * Protects vblank count and time updates during vblank enable/disable
223 * @vbl_lock: Top-level vblank references lock, wraps the low-level
231 * Maximum value of the vblank registers. This value +1 will result in a
[all …]
Ddrm_crtc.h163 * Reflects the ability of a CRTC to send VBLANK events. This state
165 * atomic helpers will send out a fake VBLANK event during display
169 * One usage is for drivers and/or hardware without support for VBLANK
173 * drm_atomic_helper_check_modeset(), and a fake VBLANK event will be
178 * oneshot mode. In this case the fake VBLANK event is only generated
180 * core to fake VBLANK events when this part of the pipeline hasn't
191 * this case the driver will send the VBLANK event on its own when the
336 * last vblank before the display pipeline was shut off. The simplest
341 * undergoes an full modeset) the vblank timestamp and counter must
342 * be for the vblank right before the first frame that scans out the
[all …]
Ddrm_vblank_work.h12 * 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
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/engine/sw/
Dnv50.c42 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 …]
Dgf100.c42 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 …]
/Linux-v6.1/drivers/gpu/drm/i915/display/
Dintel_crtc.c75 struct drm_vblank_crtc *vblank = &dev->vblank[drm_crtc_index(&crtc->base)]; in intel_crtc_get_vblank_counter() local
80 if (!vblank->max_vblank_count) in intel_crtc_get_vblank_counter()
128 * requires vblank support on some platforms/outputs. in intel_crtc_vblank_on()
140 * requires vblank support on some platforms/outputs. in intel_crtc_vblank_off()
285 /* no hw vblank counter */
422 * Interrupt latency is critical for getting the vblank in intel_crtc_vblank_work_init()
423 * work executed as early as possible during the vblank. in intel_crtc_vblank_work_init()
470 * atomically regarding vblank. If the next vblank will happens within
471 * the next 100 us, this function waits until the vblank passes.
562 * increment approx. 1/3 of a scanline before start of vblank. in intel_pipe_update_start()
[all …]
/Linux-v6.1/drivers/gpu/drm/vkms/
Dvkms_crtc.c26 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()
242 /* This lock is held across the atomic commit to block vblank timer in vkms_crtc_atomic_begin()
/Linux-v6.1/drivers/gpu/drm/amd/amdgpu/
Damdgpu_vkms.c55 DRM_WARN("%s: vblank timer overrun\n", __func__); in amdgpu_vkms_vblank_simulate()
59 DRM_ERROR("amdgpu_vkms failure on handling vblank"); in amdgpu_vkms_vblank_simulate()
68 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in amdgpu_vkms_enable_vblank() local
74 out->period_ns = ktime_set(0, vblank->framedur_ns); in amdgpu_vkms_enable_vblank()
95 struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; in amdgpu_vkms_get_vblank_timestamp() local
98 if (!READ_ONCE(vblank->enabled)) { in amdgpu_vkms_get_vblank_timestamp()
105 if (WARN_ON(*vblank_time == vblank->time)) in amdgpu_vkms_get_vblank_timestamp()
111 * only generated after all the vblank registers are updated) and what in amdgpu_vkms_get_vblank_timestamp()
112 * the vblank core expects. Therefore we need to always correct the in amdgpu_vkms_get_vblank_timestamp()
/Linux-v6.1/drivers/gpu/drm/radeon/
Dradeon_display.c318 * to complete in this vblank? GET_DISTANCE_TO_VBLANKSTART provides in radeon_crtc_handle_vblank()
319 * distance to start of "fudged earlier" vblank in vpos, distance to in radeon_crtc_handle_vblank()
320 * start of real vblank in hpos. vpos >= 0 && hpos < 0 means we are in in radeon_crtc_handle_vblank()
321 * the last few scanlines before start of real vblank, where the vblank in radeon_crtc_handle_vblank()
324 * vblank. On pre-AVIVO hardware, flips also complete inside the real in radeon_crtc_handle_vblank()
325 * vblank, not only at leading edge, so if update_pending for hpos >= 0 in radeon_crtc_handle_vblank()
326 * == inside real vblank, the flip will complete almost immediately. in radeon_crtc_handle_vblank()
331 * vblank, leading to a delayed emission of the flip completion event. in radeon_crtc_handle_vblank()
333 * completing inside vblank, not only at leading edge of vblank. in radeon_crtc_handle_vblank()
342 /* crtc didn't flip in this target vblank interval, in radeon_crtc_handle_vblank()
[all …]
/Linux-v6.1/drivers/gpu/drm/omapdrm/
Domap_irq.c102 * enable_vblank - enable vblank interrupt events
105 * Enable vblank interrupts for @crtc. If the device doesn't have
106 * a hardware vblank counter, this routine should be a no-op, since
110 * Zero on success, appropriate errno if the given @crtc's vblank
132 * disable_vblank - disable vblank interrupt events
135 * Disable vblank interrupts for @crtc. If the device doesn't have
136 * a hardware vblank counter, this routine should be a no-op, since
/Linux-v6.1/drivers/media/test-drivers/vivid/
Dvivid-osd.c74 struct fb_vblank vblank; in vivid_fb_ioctl() local
76 memset(&vblank, 0, sizeof(vblank)); in vivid_fb_ioctl()
77 vblank.flags = FB_VBLANK_HAVE_COUNT | FB_VBLANK_HAVE_VCOUNT | in vivid_fb_ioctl()
79 vblank.count = 0; in vivid_fb_ioctl()
80 vblank.vcount = 0; in vivid_fb_ioctl()
81 vblank.hcount = 0; in vivid_fb_ioctl()
82 if (copy_to_user((void __user *)arg, &vblank, sizeof(vblank))) in vivid_fb_ioctl()
/Linux-v6.1/drivers/gpu/drm/msm/disp/mdp4/
Dmdp4_crtc.c57 struct mdp_irq vblank; member
73 mdp_irq_register(&get_kms(crtc)->base, &mdp4_crtc->vblank); in request_pending()
278 /* Disable/save vblank irq handling before power is disabled */ in mdp4_crtc_atomic_disable()
300 /* Restore vblank irq handling after power is enabled */ in mdp4_crtc_atomic_enable()
352 * buffered, and changing them other than from vblank seems to trigger
500 struct mdp4_crtc *mdp4_crtc = container_of(irq, struct mdp4_crtc, vblank); in mdp4_crtc_vblank_irq()
505 mdp_irq_unregister(&get_kms(crtc)->base, &mdp4_crtc->vblank); in mdp4_crtc_vblank_irq()
538 ret = wait_event_timeout(dev->vblank[drm_crtc_index(crtc)].queue, in mdp4_crtc_wait_for_flush_done()
543 dev_warn(dev->dev, "vblank time out, crtc=%d\n", mdp4_crtc->id); in mdp4_crtc_wait_for_flush_done()
553 return mdp4_crtc->vblank.irqmask; in mdp4_crtc_vblank()
[all …]
/Linux-v6.1/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_crtc.h127 * @event : Pointer to last received drm vblank event. If there is a
128 * pending vblank event, this will be non-null.
133 * @vblank_cb_count : count of vblank callback since last reset
135 * @vblank_cb_time : ktime at vblank count reset
138 * safe to make decisions on during VBLANK on/off work
250 * dpu_crtc_vblank_callback - called on vblank irq, issues completion events
Ddpu_encoder_phys.h31 * Masters have extra responsibilities, like managing the VBLANK IRQ.
66 * @handle_vblank_virt: Notify virtual encoder of vblank IRQ reception
96 * @control_vblank_irq Register/Deregister for VBLANK IRQ
101 * @wait_for_vblank: Wait for VBLANK, for sub-driver internal use
187 * @vblank_refcount: Reference count of vblank request
191 * vs. the number of done/vblank irqs. Should hover
261 * @pending_vblank_cnt: Atomic counter tracking pending wait for VBLANK
262 * @pending_vblank_wq: Wait queue for blocking until VBLANK received
/Linux-v6.1/drivers/media/i2c/
Dov9282.c84 * @vblank: Vertical blanking in lines
96 u32 vblank; member
119 * @vblank: Vertical blanking in lines
140 u32 vblank; member
258 .vblank = 1022,
393 mode->vblank_max, 1, mode->vblank); in ov9282_update_controls()
409 lpfr = ov9282->vblank + ov9282->cur_mode->height; in ov9282_update_exp_gain()
456 ov9282->vblank = ov9282->vblank_ctrl->val; in ov9282_set_ctrl()
458 dev_dbg(ov9282->dev, "Received vblank %u, new lpfr %u", in ov9282_set_ctrl()
459 ov9282->vblank, in ov9282_set_ctrl()
[all …]
Dimx334.c84 * @vblank: Vertical blanking in lines
96 u32 vblank; member
119 * @vblank: Vertical blanking in lines
140 u32 vblank; member
251 .vblank = 2340,
390 mode->vblank_max, 1, mode->vblank); in imx334_update_controls()
406 lpfr = imx334->vblank + imx334->cur_mode->height; in imx334_update_exp_gain()
454 imx334->vblank = imx334->vblank_ctrl->val; in imx334_set_ctrl()
456 dev_dbg(imx334->dev, "Received vblank %u, new lpfr %u", in imx334_set_ctrl()
457 imx334->vblank, in imx334_set_ctrl()
[all …]
Dimx335.c84 * @vblank: Vertical blanking in lines
96 u32 vblank; member
119 * @vblank: Vertical blanking in lines
140 u32 vblank; member
243 .vblank = 2560,
382 mode->vblank_max, 1, mode->vblank); in imx335_update_controls()
398 lpfr = imx335->vblank + imx335->cur_mode->height; in imx335_update_exp_gain()
446 imx335->vblank = imx335->vblank_ctrl->val; in imx335_set_ctrl()
448 dev_dbg(imx335->dev, "Received vblank %u, new lpfr %u", in imx335_set_ctrl()
449 imx335->vblank, in imx335_set_ctrl()
[all …]
/Linux-v6.1/drivers/video/fbdev/matrox/
Dmatroxfb_crtc2.c403 …ic int matroxfb_dh_get_vblank(const struct matroxfb_dh_fb_info* m2info, struct fb_vblank* vblank) { in matroxfb_dh_get_vblank() argument
407 memset(vblank, 0, sizeof(*vblank)); in matroxfb_dh_get_vblank()
408 vblank->flags = FB_VBLANK_HAVE_VCOUNT | FB_VBLANK_HAVE_VBLANK; in matroxfb_dh_get_vblank()
410 vblank->vcount = mga_inl(0x3C48) & 0x000007FF; in matroxfb_dh_get_vblank()
412 if (vblank->vcount >= m2info->fbcon.var.yres) in matroxfb_dh_get_vblank()
413 vblank->flags |= FB_VBLANK_VBLANKING; in matroxfb_dh_get_vblank()
415 vblank->flags |= FB_VBLANK_HAVE_COUNT; in matroxfb_dh_get_vblank()
418 vblank->count = minfo->crtc2.vsync.cnt; in matroxfb_dh_get_vblank()
435 struct fb_vblank vblank; in matroxfb_dh_ioctl() local
438 err = matroxfb_dh_get_vblank(m2info, &vblank); in matroxfb_dh_ioctl()
[all …]
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/engine/disp/
Dbase.c45 struct nvkm_disp *disp = container_of(event, typeof(*disp), vblank); in nvkm_disp_vblank_fini()
54 struct nvkm_disp *disp = container_of(event, typeof(*disp), vblank); in nvkm_disp_vblank_init()
65 container_of(notify->event, typeof(*disp), vblank); in nvkm_disp_vblank_ctor()
73 if (ret = -ENXIO, req->v0.head <= disp->vblank.index_nr) { in nvkm_disp_vblank_ctor()
94 nvkm_event_send(&disp->vblank, 1, head, &rep, sizeof(rep)); in nvkm_disp_vblank()
137 *event = &disp->vblank; in nvkm_disp_ntfy()
385 return nvkm_event_init(&nvkm_disp_vblank_func, 1, i, &disp->vblank); in nvkm_disp_oneinit()
408 nvkm_event_fini(&disp->vblank); in nvkm_disp_dtor()
/Linux-v6.1/drivers/gpu/drm/i915/
DKconfig.debug215 bool "Enable extra debug warnings for vblank evasion"
220 vblank evade mechanism. This gives a warning every time the
221 the deadline allotted for the vblank evade critical section
223 the vblank.

12345678910>>...15