* [PATCH] drm/vkms: WARN when hrtimer_forward_now fails
@ 2019-02-06 20:08 Shayenne Moura
2019-02-10 12:39 ` Rodrigo Siqueira
0 siblings, 1 reply; 2+ messages in thread
From: Shayenne Moura @ 2019-02-06 20:08 UTC (permalink / raw)
To: Rodrigo Siqueira, Haneen Mohammed, Daniel Vetter, David Airlie
Cc: dri-devel, linux-kernel
Make the variable have the same type of function hrtimer_forward_now
return.
Add a warn to verify the hrtimer_forward_now return.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com>
---
drivers/gpu/drm/vkms/vkms_crtc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vkms: WARN when hrtimer_forward_now fails
2019-02-06 20:08 [PATCH] drm/vkms: WARN when hrtimer_forward_now fails Shayenne Moura
@ 2019-02-10 12:39 ` Rodrigo Siqueira
0 siblings, 0 replies; 2+ messages in thread
From: Rodrigo Siqueira @ 2019-02-10 12:39 UTC (permalink / raw)
To: Shayenne Moura
Cc: Haneen Mohammed, Daniel Vetter, David Airlie, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]
On 02/06, Shayenne Moura wrote:
> Make the variable have the same type of function hrtimer_forward_now
> return.
Hi,
First of all, thanks for your patch.
Applied to the drm-misc-misc branch of drm-misc.git.
P.s.: I made a tiny change in the commit message.
Best Regards
> Add a warn to verify the hrtimer_forward_now return.
>
> Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com>
> ---
> drivers/gpu/drm/vkms/vkms_crtc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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;
> --
> 2.17.1
>
--
Rodrigo Siqueira
https://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-10 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 20:08 [PATCH] drm/vkms: WARN when hrtimer_forward_now fails Shayenne Moura
2019-02-10 12:39 ` Rodrigo Siqueira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.