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
1613 *1613 *
1614 * Drivers should call this routine in their vblank interrupt handlers to1614 * Drivers should call this routine in their vblank interrupt handlers to
1615 * update the vblank counter and send any signals that may be pending.1615 * update the vblank counter and send any signals that may be pending.
1616 *
1617 * This is the legacy version of drm_crtc_handle_vblank().
1616 */1618 */
1617bool drm_handle_vblank(struct drm_device *dev, int crtc)1619bool drm_handle_vblank(struct drm_device *dev, int crtc)
1618{1620{
@@ -1689,3 +1691,21 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc) · 70 unmodified lines
1689 return true;1691 return true;
1690}1692}
1691EXPORT_SYMBOL(drm_handle_vblank);1693EXPORT_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 */
1707bool drm_crtc_handle_vblank(struct drm_crtc *crtc)
1708{
1709 return drm_handle_vblank(crtc->dev, drm_crtc_index(crtc));
1710}
1711EXPORT_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
908extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,908extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
909 struct drm_pending_vblank_event *e);909 struct drm_pending_vblank_event *e);
910extern bool drm_handle_vblank(struct drm_device *dev, int crtc);910extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
911extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc);
911extern int drm_vblank_get(struct drm_device *dev, int crtc);912extern int drm_vblank_get(struct drm_device *dev, int crtc);
912extern void drm_vblank_put(struct drm_device *dev, int crtc);913extern void drm_vblank_put(struct drm_device *dev, int crtc);
913extern int drm_crtc_vblank_get(struct drm_crtc *crtc);914extern 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