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.

Dependency Surface

Detected Declarations

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

Implementation Notes