Use the vblank pointer instead of a dev, pipe pair to simplify code. Rename to drm_vblank_crtc_wait_reply().
v2: Rename (Thomas) Reviewed-by: Thomas Zimmermann <[email protected]> Signed-off-by: Jani Nikula <[email protected]> --- drivers/gpu/drm/drm_vblank.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 6be354415529..233c60860c78 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -1705,18 +1705,18 @@ static u64 widen_32_to_64(u32 narrow, u64 near) return near + (s32) (narrow - near); } -static void drm_wait_vblank_reply(struct drm_device *dev, unsigned int pipe, - struct drm_wait_vblank_reply *reply) +static void drm_vblank_crtc_wait_reply(struct drm_vblank_crtc *vblank, + struct drm_wait_vblank_reply *reply) { ktime_t now; struct timespec64 ts; /* - * drm_wait_vblank_reply is a UAPI structure that uses 'long' + * drm_vblank_crtc_wait_reply is a UAPI structure that uses 'long' * to store the seconds. This is safe as we always use monotonic * timestamps since linux-4.15. */ - reply->sequence = drm_vblank_count_and_time(dev, pipe, &now); + reply->sequence = drm_vblank_count_and_time(vblank->dev, vblank->pipe, &now); ts = ktime_to_timespec64(now); reply->tval_sec = (u32)ts.tv_sec; reply->tval_usec = ts.tv_nsec / 1000; @@ -1788,7 +1788,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data, if (vblank->config.disable_immediate && drm_wait_vblank_is_query(vblwait) && READ_ONCE(vblank->enabled)) { - drm_wait_vblank_reply(dev, pipe, &vblwait->reply); + drm_vblank_crtc_wait_reply(vblank, &vblwait->reply); return 0; } @@ -1855,7 +1855,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data, } if (ret != -EINTR) { - drm_wait_vblank_reply(dev, pipe, &vblwait->reply); + drm_vblank_crtc_wait_reply(vblank, &vblwait->reply); drm_dbg_core(dev, "crtc %d returning %u to client\n", pipe, vblwait->reply.sequence); -- 2.47.3
