From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 935E1C433DF for ; Tue, 26 May 2020 11:11:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11E56207CB for ; Tue, 26 May 2020 11:11:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="c9pkWViL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E56207CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AFCA6E0A5; Tue, 26 May 2020 11:11:42 +0000 (UTC) Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id B39BD6E0A5 for ; Tue, 26 May 2020 11:11:40 +0000 (UTC) Received: by mail-ot1-x344.google.com with SMTP id 63so15921855oto.8 for ; Tue, 26 May 2020 04:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=394Bf9X0WsU7A//fmBDxQFFiRJv2ha61N4iIBFrJO/0=; b=c9pkWViLO33xidO0cqc158y5vqWnE5R6VY+0QE60qB2QXcuUYBn5BR/UHrONYYM6Gi /BGcD538X566UTT9o/9HCCsWKhERUNIVoA3h0LddKKUiWCVtoYIImU+F9YPlMJjwMGks w1HNv3rcQjhOyCZUkPf88BehwJ0kHERAvSKfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=394Bf9X0WsU7A//fmBDxQFFiRJv2ha61N4iIBFrJO/0=; b=G8b5Hqeji9kr2yZXaFMRSVo5o1ogs3YTm+WKa4xnldycNOpBilOshtN9d5ql/hktNV 722uFot2Ch3euLQyIGckHpv7B4OZnmrGYnHgu8mO6wy/KT+ao+YAbyg2jOLh9+S4XILT 1crvwWJkUnt2RRHWFjkH1/VFORQQAa55Q95gJijzy8DiBa1RLOPCcDsOGS0Eq9jZIxrR KdcL1Ve7sv1CKkGRZZVU24xE2AJRtlvx2R8kidJ+pwx8+ENRqJ3UnMs8J9DRhugjUE5U qKg3iotp89ysgnpphOlOiHN0l+MWKoneUx5Umq+hq3jPemVKy4y2eXNvHou0Hj7qjfNy 2qsQ== X-Gm-Message-State: AOAM530JeO5mmou5SFHB7Ucz7u7rb/UJWcPFpIwJKo5xXkrL6kJWSMPa LtqqvQKaQuvW+HW9sV9WuMj+db1auLjk0yrkhCpjEw== X-Google-Smtp-Source: ABdhPJx6juiKqCYAnegUSL5lgjjrlIikoHz+uLpLNd+JrDTpouaYH8r6UY/XCx2QN+k5uMD/t0sBoO/cWIUlwFwM1Do= X-Received: by 2002:a9d:600e:: with SMTP id h14mr442412otj.281.1590491499870; Tue, 26 May 2020 04:11:39 -0700 (PDT) MIME-Version: 1.0 References: <20200525143849.4964-1-penguin-kernel@I-love.SAKURA.ne.jp> <20200525152119.GL206103@phenom.ffwll.local> <579a707b-8bfd-66d1-a1c5-f7883e82969e@i-love.sakura.ne.jp> In-Reply-To: From: Daniel Vetter Date: Tue, 26 May 2020 13:11:28 +0200 Message-ID: Subject: Re: [PATCH] drm/vkms: Don't warn hrtimer_forward_now failure. To: Tetsuo Handa X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shayenne Moura , Rodrigo Siqueira , DRI , syzbot+0871b14ca2e2fb64f6e3@syzkaller.appspotmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, May 26, 2020 at 6:39 AM Tetsuo Handa 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