include/drm/drm_vblank_helper.h

Source file repositories/reference/linux-study-clean/include/drm/drm_vblank_helper.h

File Facts

System
Linux kernel
Corpus path
include/drm/drm_vblank_helper.h
Extension
.h
Size
1685 bytes
Lines
57
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

#ifndef _DRM_VBLANK_HELPER_H_
#define _DRM_VBLANK_HELPER_H_

#include <linux/hrtimer_types.h>
#include <linux/types.h>

struct drm_atomic_commit;
struct drm_crtc;

/*
 * VBLANK helpers
 */

void drm_crtc_vblank_atomic_flush(struct drm_crtc *crtc,
				  struct drm_atomic_commit *state);
void drm_crtc_vblank_atomic_enable(struct drm_crtc *crtc,
				   struct drm_atomic_commit *state);
void drm_crtc_vblank_atomic_disable(struct drm_crtc *crtc,
				    struct drm_atomic_commit *crtc_state);

/**
 * DRM_CRTC_HELPER_VBLANK_FUNCS - Default implementation for VBLANK helpers
 *
 * This macro initializes struct &drm_crtc_helper_funcs to default helpers
 * for VBLANK handling.
 */
#define DRM_CRTC_HELPER_VBLANK_FUNCS \
	.atomic_flush = drm_crtc_vblank_atomic_flush, \
	.atomic_enable = drm_crtc_vblank_atomic_enable, \
	.atomic_disable = drm_crtc_vblank_atomic_disable

/*
 * VBLANK timer
 */

int drm_crtc_vblank_helper_enable_vblank_timer(struct drm_crtc *crtc);
void drm_crtc_vblank_helper_disable_vblank_timer(struct drm_crtc *crtc);
bool drm_crtc_vblank_helper_get_vblank_timestamp_from_timer(struct drm_crtc *crtc,
							    int *max_error,
							    ktime_t *vblank_time,
							    bool in_vblank_irq);

/**
 * DRM_CRTC_VBLANK_TIMER_FUNCS - Default implementation for VBLANK timers
 *
 * This macro initializes struct &drm_crtc_funcs to default helpers for
 * VBLANK timers.
 */
#define DRM_CRTC_VBLANK_TIMER_FUNCS \
	.enable_vblank = drm_crtc_vblank_helper_enable_vblank_timer, \
	.disable_vblank = drm_crtc_vblank_helper_disable_vblank_timer, \
	.get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp_from_timer

#endif

Annotation

Implementation Notes