aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_irq.c19
-rw-r--r--include/drm/drmP.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index f5a5f18efa5b..276301081aa5 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -904,6 +904,8 @@ static void send_vblank_event(struct drm_device *dev,
904 * 904 *
905 * Updates sequence # and timestamp on event, and sends it to userspace. 905 * Updates sequence # and timestamp on event, and sends it to userspace.
906 * Caller must hold event lock. 906 * Caller must hold event lock.
907 *
908 * This is the legacy version of drm_crtc_send_vblank_event().
907 */ 909 */
908void drm_send_vblank_event(struct drm_device *dev, int crtc, 910void drm_send_vblank_event(struct drm_device *dev, int crtc,
909 struct drm_pending_vblank_event *e) 911 struct drm_pending_vblank_event *e)
@@ -923,6 +925,23 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc,
923EXPORT_SYMBOL(drm_send_vblank_event); 925EXPORT_SYMBOL(drm_send_vblank_event);
924 926
925/** 927/**
928 * drm_crtc_send_vblank_event - helper to send vblank event after pageflip
929 * @crtc: the source CRTC of the vblank event
930 * @e: the event to send
931 *
932 * Updates sequence # and timestamp on event, and sends it to userspace.
933 * Caller must hold event lock.
934 *
935 * This is the native KMS version of drm_send_vblank_event().
936 */
937void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
938 struct drm_pending_vblank_event *e)
939{
940 drm_send_vblank_event(crtc->dev, drm_crtc_index(crtc), e);
941}
942EXPORT_SYMBOL(drm_crtc_send_vblank_event);
943
944/**
926 * drm_vblank_enable - enable the vblank interrupt on a CRTC 945 * drm_vblank_enable - enable the vblank interrupt on a CRTC
927 * @dev: DRM device 946 * @dev: DRM device
928 * @crtc: CRTC in question 947 * @crtc: CRTC in question
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 8ba35c622e22..b78601bb7c46 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -905,6 +905,8 @@ extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
905 struct timeval *vblanktime); 905 struct timeval *vblanktime);
906extern void drm_send_vblank_event(struct drm_device *dev, int crtc, 906extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
907 struct drm_pending_vblank_event *e); 907 struct drm_pending_vblank_event *e);
908extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
909 struct drm_pending_vblank_event *e);
908extern bool drm_handle_vblank(struct drm_device *dev, int crtc); 910extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
909extern int drm_vblank_get(struct drm_device *dev, int crtc); 911extern int drm_vblank_get(struct drm_device *dev, int crtc);
910extern void drm_vblank_put(struct drm_device *dev, int crtc); 912extern void drm_vblank_put(struct drm_device *dev, int crtc);