Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp457285lqh; Tue, 7 May 2024 04:45:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVthSX0vs1rKDhm5q4pmEfnPZ2D73HgvBZaP83MB/Abafo7AHyxQENFKcW+dSxbvjFYL+mEZTTZ6eCVWvSeBpBIAXneCgT9FZPLJvb25A== X-Google-Smtp-Source: AGHT+IHQcAg3ybm/Tp6M92o/Hf9QEMGSdFaz3qLF96ZydG6EvgFHR68QQXt76V9qFsAx8e8rVoXD X-Received: by 2002:a05:6902:2302:b0:de5:5ba5:4e5f with SMTP id do2-20020a056902230200b00de55ba54e5fmr18350293ybb.51.1715082304948; Tue, 07 May 2024 04:45:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715082304; cv=pass; d=google.com; s=arc-20160816; b=xBuirqKCtyuwq9jMb8JwngU5ep5gbEhecv+6nmJllkk9vFSRyiky44kMyRElCTS++U xCH+3J9fJlTafVmN7J5y9M39IzegypMKQvJ6X3bd9pTHspIGN3Fxtu/gJmrnzi9u3mBZ +cuFCtIm8tvCkRZbMR8OVi0E6V943etIocPEwxhGI+PkkCi5uIr2pQ0ji5jIqg/aVg3Q PHOKvKB+oaSjtAMMpJHV9GfKDo4k9Si1C9xBf3uteMuvpmJ71ALCiFHn1LgrpusdDilA idoUMFa/pLcO3Vy6CIonfOTNJ5SwMCgB5XSc6LvlBBr/HlCHirF24k8TVmwOhVtGiXGS omlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=ecSzO7AiwnigNqU/smd06vR9/fdGnYG1J6IeAomF44c=; fh=dH8d1dHCdl7+XCuSqfLmGQi4OnDp/aut88YZBW+typM=; b=BuJFziujj70PiDbrLL8gl2RZC14cC4o+VmcIGPg/vZQh4O+zUDJXVA6sLy2XSKL8lo hKPOFhr4WpvGl8IlgqpJEXHi304BskM14VilPTW4wMick1jUSzr7KG1RI4wpuqqUTfpv 1OQoGq5yWTJIjPLKbUlIvX7gkBHJMCJlmN7MER9DavqqraK85iXihPJ63c6NZN+994QZ 865jm4pxUjqNEOB8K4UjNIA/J1dZaJTP7UwKWitZYv3GNP9fHhBHGCuKSpaWmdZTiROw lbxsanpOYe1R2FSmaKwevxgVT+87lgk1Jx049fkNG6sTWGgFFByFWRXlaUNkt099AwjT 4zHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=l25KanTb; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CvmzHek6; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-171217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171217-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h13-20020ac8584d000000b0043c5cc60900si11690346qth.317.2024.05.07.04.45.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 04:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=l25KanTb; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CvmzHek6; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-171217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171217-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 58CB71C21CED for ; Tue, 7 May 2024 11:45:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FC741553A5; Tue, 7 May 2024 11:44:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="l25KanTb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="CvmzHek6" Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C421015252F; Tue, 7 May 2024 11:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715082295; cv=none; b=QixejoTgCCiv6H7aKiPF9PItUSCVzGTEdUmvQfnqhrdiCCEGq4zcgGn5xTfwJf4ZwvZ9frkgd3oBGTA/wZU6tYeUG479jYawZ92lDORiqYflPxBYFzuc5R2BJ9jH9H+k3ZGmbvzoQA+GHnli6O0AcTnUEchcF+PuSRSs9e3XrtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715082295; c=relaxed/simple; bh=5l9Z1Urm/BZzymLPMlD2GWT3dGvV7j51ig+v/GSYq6w=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=a+95Pzi8BR0MNFVjMnMxvl05Nf25CTilgnjycV8pGegwJZr7pCPjPZt14zqGf8cU/AYyS4LGMpFlm+GfMqZFtM3HnXQMOV/kNpuU+miH6RPBPS12B3NwUefsF8leh16wJxYH8ZP8aeaGbbepndU/tQ0a6n6pmhws/psfIPqk/DQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=l25KanTb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=CvmzHek6; arc=none smtp.client-ip=64.147.123.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id 3F9F31C00142; Tue, 7 May 2024 07:44:50 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 07 May 2024 07:44:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1715082289; x=1715168689; bh=ecSzO7Aiwn igNqU/smd06vR9/fdGnYG1J6IeAomF44c=; b=l25KanTbH8tO7kcr9GFjrecLwg Z38jY6q5DqfCawwG5fjpy8zcT/YNv1FhdSFBn+VSbhay0UEAYYF+9+MIHVx+3f9C 4h6XRq0bAZmviePUd5dJP1sVV9/dygg3z5csVujvGnhCQTNlM8n/AuKojBdeFEHY BX5RMoRXi01OS4CtRsyfoAIWsevQ6wJw0IMoOLMMIExjcIgtPMOANt763ap7/O9O Rs/IqGa6U92qQ4VglQJG+QMV3gPLwuzI83jO7xK8CdY1nt0dKsorDO90Pg4nFlsJ lNXSLxvh8RPdN8add2Vu1dKs90ijc8FNUtyqZPOzozXvZ6uaLk/bs1V9CqMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1715082289; x=1715168689; bh=ecSzO7AiwnigNqU/smd06vR9/fdG nYG1J6IeAomF44c=; b=CvmzHek6TFypfJ1RPBnToLT7kzymcthSWcUJhd7JnfZ3 hi956ge5sXR7a6ozc+SdLsCthpzzBYholC7g/eOPqD6phpCm94RYhqyutTGOFvo1 CJZtKJCf5HRY9etbVeUyInoik5gIFJ/fz3V8wBR71p3QLzGzrPRr3c7pD/Y8txlM R0VgJah6C68E6gB0NdcgF24qDOoF3/FiJL3jSZcZb2kqzZP4aEEAXIhKCYBu35yN U6MAULIlG+u3s5gmQRkzmgMcYBxURcDhUvsADnbDpgsB5h6fNpwYKkG9seCJTli1 V2YJ0G7gLKPAjViF+AHsn90PqMK4gmSvqU4qcTJ6/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvkedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepleehueefffevveejgfelveeiuedutdevtdfhtdevveelgfevuedtkeeiffei geffnecuffhomhgrihhnpehgohhoghhlvghsohhurhgtvgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdr uggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 55BF9B6008D; Tue, 7 May 2024 07:44:49 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-443-g0dc955c2a-fm-20240507.001-g0dc955c2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <41191296-0aa0-4010-b70f-efa80b9200d4@app.fastmail.com> In-Reply-To: References: <20240503192858.103640-1-florian.fainelli@broadcom.com> <8e1867fc-34da-457c-b95a-2d51ea97336a@app.fastmail.com> <05a5e893-12f7-49fd-9a9a-abd387571f9b@broadcom.com> <47c63c4c-c657-4210-b476-c91c4f192483@app.fastmail.com> Date: Tue, 07 May 2024 13:44:29 +0200 From: "Arnd Bergmann" To: "Daniel Vetter" Cc: "Florian Fainelli" , linux-kernel@vger.kernel.org, "Helge Deller" , "Thomas Zimmermann" , "Javier Martinez Canillas" , "Sam Ravnborg" , "open list:FRAMEBUFFER LAYER" , "open list:FRAMEBUFFER LAYER" Subject: Re: [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate Content-Type: text/plain On Tue, May 7, 2024, at 13:10, Daniel Vetter wrote: > On Mon, May 06, 2024 at 04:53:47PM +0200, Arnd Bergmann wrote: >> On Mon, May 6, 2024, at 15:14, Daniel Vetter wrote: >> > On Fri, May 03, 2024 at 01:22:10PM -0700, Florian Fainelli wrote: >> >> On 5/3/24 12:45, Arnd Bergmann wrote: >> >> This is the current Android GKI config: >> https://android.googlesource.com/kernel/common.git/+/refs/heads/android-mainline/arch/arm64/configs/gki_defconfig >> where I can see that CONFIG_DRM is built-in, but DRM_FBDEV_EMULATION >> CONFIG_VT, CONFIG_FRAMEBUFFER_CONSOLE, CONFIG_FB_DEVICE and >> CONFIG_FB_CORE are all disabled. >> >> So the console won't work at all,I think this means that there >> is no way to get the console working, but building a fb.ko module >> allows using /dev/fb with simplefb.ko (or any other one) happens >> to almost work, but only by dumb luck rather than by design. > > So using /dev/fb chardev without fbcon is very much a real idea. This way > you should be able to run old userspace that uses fbdev directly for > drawing, but your console needs are served by a userspace console running > on top of drm. > > vt switching gets a bit more entertaining, but I thought logind has all > the glue already to make that happen. Worst case you need a tiny launcher > tool to get your userspace console out of the way while you launch a fbdev > using application, but I think correctly implement the vt ioctls to switch > to graphics mode /should/ work automatically. > > I do agree that this is only really a good idea with drm drivers, since > those do not rely on any of the fbdev infrastructure like the notifier > under discussion. I'm pretty sure what Florian is looking for has no dependency on VT, fbcon or logind, but I'm only guessing based on the information I see in the public Android source trees. My understanding is that the Android recovery application is a graphical tool that accesses the framebuffer directly and is controlled using the volume and power buttons on a phone. >> I suppose making CONFIG_FB_NOTIFIER optional for FB (on by >> default if any of the consumers of the notification are turned >> on) would not be a bad direction to go in general and also >> address Florian's link error, but that doesn't solve the >> more general concern about a third-party fb.ko module on a >> kernel that was explicitly built with FB disabled. >> >> The GKI defconfig was initially done at a time where one could >> not have CONFIG_FBDEV_EMULATION and CONFIG_FB_DEVICE without >> pulling in the entire fbdev module, but now that is possible. >> Maybe that is something that Android could now include? >> >> Alternatively, I wonder if that recovery image could be changed >> to access the screen through the /dev/dri/ interfaces? I have >> no experience in using those without Xorg or Wayland, is that >> a sensible thing to do? > > Uh ... I think I'm confused about the requirements. Does android's > recovery image need fbdev (meaning /dev/fb chardevs), or does it need > fbcon? > > Note that fbcon runs (or well, should run) totally fine on top of drm > drivers without the fb notifier. This wasn't the case a few years ago > (because fbcon also used that notifier), but nowadays fb notifiers are > only needed for legacy fbdev drivers. So could it be that this "need fb > notifier" requirement is a leftover from rather old kernel versions and > not actually needed anymore? > > I think we should nail the actual requirements here first before jumping > to solutions ... Right, let's wait for Florian to reply. From what he said earlier though, the only reason that the notifiers are getting in the way is the link error you get from trying to load a separately built fb.ko module on a kernel that was built with FB=n / FB_CORE=n, so I don't think he even cares about notifiers, only about allowing the recovery application to mmap() the framebuffer. Arnd