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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DDE3C47082 for ; Tue, 5 Apr 2022 09:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343913AbiDEJPe (ORCPT ); Tue, 5 Apr 2022 05:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244281AbiDEIvz (ORCPT ); Tue, 5 Apr 2022 04:51:55 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA9E3D4C8B for ; Tue, 5 Apr 2022 01:40:41 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id g22so14044804edz.2 for ; Tue, 05 Apr 2022 01:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=QRQdW4TxY/XkOYOT3oxLG3OIsaxqVCqvMm2visUSAZI=; b=R5WyFM3Hb3GT2s4H08DzUIMQiUCuX9Lg5BSB6FtLOqpb9+K0R/+NXBIvm5gKP5c9J3 9uKEocy6gvBxFpFp3qCT0vApX1ZAxWoy2UjfBaiGsZGlxJO8MBrCopzDmKf7hLQSHfEx 1t/1TiVB/Zv+FY3jh4d8cFdSJTjj852yReO4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=QRQdW4TxY/XkOYOT3oxLG3OIsaxqVCqvMm2visUSAZI=; b=xneD3lNc85yYNBAjNAwLvj5sxhAuISrFwsx62bMlgq8bzJEAqwmxVI0HMkCaMrd6dK 9Ao6yuJMlXGE9IC7jL7j9UGDbvvTioCJ4f5rvmhs2LSmPcBCO2qafG8pdSwXnGEfeChS DniXyptrUhAVllLQOP1lyOSsvev+T9Ibkk09k+0MmSLgd1wWs+Fl/t3k3on61H8VmmCg OE30Oe/6R++b3asasnAmrHjvieXL2U9UC7km769d/isOaRvQzaDfjp3F5h3DMqDB5tCF UYuZ3U1ngdhWxKh++c0NsZTAJF2BYRzdjYJ1KTUOp8SuViMmiArg2/3JC3Pg4tluXgZc V6dA== X-Gm-Message-State: AOAM533CaGC8xNPn40x3xkA0CmWN1ZJXg49Fogi4JYv4kHSLPXLPr7Rb VeELsEWvZDRUmR6mPsc745YPVQ== X-Google-Smtp-Source: ABdhPJxdMNTJdlht0ASSjqOZpmGfUZPUZ3aVJQxSpEJt0tJUibhrkRySvqoqStIMLvI+YtZTojtm1Q== X-Received: by 2002:a05:6402:31e2:b0:41c:dd5e:3c61 with SMTP id dy2-20020a05640231e200b0041cdd5e3c61mr2342747edb.407.1649148039950; Tue, 05 Apr 2022 01:40:39 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id d7-20020a170906174700b006e80a7e3111sm568499eje.17.2022.04.05.01.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 01:40:39 -0700 (PDT) Date: Tue, 5 Apr 2022 10:40:37 +0200 From: Daniel Vetter To: Javier Martinez Canillas , DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, LKML , Thomas Zimmermann , Zack Rusin , Hans de Goede , Ilya Trukhanov , Daniel Vetter , Peter Jones Subject: Re: [PATCH v2 18/19] Revert "fbdev: Prevent probing generic drivers if a FB is already registered" Message-ID: Mail-Followup-To: Javier Martinez Canillas , DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, LKML , Thomas Zimmermann , Zack Rusin , Hans de Goede , Ilya Trukhanov , Daniel Vetter , Peter Jones References: <20220208210824.2238981-1-daniel.vetter@ffwll.ch> <20220208210824.2238981-19-daniel.vetter@ffwll.ch> <4ae20b63-f452-fdb4-ced6-d4968a8d69f0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Tue, Apr 05, 2022 at 10:36:35AM +0200, Daniel Vetter wrote: > On Wed, Feb 09, 2022 at 01:19:26AM +0100, Javier Martinez Canillas wrote: > > On 2/8/22 22:08, Daniel Vetter wrote: > > > This reverts commit fb561bf9abde49f7e00fdbf9ed2ccf2d86cac8ee. > > > > > > With > > > > > > commit 27599aacbaefcbf2af7b06b0029459bbf682000d > > > Author: Thomas Zimmermann > > > Date: Tue Jan 25 10:12:18 2022 +0100 > > > > > > fbdev: Hot-unplug firmware fb devices on forced removal > > > > > > this should be fixed properly and we can remove this somewhat hackish > > > check here (e.g. this won't catch drm drivers if fbdev emulation isn't > > > enabled). > > > > > > > Unfortunately this hack can't be reverted yet. Thomas' patch solves the issue > > of platform devices matched with fbdev drivers to be properly unregistered if > > a DRM driver attempts to remove all the conflicting framebuffers. > > > > But the problem that fb561bf9abde ("fbdev: Prevent probing generic drivers if > > a FB is already registered") worked around is different. It happens when the > > DRM driver is probed before the {efi,simple}fb and other fbdev drivers, the > > kicking out of conflicting framebuffers already happened and these drivers > > will be allowed to probe even when a DRM driver is already present. > > > > We need a clearer way to prevent it, but can't revert fb561bf9abde until that. > > Yeah that entire area is a mess still, ideally we'd have something else > creating the platform devices, and efifb/offb and all these would just > bind against them. > > Hm one idea that just crossed my mind: Could we have a flag in fb_info for > fw drivers, and check this in framebuffer_register? Then at least all the > logic would be in the fbdev core. Ok coffee just kicked in, how exactly does your scenario work? This code I'm reverting here is in the platform_dev->probe function. Thomas' patch removes the platform_dev. How exactly can you still probe against a platform dev if that platform dev is gone? Iow, now that I reponder your case after a few weeks I'm no longer sure things work like you claim. There is the issue that offb still bidns without a platform_dev, but that's not affected by this patch here. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch