All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Shayenne Moura <shayenneluzmoura@gmail.com>,
	Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>,
	DRI <dri-devel@lists.freedesktop.org>,
	syzbot+0871b14ca2e2fb64f6e3@syzkaller.appspotmail.com
Subject: Re: [PATCH] drm/vkms: Don't warn hrtimer_forward_now failure.
Date: Tue, 26 May 2020 13:11:28 +0200	[thread overview]
Message-ID: <CAKMK7uFZGMuyAehjezQSaUaddn-fmqqiFR6WNX5r4Lir7TfCig@mail.gmail.com> (raw)
In-Reply-To: <eeec9373-207c-67f4-8355-edcf5643b800@i-love.sakura.ne.jp>

On Tue, May 26, 2020 at 6:39 AM Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
>
> On 2020/05/26 13:18, Tetsuo Handa wrote:
> > due to mode->crtc_clock <= 0. Thus, somehow initializing mode->crtc_clock > 0 might be able
> > to solve this problem.
>
> Well, I came to think that vkms_enable_vblank() should return an error to the caller
> when drm_calc_timestamping_constants() failed...

If my memory is right we shouldn't even get there. crtc->mode being
all zeros sounds like the simulated output isn't on (no surprise,
syzbot doesn't enable it and fbcon is probably on card0), so something
higher up should reject this. I'll see whether I can figure out what
vkms isn't doing right (or whether there's a higher level bug in
drm_vblank.c code), yesterday my machine died and already evening
anyway.

Thanks for digging into this a bit more meanwhile.

Cheers, Daniel

>
> static int vkms_enable_vblank(struct drm_crtc *crtc)
> {
>         struct drm_device *dev = crtc->dev;
>         unsigned int pipe = drm_crtc_index(crtc);
>         struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
>         struct vkms_output *out = drm_crtc_to_vkms_output(crtc);
>
>         drm_calc_timestamping_constants(crtc, &crtc->mode);
>
>         hrtimer_init(&out->vblank_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
>         out->vblank_hrtimer.function = &vkms_vblank_simulate;
>         out->period_ns = ktime_set(0, vblank->framedur_ns);
>         hrtimer_start(&out->vblank_hrtimer, out->period_ns, HRTIMER_MODE_REL);
>
>         return 0;
> }



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-05-26 11:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 14:38 [PATCH] drm/vkms: Don't warn hrtimer_forward_now failure Tetsuo Handa
2020-05-25 15:21 ` Daniel Vetter
2020-05-25 15:34   ` Tetsuo Handa
2020-05-25 16:57     ` Daniel Vetter
2020-05-25 17:00     ` Daniel Vetter
2020-05-26  4:18       ` Tetsuo Handa
2020-05-26  4:39         ` Tetsuo Handa
2020-05-26 11:11           ` Daniel Vetter [this message]
2020-05-27  8:27             ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKMK7uFZGMuyAehjezQSaUaddn-fmqqiFR6WNX5r4Lir7TfCig@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=shayenneluzmoura@gmail.com \
    --cc=syzbot+0871b14ca2e2fb64f6e3@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.