History

drm/irq: Add drm_crtc_handle_vblank()

This function is the KMS native variant of drm_handle_vblank(). 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 115ebcd1 parent a4d7b302 files · +21 −0Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/drm_irq.c +20 −0
  2. include/drm/drmP.h +1 −0
drivers/gpu/drm/drm_irq.c+20−0
@@ -1613,6 +1613,8 @@ static void drm_handle_vblank_events(struct drm_device *dev, int crtc) · 1612 unmodified lines
16131613 *
16141614 * Drivers should call this routine in their vblank interrupt handlers to
16151615 * update the vblank counter and send any signals that may be pending.
1616+ *
1617+ * This is the legacy version of drm_crtc_handle_vblank().
16161618 */
16171619 bool drm_handle_vblank(struct drm_device *dev, int crtc)
16181620 {
@@ -1689,3 +1691,21 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc) · 70 unmodified lines
16891691 return true;
16901692 }
16911693 EXPORT_SYMBOL(drm_handle_vblank);
1694+
1695+/**
1696+ * drm_crtc_handle_vblank - handle a vblank event
1697+ * @crtc: where this event occurred
1698+ *
1699+ * Drivers should call this routine in their vblank interrupt handlers to
1700+ * update the vblank counter and send any signals that may be pending.
1701+ *
1702+ * This is the native KMS version of drm_handle_vblank().
1703+ *
1704+ * Returns:
1705+ * True if the event was successfully handled, false on failure.
1706+ */
1707+bool drm_crtc_handle_vblank(struct drm_crtc *crtc)
1708+{
1709+ return drm_handle_vblank(crtc->dev, drm_crtc_index(crtc));
1710+}
1711+EXPORT_SYMBOL(drm_crtc_handle_vblank);
include/drm/drmP.h+1−0
@@ -908,6 +908,7 @@ extern void drm_send_vblank_event(struct drm_device *dev, int crtc, · 907 unmodified lines
908908 extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
909909 struct drm_pending_vblank_event *e);
910910 extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
911+extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc);
911912 extern int drm_vblank_get(struct drm_device *dev, int crtc);
912913 extern void drm_vblank_put(struct drm_device *dev, int crtc);
913914 extern int drm_crtc_vblank_get(struct drm_crtc *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