Use the vblank pointer instead of a dev, pipe pair to simplify code.
Signed-off-by: Jani Nikula <[email protected]>
---
drivers/gpu/drm/drm_vblank.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 5880c43e19a0..e33b7fa6f19a 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1702,7 +1702,7 @@ 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,
+static void drm_wait_vblank_reply(struct drm_vblank_crtc *vblank,
struct drm_wait_vblank_reply *reply)
{
ktime_t now;
@@ -1713,7 +1713,7 @@ static void drm_wait_vblank_reply(struct drm_device *dev,
unsigned int pipe,
* 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;
@@ -1785,7 +1785,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_wait_vblank_reply(vblank, &vblwait->reply);
return 0;
}
@@ -1852,7 +1852,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void
*data,
}
if (ret != -EINTR) {
- drm_wait_vblank_reply(dev, pipe, &vblwait->reply);
+ drm_wait_vblank_reply(vblank, &vblwait->reply);
drm_dbg_core(dev, "crtc %d returning %u to client\n",
pipe, vblwait->reply.sequence);
--
2.47.3