Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3333341ybl; Mon, 20 Jan 2020 21:55:02 -0800 (PST) X-Google-Smtp-Source: APXvYqy3a3RpJRNE4ebU3FG5KMi7Z1lN3aBuHcxX01uOfBtfgdT9b80JFY2XVEWn+85QJi+GSgpN X-Received: by 2002:aca:43c1:: with SMTP id q184mr1727604oia.116.1579586102364; Mon, 20 Jan 2020 21:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579586102; cv=none; d=google.com; s=arc-20160816; b=G065dEUjNVnueMD/cW+kX694L/IGFV1WPD8gCchroEmrFthAByrMHhQsUkxouJ72XK ivcjsRhtR2AKkPXSmgW3eW7GtsOtEhEvAcLk3YgronrfghGXfuWq/ta0Vsfl19/6meq1 7nwRbpD2zUo5r2w5CmAvuE2IlWP/mhv/tCBVKjPKI11AhW4Kr4ywA1fTZv06EpYb9gY6 P5Pnija+Vy84cmU2b3k2DzPIKfQbwwBjSzSzbv4R2RPHsx6zI0lWzQymCjT/0dZ00NIM gdG4gDa7cCkuNGmMoGPyOtvbuAZaS8v1E60PFq5JH32ENrYOWVK2MJhVukaXBG9sgIBu 7Nvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sCaBPZeEJdT4Pf0kOk3x5es44UV2mktFJpDyLiBTSXo=; b=iHYmN1gE7H8Xp1OuiguVGjlfdR2FgY98vK3ZmmSvOJGuBZwaZoAIx6kNPy7veDExIh 5mA9lSbGe6KV09rDSvjcztXO/b0ss6pAjcHC+gRoDMkr31K/rcDFJ6EKFwFks36W50Hg 0kj4qWkoRhsT/448LCKC6/NtzhJi4aG/hJGBEL8VK/fAm7dr9i4JIbAqhAgJYaq8XNZK jKMeqiB9uYP6XjRZG6ge/m4T/MnxRgULXUUaCO10LmFer/cy1qrOh/YyE/YYjHHTgd4f jztb1tUrrEat93jZw7OZN36dy6Ld1Bghehv947zFQlNnhP9jLLE+swwjGfqg3p8cxoe0 24XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JYmCEef+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si13478379otk.91.2020.01.20.21.54.49; Mon, 20 Jan 2020 21:55:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JYmCEef+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727059AbgAUFx4 (ORCPT + 99 others); Tue, 21 Jan 2020 00:53:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41639 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725916AbgAUFx4 (ORCPT ); Tue, 21 Jan 2020 00:53:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579586034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sCaBPZeEJdT4Pf0kOk3x5es44UV2mktFJpDyLiBTSXo=; b=JYmCEef+kNXP7IrJozWPoNqlhx18YT2SXHeuDZFAt3iv9DmU+6Oz7ueRut+3R3eE5L9sxo jJ6rebiOfmb8ZW9ENrKC+LnLNlIT5xe3TlOAwK6+Fk/o0buwPT6or1g48Vmt2Jd8p0xTlg f6gBZZaruKd0vNIxDA2jX8KZu+iKzCg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-oRE6kHfxMxCgz2UXM4ClGQ-1; Tue, 21 Jan 2020 00:53:51 -0500 X-MC-Unique: oRE6kHfxMxCgz2UXM4ClGQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34ECA800A02; Tue, 21 Jan 2020 05:53:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-106.ams2.redhat.com [10.36.116.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2D718433B; Tue, 21 Jan 2020 05:53:49 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AFC6516E36; Tue, 21 Jan 2020 06:53:48 +0100 (CET) Date: Tue, 21 Jan 2020 06:53:48 +0100 From: Gerd Hoffmann To: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org, marmarek@invisiblethingslab.com, "open list:FRAMEBUFFER LAYER" , open list Subject: Re: [PATCH] fbdev: wait for references go away Message-ID: <20200121055348.s4anrveo2z6avin6@sirius.home.kraxel.org> References: <20200120100014.23488-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > open. Which can result in drm driver not being able to grab resources > > (and fail initialization) because the firmware framebuffer still holds > > them. Reportedly plymouth can trigger this. > > Could you please describe issue some more? > > I guess that a problem is happening during DRM driver load while fbdev > driver is loaded? I assume do_unregister_framebuffer() is called inside > do_remove_conflicting_framebuffers()? Yes. Specifically bochs-drm.ko and efifb in virtual machines. > At first glance it seems to be an user-space issue as it should not be > holding references on /dev/fb0 while DRM driver is being loaded. Well, the drm driver is loaded by udev like everything else. Dunno what plymouth (graphical boot screen tool) does to handle the situation. I guess listening to udev events. So it should notice efifb going away and drop the /dev/fb0 reference, but this races against bochs-drm initializing. > > Fix this by trying to wait until all references are gone. Don't wait > > forever though given that userspace might keep the file handle open. > > Where does the 1s maximum delay come from? Pulled out something out of thin air which I expect being on the safe side. plymouth responding on the udev event should need only a small fraction of that. cheers, Gerd