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=-3.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 7E2ADC433DF for ; Sat, 25 Jul 2020 19:29:50 +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 4604F20674 for ; Sat, 25 Jul 2020 19:29:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rPFIK4uz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4604F20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 9ABF56E16B; Sat, 25 Jul 2020 19:29:49 +0000 (UTC) Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B7636E16B for ; Sat, 25 Jul 2020 19:29:48 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id q6so13255744ljp.4 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=mYpkHqZput8iHnKTv+H08KSbNtj/4558zA/BuTYJ756F/BKsygU220z2Jr5ynnI958 YlwvSvJHqA2RJdNf2dWaTPA9qgsPL2olKWhvy1tMt0CcTdnxsEAOS8XTX2BNjFCGUcEO NyC8LK5CkHHTPC849WJ2GBHUabPKVQj8/f/hWpvTTbsgd5DiAKuZBIz2j0kXW26ZnazT B4pxYiJ/z+IPsvCZUNQKjNuTWcTO+AI3lNN5XwbQy5Z5+Yli/2MsahSxaxRUBSxCu3oC vQsnfCpyVS0QiNtDQnKIzYsJvZgNn6WxT8g6CTS4xuXGbfXzh+yy664muGYH45jx5Yte Wx0A== X-Gm-Message-State: AOAM5301HNbWDB4DWWXe6hD3zVsIMGuzyZgCBHgmAOoPNEzzIDP1VZMY 5/DuGl7Y6jzbQ1t6upt4ZixdnSaYCMCTVU/BvTQ= X-Google-Smtp-Source: ABdhPJy4nIkdNHCtvK1N9MfD51qsqqFMMgFVTsb9MPToJUX4nGtOLa7aZokCkKC+sUqPYXpTnCK4esEz99fi8gSqe0M= 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 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: Haneen Mohammed , Rodrigo Siqueira , David Airlie , Rodrigo Siqueira , Linux Kernel Mailing List , dri-devel , kernel-usp@googlegroups.com, Sidong Yang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel