diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-05-22 19:36:03 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-08 17:43:26 +0200 |
commit | 020178a1bcadf20b9d057988984f374c905d542e (patch) | |
tree | 18ce192d4d9719fad6416ede0a25bcc2d74fa622 /include/drm | |
parent | b95af8bee524974768681b2b92235e1e1e21bf1a (diff) | |
download | op-kernel-dev-020178a1bcadf20b9d057988984f374c905d542e.zip op-kernel-dev-020178a1bcadf20b9d057988984f374c905d542e.tar.gz |
drm: Add drm_crtc_vblank_waitqueue()
Add a small static inline helper to grab the vblank wait queue based on
the drm_crtc.
This is useful for drivers to do internal vblank waits using
wait_event() & co.
v2: Pimp commit message (Daniel)
Add kernel doc (Daniel)
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d3d9be6..bb44c1e 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1344,6 +1344,17 @@ extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, extern void drm_calc_timestamping_constants(struct drm_crtc *crtc, const struct drm_display_mode *mode); +/** + * drm_crtc_vblank_waitqueue - get vblank waitqueue for the CRTC + * @crtc: which CRTC's vblank waitqueue to retrieve + * + * This function returns a pointer to the vblank waitqueue for the CRTC. + * Drivers can use this to implement vblank waits using wait_event() & co. + */ +static inline wait_queue_head_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc) +{ + return &crtc->dev->vblank[drm_crtc_index(crtc)].queue; +} /* Modesetting support */ extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); |