diff options
author | Shayenne Moura <shayenneluzmoura@gmail.com> | 2019-02-06 18:08:13 -0200 |
---|---|---|
committer | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2019-02-10 09:51:11 -0200 |
commit | 09ef09b4ab95dc405ad4171ec2cd8a4ff5227108 (patch) | |
tree | 3d6502b960ba15a57fcb5a5f525d4c65068732e1 | |
parent | 05bad2357afcb9f89804f04f0ae5ac58ae898ec5 (diff) |
drm/vkms: WARN when hrtimer_forward_now fails
Add a warn to verify the hrtimer_forward_now return and changes
ret_overrun from int to u64 to match the return value provided by
hrtimer_forward_now.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190206200813.d5w7gjpepoeeadiy@smtp.gmail.com
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_crtc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 5a095610726b..734a3e197df8 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -16,7 +16,7 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) vblank_hrtimer); struct drm_crtc *crtc = &output->crtc; struct vkms_crtc_state *state = to_vkms_crtc_state(crtc->state); - int ret_overrun; + u64 ret_overrun; bool ret; spin_lock(&output->lock); @@ -43,6 +43,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, output->period_ns); + WARN_ON(ret_overrun != 1); + spin_unlock(&output->lock); return HRTIMER_RESTART; |