include/drm/drm_vblank.h
Source file repositories/reference/linux-study-clean/include/drm/drm_vblank.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_vblank.h- Extension
.h- Size
- 11082 bytes
- Lines
- 347
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/seqlock.hlinux/hrtimer.hlinux/idr.hlinux/poll.hlinux/kthread.hdrm/drm_file.hdrm/drm_modes.h
Detected Declarations
struct drm_devicestruct drm_crtcstruct drm_vblank_workstruct drm_pending_vblank_eventstruct drm_vblank_crtc_configstruct drm_vblank_crtc_timerstruct drm_vblank_crtc
Annotated Snippet
struct drm_pending_vblank_event {
/**
* @base: Base structure for tracking pending DRM events.
*/
struct drm_pending_event base;
/**
* @pipe: drm_crtc_index() of the &drm_crtc this event is for.
*/
unsigned int pipe;
/**
* @sequence: frame event should be triggered at
*/
u64 sequence;
/**
* @event: Actual event which will be sent to userspace.
*/
union {
/**
* @event.base: DRM event base class.
*/
struct drm_event base;
/**
* @event.vbl:
*
* Event payload for vblank events, requested through
* either the MODE_PAGE_FLIP or MODE_ATOMIC IOCTL. Also
* generated by the legacy WAIT_VBLANK IOCTL, but new userspace
* should use MODE_QUEUE_SEQUENCE and &event.seq instead.
*/
struct drm_event_vblank vbl;
/**
* @event.seq: Event payload for the MODE_QUEUEU_SEQUENCE IOCTL.
*/
struct drm_event_crtc_sequence seq;
} event;
};
/**
* struct drm_vblank_crtc_config - vblank configuration for a CRTC
*/
struct drm_vblank_crtc_config {
/**
* @offdelay_ms: Vblank off delay in ms, used to determine how long
* &drm_vblank_crtc.disable_timer waits before disabling.
*
* Defaults to the value of drm_vblank_offdelay in drm_crtc_vblank_on().
*/
int offdelay_ms;
/**
* @disable_immediate: See &drm_device.vblank_disable_immediate
* for the exact semantics of immediate vblank disabling.
*
* Additionally, this tracks the disable immediate value per crtc, just
* in case it needs to differ from the default value for a given device.
*
* Defaults to the value of &drm_device.vblank_disable_immediate in
* drm_crtc_vblank_on().
*/
bool disable_immediate;
};
/**
* struct drm_vblank_crtc_timer - vblank timer for a CRTC
*/
struct drm_vblank_crtc_timer {
/**
* @timer: The vblank's high-resolution timer
*/
struct hrtimer timer;
/**
* @interval_lock: Protects @interval
*/
spinlock_t interval_lock;
/**
* @interval: Duration between two vblanks
*/
ktime_t interval;
/**
* @crtc: The timer's CRTC
*/
struct drm_crtc *crtc;
};
/**
* struct drm_vblank_crtc - vblank tracking for a CRTC
*
* This structure tracks the vblank state for one CRTC.
Annotation
- Immediate include surface: `linux/seqlock.h`, `linux/hrtimer.h`, `linux/idr.h`, `linux/poll.h`, `linux/kthread.h`, `drm/drm_file.h`, `drm/drm_modes.h`.
- Detected declarations: `struct drm_device`, `struct drm_crtc`, `struct drm_vblank_work`, `struct drm_pending_vblank_event`, `struct drm_vblank_crtc_config`, `struct drm_vblank_crtc_timer`, `struct drm_vblank_crtc`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.