Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3141965ybh; Sat, 25 Jul 2020 12:21:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLnN19E+okIUTOZNPMdrBxxPzSz4VEHKoD6v31Uma1hoX2io2qgZJ/sOzUsfQtdhDydmdj X-Received: by 2002:a05:6402:1716:: with SMTP id y22mr7393415edu.301.1595704884998; Sat, 25 Jul 2020 12:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595704884; cv=none; d=google.com; s=arc-20160816; b=bcwNd+BoUzE4PTUE/n45AMPXWKPa6DbDsjBniZau9W6Cct4TzZicTkJnLX2chmt96f AVdER3+Yv/sWfDA9hnXj73aY8Qhr0MiTKFDJ4DyzqSoeEtC3CEs/UTWHsHPteFB0zITp Huggn3JOSgBenNJkSHCAHZvdD8YDvk3pR1CQSCwGKH/kypGOMePQqx6ef1WlV1YDaN5u 15FYLt5jzBvLUbj2Calst8m5e6ZmkhORrQvF62Rk18qu77qd6dqqbPIzEy2zCNP5SJnk oHMXPUOI6L7BDHy2bQLT4jXTn9LqHtXf578yw0gh2ve7KgXaFjlWfr44TEuXctWmLTW2 POPw== 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=g4J6dkRqHFKiKhjcRC8q/JmeC/kbD2LNmS8StOCmtOU=; b=NzStBXZ/QIxtqniNOMadaKxMI1usE22dHycwn6R5i67eKqN0jqetWU1+fiQ48HRvMM RzGyna/qRbFe3QSov11aZZoPdKVVTEOUD4y8U1MM2qdv9SlRMfvp4iXrN3uqW8oaqzQs g0XB4Z+r8V5o2IddEvlCwx97swxsrZS8JyeBnVa00OYHPdXcUgIY125rdeQuQIWCRAk1 xMOziZXHLING9sz5zH1Acq8pjtD8W7LlhczPz64m2Xsm0rL2raL2k2mOsPh6lxP5robi ltVH7qfP2zwKh3wH7Tx3Hxkey2M211BqU/3G6v7I6lQIHmmrHnPZUlFGihpu2NYcw3MS H7Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mvXHuh6j; 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 x2si3139676ejy.84.2020.07.25.12.21.01; Sat, 25 Jul 2020 12:21:24 -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=mvXHuh6j; 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 S1727869AbgGYTUA (ORCPT + 99 others); Sat, 25 Jul 2020 15:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgGYTT7 (ORCPT ); Sat, 25 Jul 2020 15:19:59 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40FBEC08C5C0 for ; Sat, 25 Jul 2020 12:19:59 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id d17so13245172ljl.3 for ; Sat, 25 Jul 2020 12:19:59 -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=g4J6dkRqHFKiKhjcRC8q/JmeC/kbD2LNmS8StOCmtOU=; b=mvXHuh6jpM3ry5QoR34JW1d8FG1E/6i19D+6eHevdB/BJD97IyC8wD2xC+bM8l5Ujc 48KF5bxobuUlIlCULXPavhfxF3h1KYr8QgsIyILVedJSXIv54uInP6GcUT1iXSG+ayYu EUD7recqFSD++W9kn404rRgoXuFpxT5nBnjmX6YS6TX57Bn99MxgL9v8Ty2mxycVSlz9 lFPJy/ecKwv3YkQic14JYKpV3fDDMlwGCrzbXwY0ocmBn8/Wkw7sQcmAuR6xMs5JLrnE TvooKIp0/sJ+Z9iwMaWOvHuMMjRAhrsvnR6k1debndHhInU3NvFu9JxZ3LxaPSPWVaS3 e1Qg== 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=g4J6dkRqHFKiKhjcRC8q/JmeC/kbD2LNmS8StOCmtOU=; b=jWKF1yuH9FO3Rxl/YYOsrv3FCF9C9dsI8Qw9PZpOegJN8EKjSSwcbZK5GeoLPiK7ZA WI7YyRhIJEcy1Q25jnto777/+B7VC6CSVDQGVbzPKgsH+y9uWixfUoLvC4qo4DjUteIF N6CrjnJ3mHHvfd0uob0BlGli1SmL3Y8HzU6pqISisetqqgGki7D5kxAIuWbYUH1v4+4F YlkhI8FLeOYmmpBRQrv8SJWEJ+X0UZHa+60yUaXBFeh78DDQpI+anoMov4IDIjVtGPJ4 Umeru5My6EERtZtuaTQckKryOOSCGw0GtylPtoHAghF356YreND39CN4WiM5/M9sVM4N k5VQ== X-Gm-Message-State: AOAM531dDVTdVunRZMa6WY/u1WZmL7OeXzjkm4026Hn/t4cFyfKbnI/v i3Tfec1OHJvRLvDZCX9PYmukqqlrjTKObMDJW25TtQ== X-Received: by 2002:a2e:9d0b:: with SMTP id t11mr589477lji.365.1595704797729; Sat, 25 Jul 2020 12:19:57 -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: <20200725184918.togb54bxuifrq77c@smtp.gmail.com> From: Melissa Wen Date: Sat, 25 Jul 2020 16:19:46 -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 > 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. > > > 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