Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3145776ybh; Sat, 25 Jul 2020 12:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+cyYJFGBD7BHVy6F9CDsIilZfTiHHj7f7koO8fckUwdsjBTaMMpOWze6EAsNPArrseCzu X-Received: by 2002:aa7:d04e:: with SMTP id n14mr15018126edo.161.1595705428973; Sat, 25 Jul 2020 12:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595705428; cv=none; d=google.com; s=arc-20160816; b=gRUlFio2EsAQWWYGr56KCwVzlP/dEIy5C2mjYSsz6YJbSKvEN4abfupMrcICce1zLA GI3TKBtf5Vg4fF9XNmKnyKY5n0T7I/WYgYjVGGBH5KvQkgQ0cg8PCvoJWhhJLjcFgDV+ qZ9vufMfCMAFayiTG7F1FWujZTLSoW5EVSJtW/+n9Ti3EJLmZN4FHyhCYiWyGvC6GzW9 gQpIG4v4oFmxouiwVidc8btp+rlB96Gr/+MKv5Xf/z5A4eSxsjR+P2EM7FSbl/aOBRPt OHOYF87sOSytMqbD56fvaWW5zdfZRxdKDEvEjIRvEzqxI1g5yTff+0HyqjamHRAf6Ytj GQnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QRn/o7p7Dr6ct7GVq8d3H/58B25NpUh0o8HDRDgbelU=; b=IG6vvIFzm3oGew6paab4qIbr8larTBrvODl1fI+xYH+DBNBoXS9bK4pycqPurKUloD vfyWjKxb3IgqS9c6YSgUOgjGLXmIsd4OpF4v0oF/yzRmdRcrv/8yXNboDo5klWe63pB/ mlxDG2GMjFmQnSGlcn1y2Ct24wepJR4vfNqD2ga4vbGaiHaf4Mp7MmB9TF9DoGZlSqJH mNhcIvyb5WoP5vqBNXki9nn23dcGLLc0oYgiF3YjP13D5qj97cWQ1EbYFM358IUPJ/C+ 4cTz+tVfQy/ElEjhjgq8uzauXDuG/R8G9VvvorFiFqn1+7UcG5z45/CefuiW3k6GaXZ0 iNxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rPFIK4uz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si2985926edk.332.2020.07.25.12.30.06; Sat, 25 Jul 2020 12:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rPFIK4uz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727904AbgGYT3u (ORCPT + 99 others); Sat, 25 Jul 2020 15:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgGYT3t (ORCPT ); Sat, 25 Jul 2020 15:29:49 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9BBC08C5C0 for ; Sat, 25 Jul 2020 12:29:48 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id q4so13288467lji.2 for ; Sat, 25 Jul 2020 12:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QRn/o7p7Dr6ct7GVq8d3H/58B25NpUh0o8HDRDgbelU=; b=rPFIK4uzBFnqaegkZ+ahCYgrdrkZNiv3wYqRuQzpEKS3OiuC5VNfZMggQTw7ZE6ITP zJK6sTJfQD9XiBbsvXpCHALUrBKqPEP3n7UQVwTqnAajLsH7kt56nylrgTBQEx7EKG+U O7SZ5oR4GHNUj+mEwpYPD6k5y3deSn868L4pXgBsrb4bIXK5uAT/WRTfGjHrlGYUytdL sgQa+8AeGJU633TIgtzEjONDWz+ho+glG3ug/FvX7xowRGKrfjg1/l1HHkyU3N7RS/Zu /e1p/NdzwV3hYL2PwRn3HDYlZA/fTrW3lWcLxGHiWr9PgKzHgHj2ED/R5BrqH00ovfuF 8yqA== 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=QRn/o7p7Dr6ct7GVq8d3H/58B25NpUh0o8HDRDgbelU=; b=LXSmkHf8JayQKFOyEEJA2ls8YgHJCvT1co4y0h4sRLSRJU+lQpMjhUVL3J+PKDiEal 1F4EAyok5ObugqsYzYtGPbQSMKICbvHf28BtEu2G00LlJn/hmL+cQMEtH0+9l8sVYqtx 0dEPlpnxwV7g6XAsqF4K29uRP8OCbCahqXsFqWqwfssSoYaayjFnYUgVowCoL0IhDMef BDpDWO+qCGmErAm/a0j3lvpTZHHyi02wEw8ZQq/tTmdRvXJoKePm20IlDlgUZMSEl/W8 pu/8WNYOil45o+NKHk1qGgG7ISsL66FhB06x91NkoJKktvS2lzQ3bchxnjBvW/CsIYDu OLhg== X-Gm-Message-State: AOAM531+YQ8Q8+o1tmAaLHKt7QrMAsm0xZAkM/TRWh23CfQGUS+wBpFP hrRzd+RxZZGZL2uZ8i1okdix3WKJrksI0Bp3mwk= X-Received: by 2002:a2e:8858:: with SMTP id z24mr6885159ljj.425.1595705386442; Sat, 25 Jul 2020 12:29:46 -0700 (PDT) MIME-Version: 1.0 References: <20200722110411.ebkv6knvc6mzw5uf@smtp.gmail.com> <20200722120502.GK6419@phenom.ffwll.local> <20200722140604.27dfzfnzug5vb75r@smtp.gmail.com> <20200725011737.GA2851@realwakka> <20200725174514.esh4gqek6oddizvh@smtp.gmail.com> <20200725184918.togb54bxuifrq77c@smtp.gmail.com> In-Reply-To: From: Melissa Wen Date: Sat, 25 Jul 2020 16:29:35 -0300 Message-ID: Subject: Re: [PATCH] drm/vkms: add missing drm_crtc_vblank_put to the get/put pair on flush To: Daniel Vetter Cc: Sidong Yang , Haneen Mohammed , Rodrigo Siqueira , David Airlie , Rodrigo Siqueira , Linux Kernel Mailing List , dri-devel , kernel-usp@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 25, 2020 at 4:19 PM Melissa Wen wrote: > > > No, this very first warning continues (only once) :( > > From here (drm_crtc_vblank_on): > > if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) > > drm_WARN_ON(dev, drm_vblank_enable(dev, pipe)); > > Sorry, not sure when this warning is triggered. Again, I just had to look at the trace: [ 52.299388] drm_get_last_vbltimestamp+0xaa/0xc0 [drm] [ 52.299389] drm_reset_vblank_timestamp+0x5b/0xd0 [drm] [ 52.299389] drm_crtc_vblank_on.cold+0x37/0x103 [drm] [ 52.299390] drm_atomic_helper_commit_modeset_enable > > > > > > But I'm still wondering why after step 3 we don't get -EINVAL from > > > vblank_get() - after vblank_off() vblank->enabled should be false > > > again, getting us back to the same state as after 1. Is that not > > > happening? > > > > Yes (sorry if it got confused), we got -EINVAL after setp 3: > > > > In step 3, at the end of the 2nd running, we have: > > atomic_disable > > --> vblank_off [!vblank->inmodeset + refcount going 0->1 + inmodeset=1] > > and then in next vblank_get: -EINVAL (!vblank->enabled + refcount ends 1) > > as in the first step. > > > > Melissa > > > > > -Daniel > > > > > > > > > > > > > > > > > > > Thanks > > > > > > -Sidong > > > > > > > > > > > > > > > > > > > > > > > > > crtc->state->event = NULL; > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > 2.27.0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Daniel Vetter > > > > > > > > > Software Engineer, Intel Corporation > > > > > > > > > http://blog.ffwll.ch > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Daniel Vetter > > > > > > > Software Engineer, Intel Corporation > > > > > > > http://blog.ffwll.ch > > > > > > > _______________________________________________ > > > > > > > dri-devel mailing list > > > > > > > dri-devel@lists.freedesktop.org > > > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > > > > > > > > > > > > > > > > > -- > > > > > Daniel Vetter > > > > > Software Engineer, Intel Corporation > > > > > http://blog.ffwll.ch > > > > > > > > > > > > -- > > > Daniel Vetter > > > Software Engineer, Intel Corporation > > > http://blog.ffwll.ch