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. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
4e0cd68115
commit
a4d7b30df5
2 changed files with 21 additions and 0 deletions
|
@ -904,6 +904,8 @@ static void send_vblank_event(struct drm_device *dev,
|
||||||
*
|
*
|
||||||
* Updates sequence # and timestamp on event, and sends it to userspace.
|
* Updates sequence # and timestamp on event, and sends it to userspace.
|
||||||
* Caller must hold event lock.
|
* Caller must hold event lock.
|
||||||
|
*
|
||||||
|
* This is the legacy version of drm_crtc_send_vblank_event().
|
||||||
*/
|
*/
|
||||||
void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
||||||
struct drm_pending_vblank_event *e)
|
struct drm_pending_vblank_event *e)
|
||||||
|
@ -922,6 +924,23 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_send_vblank_event);
|
EXPORT_SYMBOL(drm_send_vblank_event);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* drm_crtc_send_vblank_event - helper to send vblank event after pageflip
|
||||||
|
* @crtc: the source CRTC of the vblank event
|
||||||
|
* @e: the event to send
|
||||||
|
*
|
||||||
|
* Updates sequence # and timestamp on event, and sends it to userspace.
|
||||||
|
* Caller must hold event lock.
|
||||||
|
*
|
||||||
|
* This is the native KMS version of drm_send_vblank_event().
|
||||||
|
*/
|
||||||
|
void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
|
||||||
|
struct drm_pending_vblank_event *e)
|
||||||
|
{
|
||||||
|
drm_send_vblank_event(crtc->dev, drm_crtc_index(crtc), e);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(drm_crtc_send_vblank_event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* drm_vblank_enable - enable the vblank interrupt on a CRTC
|
* drm_vblank_enable - enable the vblank interrupt on a CRTC
|
||||||
* @dev: DRM device
|
* @dev: DRM device
|
||||||
|
|
|
@ -905,6 +905,8 @@ extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
|
||||||
struct timeval *vblanktime);
|
struct timeval *vblanktime);
|
||||||
extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
||||||
struct drm_pending_vblank_event *e);
|
struct drm_pending_vblank_event *e);
|
||||||
|
extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
|
||||||
|
struct drm_pending_vblank_event *e);
|
||||||
extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
|
extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
|
||||||
extern int drm_vblank_get(struct drm_device *dev, int crtc);
|
extern int drm_vblank_get(struct drm_device *dev, int crtc);
|
||||||
extern void drm_vblank_put(struct drm_device *dev, int crtc);
|
extern void drm_vblank_put(struct drm_device *dev, int crtc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue