History

drm/irq: Add drm_crtc_send_vblank_event()

This function is the KMS native variant of drm_send_vblank_event(). It takes a struct drm_crtc * instead of a struct drm_device * and an index of the CRTC. Eventually the goal is to access vblank data through the CRTC only so that the per-CRTC data can be moved to struct drm_crtc.

Thierry Reding committed 11 years ago

Commit a4d7b301 parent 4e0cd682 files · +21 −0Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/drm_irq.c +19 −0
  2. include/drm/drmP.h +2 −0
drivers/gpu/drm/drm_irq.c+19−0
@@ -904,6 +904,8 @@ static void send_vblank_event(struct drm_device *dev, · 903 unmodified lines
904904 *
905905 * Updates sequence # and timestamp on event, and sends it to userspace.
906906 * Caller must hold event lock.
907+ *
908+ * This is the legacy version of drm_crtc_send_vblank_event().
907909 */
908910 void drm_send_vblank_event(struct drm_device *dev, int crtc,
909911 struct drm_pending_vblank_event *e)
@@ -922,6 +924,23 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc, · 12 unmodified lines
922924 }
923925 EXPORT_SYMBOL(drm_send_vblank_event);
924926
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+ */
937+void 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+}
942+EXPORT_SYMBOL(drm_crtc_send_vblank_event);
943+
925944 /**
926945 * drm_vblank_enable - enable the vblank interrupt on a CRTC
927946 * @dev: DRM device
include/drm/drmP.h+2−0
@@ -905,6 +905,8 @@ extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc, · 904 unmodified lines
905905 struct timeval *vblanktime);
906906 extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
907907 struct drm_pending_vblank_event *e);
908+extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
909+ struct drm_pending_vblank_event *e);
908910 extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
909911 extern int drm_vblank_get(struct drm_device *dev, int crtc);
910912 extern void drm_vblank_put(struct drm_device *dev, int crtc);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t