Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2712839rdb; Tue, 12 Sep 2023 09:48:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGccRpaR7duozHj268ka0kJhwyYbr6KqYyxAx5u9LzZER52PrBDyQ7zXf134iNhaWu6JPHQ X-Received: by 2002:a05:6870:d58e:b0:1d4:cebb:63ba with SMTP id u14-20020a056870d58e00b001d4cebb63bamr75251oao.1.1694537317401; Tue, 12 Sep 2023 09:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694537317; cv=none; d=google.com; s=arc-20160816; b=prp003OLQXByZHSAD66a6dJDRHbIzw1i1IsWbgxx4SpMZN6sknNMFRaIbS5DDxvp0R A38mkhcewrNVzmUmH7y3dnCXFSub3coLtwBilFPOsm2n8KtzX3QpxEVfJtIMKykGhnua a0zBaO2aUAgZ852Yy7J5oZGVXs5hL/NVL6E4PXrTr/uzcJEDNM/8fGeDbyepZjpHHAQl yjNqAZZ3A2wnoAP5rew71Cv76jaDymkux2joa5v93qcGlfRBlMHdS4CCcKeHEqyWaPu0 gk39FxJ5GVu8AZXl7KMEoo6DE4+45SPcXRSoTnEU/vuiPfXm50cALULrInUe6mBswpz0 bkWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=TA8jtm4MgiuLceQSfCUtObGyhjBvJ9WYvezLxw5lbaw=; fh=JvEOWim9qdcsmdjvRfrmwD5MiyKTDCH98wR/qD4mU3c=; b=gqzcn8HnCQ660KeSGBPiqgmJiBt9S1BS7gUQ3jBsd1Rd2LoqeQiPYjK0kcZ886wqFq az9iDzdRjnJ8RGr+0il71rSwTO9+whLDgKW+bnw2wlEs0WoTGcRuYP9wZiirGRSiVLya mFYq5H2ywz5z/T9gVZ9xBsskp5X7OHaYKHqlwe/7ljw5Vfsx+OMjvyXFRTszd/EN2un+ v216fFlByoNk4ghqMgZBMNovh/EJ5QJI27t+ws9Mra7CAz0IBDMih7myRb22BfR/VWcD QCS+ydH+CZ6KSAKZ2Q8s9xfxL9jQ6Ayu45bFThWxooGZKe/9eJgJJpNuHLlHkac/nD96 s+Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=ZqeqHrOI; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=2ooWtfOO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id e10-20020a65688a000000b005706961d4d2si8112999pgt.463.2023.09.12.09.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 09:48:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=ZqeqHrOI; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=2ooWtfOO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0D6908021EEF; Tue, 12 Sep 2023 02:07:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233573AbjILJG4 (ORCPT + 99 others); Tue, 12 Sep 2023 05:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233266AbjILJGY (ORCPT ); Tue, 12 Sep 2023 05:06:24 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B387C172B; Tue, 12 Sep 2023 02:05:21 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id EF997320092D; Tue, 12 Sep 2023 05:05:17 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 12 Sep 2023 05:05:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1694509517; x=1694595917; bh=TA8jtm4MgiuLceQSfCUtObGyhjBvJ9WYvez Lxw5lbaw=; b=ZqeqHrOIO5iNCsuQT6fSm2DTBJAwajk3dmAJFcIZwKOL8J38ekR g2vbDkuTkNHVYLB5vohqaLJVZ/e2eyE55CEWTsaqh8VvQrzVfVMuLgSSZ7m+iGJT X8N4VzmAR/qc5Ess1YNUM0TdWHKVhQ4FQBWTvCI2SnG9C4KB5zQzTNPErycPBQZE outhf0mrl/3qIi6G+wzsX42bmx1yh6FnLf+i1vzUnH9JfBevUkt0mD91ZYjGK94Y NY/otR/xqGTDx/o0FIG5aasP2ihHIDCARrM6r7IXNr1lmemp893dC4D4ksdivxgQ CaODyH9MrdsoRtGi2+hDAbCxLHLp23+7dEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694509517; x=1694595917; bh=TA8jtm4MgiuLceQSfCUtObGyhjBvJ9WYvez Lxw5lbaw=; b=2ooWtfOO2MK8Jq4z7Lmp9UKffCU7Pj1TS+TnT/DsV4kh9M2VxOT rpJAnHBQu5STG1nvauq+g0LYRBuafcPKTRfZK7HtnyKV6pIQdUq7HsDfSfp6Y3Qm AcL5CfHzLOpuoB40BXYMyv9z9UqE8aBoJn0wMltNymFaXYxYXd2zcS0+I/YLrxIm kDCLutYXYjuRdJKHNrSDmeeYdru2qBrzdLbXbGnihbGnAYGpZbYmQxmDnTR6JipP wgYdeYqbouYCqBDnZq+04JOKHc8ddSN66YVO+LqAAg+ztYNkGvLcbUNKKnFFyp+u lCTy9/OLIk3i3O+oks1SwgGLj68ZJI/I6Tg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeiiedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B86E4B6008D; Tue, 12 Sep 2023 05:05:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-745-g95dd7bea33-fm-20230905.001-g95dd7bea Mime-Version: 1.0 Message-Id: <9a7c7cb2-fa9e-4bf9-891b-ccd754d1fc25@app.fastmail.com> In-Reply-To: References: <20230911205338.2385278-1-arnd@kernel.org> <637afb25-8ee2-4188-9385-27ee6a97ec59@suse.de> Date: Tue, 12 Sep 2023 05:04:37 -0400 From: "Arnd Bergmann" To: "Geert Uytterhoeven" , "Thomas Zimmermann" Cc: "Arnd Bergmann" , "Maarten Lankhorst" , "Maxime Ripard" , "Dave Airlie" , "Daniel Vetter" , "Greg Kroah-Hartman" , "Helge Deller" , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Dave Airlie" , "Javier Martinez Canillas" , "Jim Cromie" , "Sam Ravnborg" , "Arthur Grillo" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH] drm: fix up fbdev Kconfig defaults Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Sep 2023 02:07:06 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On Tue, Sep 12, 2023, at 04:18, Geert Uytterhoeven wrote: > On Tue, Sep 12, 2023 at 10:11=E2=80=AFAM Thomas Zimmermann wrote: >> Am 12.09.23 um 09:14 schrieb Geert Uytterhoeven: >> [...] >> >> --- a/drivers/gpu/drm/Kconfig >> >> +++ b/drivers/gpu/drm/Kconfig >> >> @@ -135,7 +135,7 @@ config DRM_FBDEV_EMULATION >> >> bool "Enable legacy fbdev support for your modesetting dr= iver" >> >> depends on DRM >> >> select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_= CONSOLE >> >> - default y >> >> + default FB >> > >> > While this is true for existing configs, it is no longer true in ge= neral, >> > as DRM_FBDEV_EMULATION is no longer related to FB. >> >> Would it make sense to make FRAMEBUFFER_CONSOLE an independent option >> and have FBDEV_EMULATION depend on it? Something like this: >> >> FRAMEBUFFER_CONSOLE >> depends on DRM || FB >> select FB_CORE >> >> FBDEV_EMULATION >> depends on DRM >> depends on FRAMEBUFFER_CONSOLE >> default y > > Oops, now you can no longer have FBDEV_EMULATION without > FRAMEBUFFER_CONSOLE, which is useful to be able to enable > FB_DEVICE... > > And what's the point (if DRM is enabled) of having FB_CORE with > FBDEV_EMULATION disabled? I think we technically have the choice between selecting FB_CORE from all the providers (FB and DRM_FBDEV_EMULATION) or from all the consumers (FRAMEBUFFER_CONSOLE, FB_DEVICE and LOGO). We chose to have it the former way at the moment, and I think what Thomas suggests here is to change it to the latter. The downside of the current approach is that you can have pointless configuration with CONFIG_FB=3Dy CONFIG_DRM=3Dy CONFIG_DRM_FBDEV_EMULATION=3Dy CONFIG_FRAMEBUFFER_CONSOLE=3Dn CONFIG_FB_DEVICE=3Dn CONFIG_LOGO=3Dn where the fb_core module gets initialized but it is impossible for anything to draw on it. Another option we have would be to try to separate the Kconfig options for DRM and FB a little further, in anticipation of reducing the amount of shared code in the long run (a lot of FB code is built but never used when enabling console on DRM). So adding a new config DRM_CONSOLE bool "enable console on DRM devices" depends on DRM depends on VT_CONSOLE depends on !UML select FB_CORE select FRAMEBUFFER_CONSOLE_CORE # new helper sym select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY default y would give us a path to minimize the shared code further, allowing the console code to be reused as before, but without having to pull in the code that is now only needed for FB_DEVICE. In this scenario, we'd still have CONFIG_DRM_FBDEV_EMULATION like config DRM_FBDEV_EMULATION bool "full emulation of fbdev layer for DRM" select FB_CORE select FB_DEVICE default FB # if enabled already, use it but only use that if we actually want FB_DEVICE. Arnd