Use the vblank pointer instead of a dev, pipe pair to simplify code. Rename to drm_vblank_crtc_queue_event().
v2: Rename (Thomas) Reviewed-by: Thomas Zimmermann <[email protected]> Signed-off-by: Jani Nikula <[email protected]> --- drivers/gpu/drm/drm_vblank.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index d0460cd5d345..6be354415529 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -1599,12 +1599,13 @@ void drm_crtc_vblank_restore(struct drm_crtc *crtc) } EXPORT_SYMBOL(drm_crtc_vblank_restore); -static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe, - u64 req_seq, - union drm_wait_vblank *vblwait, - struct drm_file *file_priv) +static int drm_vblank_crtc_queue_event(struct drm_vblank_crtc *vblank, + u64 req_seq, + union drm_wait_vblank *vblwait, + struct drm_file *file_priv) { - struct drm_vblank_crtc *vblank = drm_vblank_crtc(dev, pipe); + struct drm_device *dev = vblank->dev; + unsigned int pipe = vblank->pipe; struct drm_pending_vblank_event *e; ktime_t now; u64 seq; @@ -1825,7 +1826,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data, /* must hold on to the vblank ref until the event fires * drm_vblank_crtc_put will be called asynchronously */ - return drm_queue_vblank_event(dev, pipe, req_seq, vblwait, file_priv); + return drm_vblank_crtc_queue_event(vblank, req_seq, vblwait, file_priv); } if (req_seq != seq) { -- 2.47.3
