Message ID | 20221123031605.16680-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2567504wrr; Tue, 22 Nov 2022 19:21:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf5aS3Cwv21fBymCJTPKElC7n9RE9TM4D2aHx7TRniUG+fTY7TZqjmO92GKgALJ0YM3QoIlR X-Received: by 2002:a17:90a:4302:b0:218:9b49:aeab with SMTP id q2-20020a17090a430200b002189b49aeabmr18689263pjg.46.1669173710615; Tue, 22 Nov 2022 19:21:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669173710; cv=none; d=google.com; s=arc-20160816; b=R8EqoXFsdqAPGaUbYb2EzhDHBF4spq4XAsBJYGOpHyrN9RfNpru4FyweyLnEmEBOUQ FXSxzhFMnQuBtAiPvG+xnWhDwDPFMkiXljuLdplLjIygzVb4L3m0oeLVuQnAJmlnjFUf GukEcK/octSQmqqil9kArxZZlfKU5flJOiNMUH25fekPCYpm4UqvlZ8khltT4bkO3WZy dAecNoSuQNGV4Ejz04ZgqG17JveMJLUc90cfVIZXnSkTVG7g8C3XY0bjQxjbVDc23mfg dto3ODl/YpGe8ip+L94c/i5HzGuC+Kk37xrNzwh8w2hodkCVI1G9EvHI0ThUOZALi6vE p4aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XplI+geP46DYtWKfitoXrwKXFvO9E8ewRJGSG7yitzM=; b=FzbYT3HoEUh2Ii35SIx+Vna17H0Q6k83s39HdS6vcwFJtaqkB88R88rHW5Ox8V156s BDKUxscOEslB4VvKAytaqhkmJ4N1/1hCDw0YkLLasm/6EbC9TqlwcqXIrR53SnSu5cYl +t75RdjoDOA9U9ZkxpR04ZaTzIlADYt3C97eXuJf1FxSgSeeZmZdGQL4zI+JhKbtQ4Dp 8ozaCY92jblNa9Thiz3JwpUZkjmLoCFSByNPu7flFgouUK/eDac47O4SU4K+nEDXcZ81 gjozcyYvSyYNlDu+/3eyYO0RBTKHLGILNzN62kryrMj2PdBG9PuhKBhdG0lrggglR0mT ys1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="GZ2/OsZp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a656392000000b00476c94abbc5si15931633pgv.681.2022.11.22.19.21.32; Tue, 22 Nov 2022 19:21:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="GZ2/OsZp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235411AbiKWDQS (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Tue, 22 Nov 2022 22:16:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbiKWDQR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 22 Nov 2022 22:16:17 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC3288CBA5; Tue, 22 Nov 2022 19:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=XplI+geP46DYtWKfitoXrwKXFvO9E8ewRJGSG7yitzM=; b=GZ2/OsZp+Fy3h9ep3ygIVEgC88 fW9vkQjgEXLFIxHH92x5HX4AEvdufiaxtG+ylyJFXqyHpHKuBKz+HOjEy+H/B3WDXvJ3PSmS20AWk Ezefu5K4MHaRICK6ZOVkuHcqVw6mm6jgNygD+Ks47tlreyn7EwQ+0gVBDY/0g+ZufZr0+MOavYXL3 uvEE28zbcgtKOnkr5eTCSlwgjEiH7cOz6t8q1CijBSLXuTHu5w+4PoXQF/WDm0fww4JJv8JZzvN7U tm8jP0Tc3v5s/2LziH178aNzWl09w4LTr/LbzHkE0QDaeIMfx1Q5ZDHXzkDQEEqmB9wZydflEbJ0J Gx6gsAsg==; Received: from [2601:1c2:d80:3110::a2e7] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxgFF-0073HC-FQ; Wed, 23 Nov 2022 03:16:17 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Masahiro Yamada <masahiroy@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, =?utf-8?q?Michal_Such=C3=A1nek?= <msuchanek@suse.de>, linuxppc-dev@lists.ozlabs.org, Daniel Vetter <daniel@ffwll.ch>, Helge Deller <deller@gmx.de>, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m Date: Tue, 22 Nov 2022 19:16:05 -0800 Message-Id: <20221123031605.16680-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750255492798361575?= X-GMAIL-MSGID: =?utf-8?q?1750255492798361575?= |
Series |
[-next] fbdev: offb: allow build when DRM_OFDRM=m
|
|
Commit Message
Randy Dunlap
Nov. 23, 2022, 3:16 a.m. UTC
Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
When the latter symbol is =m, kconfig downgrades (limits) the 'select's
under FB_OF to modular (=m). This causes undefined symbol references:
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
selected FB_CFB_* symbols will become =y instead of =m.
In tristate logic (for DRM_OFDRM), this changes the dependency from
!DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled)
to (boolean)
DRM_OFDRM != y == y, allowing the 'select's to cause the
FB_CFB_* symbols to =y instead of =m.
Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Michal Suchánek <msuchanek@suse.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/video/fbdev/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Am 23.11.22 um 04:16 schrieb Randy Dunlap: > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. > When the latter symbol is =m, kconfig downgrades (limits) the 'select's > under FB_OF to modular (=m). This causes undefined symbol references: > > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect' > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea' > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit' > > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the > selected FB_CFB_* symbols will become =y instead of =m. > > In tristate logic (for DRM_OFDRM), this changes the dependency from > !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) > to (boolean) > DRM_OFDRM != y == y, allowing the 'select's to cause the > FB_CFB_* symbols to =y instead of =m. > > Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Suggested-by: Masahiro Yamada <masahiroy@kernel.org> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Michal Suchánek <msuchanek@suse.de> > Cc: linuxppc-dev@lists.ozlabs.org > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Helge Deller <deller@gmx.de> > Cc: linux-fbdev@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org Acked-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > drivers/video/fbdev/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig > --- a/drivers/video/fbdev/Kconfig > +++ b/drivers/video/fbdev/Kconfig > @@ -455,7 +455,7 @@ config FB_ATARI > config FB_OF > bool "Open Firmware frame buffer device support" > depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) > - depends on !DRM_OFDRM > + depends on DRM_OFDRM != y > select APERTURE_HELPERS > select FB_CFB_FILLRECT > select FB_CFB_COPYAREA -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
On Wed, Nov 23, 2022 at 09:02:54AM +0100, Thomas Zimmermann wrote: > > Am 23.11.22 um 04:16 schrieb Randy Dunlap: > > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. > > When the latter symbol is =m, kconfig downgrades (limits) the 'select's > > under FB_OF to modular (=m). This causes undefined symbol references: > > > > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect' > > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea' > > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit' > > > > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the > > selected FB_CFB_* symbols will become =y instead of =m. > > > > In tristate logic (for DRM_OFDRM), this changes the dependency from > > !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) > > to (boolean) > > DRM_OFDRM != y == y, allowing the 'select's to cause the > > FB_CFB_* symbols to =y instead of =m. > > > > Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers") > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > Suggested-by: Masahiro Yamada <masahiroy@kernel.org> > > Cc: Thomas Zimmermann <tzimmermann@suse.de> > > Cc: Michal Suchánek <msuchanek@suse.de> > > Cc: linuxppc-dev@lists.ozlabs.org > > Cc: Daniel Vetter <daniel@ffwll.ch> > > Cc: Helge Deller <deller@gmx.de> > > Cc: linux-fbdev@vger.kernel.org > > Cc: dri-devel@lists.freedesktop.org > > Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Michal Suchánek <msuchanek@suse.de> > > > --- > > drivers/video/fbdev/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig > > --- a/drivers/video/fbdev/Kconfig > > +++ b/drivers/video/fbdev/Kconfig > > @@ -455,7 +455,7 @@ config FB_ATARI > > config FB_OF > > bool "Open Firmware frame buffer device support" > > depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) > > - depends on !DRM_OFDRM > > + depends on DRM_OFDRM != y > > select APERTURE_HELPERS > > select FB_CFB_FILLRECT > > select FB_CFB_COPYAREA > > -- > Thomas Zimmermann > Graphics Driver Developer > SUSE Software Solutions Germany GmbH > Maxfeldstr. 5, 90409 Nürnberg, Germany > (HRB 36809, AG Nürnberg) > Geschäftsführer: Ivo Totev
On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote: > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. > When the latter symbol is =m, kconfig downgrades (limits) the 'select's > under FB_OF to modular (=m). This causes undefined symbol references: > > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): > undefined reference to `cfb_fillrect' > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): > undefined reference to `cfb_copyarea' > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): > undefined reference to `cfb_imageblit' > > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the > selected FB_CFB_* symbols will become =y instead of =m. > > In tristate logic (for DRM_OFDRM), this changes the dependency from > !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) > to (boolean) > DRM_OFDRM != y == y, allowing the 'select's to cause the > FB_CFB_* symbols to =y instead of =m. > Is it actually a useful configuration to have OFDRM=m and FB_OF=y though? I would expect in that case that the OFDRM driver never binds to a device because it's already owned by FB_OF. > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig > --- a/drivers/video/fbdev/Kconfig > +++ b/drivers/video/fbdev/Kconfig > @@ -455,7 +455,7 @@ config FB_ATARI > config FB_OF > bool "Open Firmware frame buffer device support" > depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) > - depends on !DRM_OFDRM > + depends on DRM_OFDRM != y > select APERTURE_HELPERS I would instead make this 'depends on DRM_OFDRM=n', which completely eliminates configs that have both driver enabled. A nicer change would be to make FB_OF a tristate symbol, which makes it possible to load one of the two modules if both are enabled =m, while only allowing one of them to be =y if the other is completely disabled. It looks like offb was originally written to be usable as a loadable module, but Kconfig has prevented this since at least the start of the git history. Arnd
Hi Arnd, On 11/23/22 01:08, Arnd Bergmann wrote: > On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote: >> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. >> When the latter symbol is =m, kconfig downgrades (limits) the 'select's >> under FB_OF to modular (=m). This causes undefined symbol references: >> >> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): >> undefined reference to `cfb_fillrect' >> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): >> undefined reference to `cfb_copyarea' >> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): >> undefined reference to `cfb_imageblit' >> >> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the >> selected FB_CFB_* symbols will become =y instead of =m. >> >> In tristate logic (for DRM_OFDRM), this changes the dependency from >> !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) >> to (boolean) >> DRM_OFDRM != y == y, allowing the 'select's to cause the >> FB_CFB_* symbols to =y instead of =m. >> > > Is it actually a useful configuration to have OFDRM=m and > FB_OF=y though? I would expect in that case that the OFDRM > driver never binds to a device because it's already owned > by FB_OF. > >> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig >> --- a/drivers/video/fbdev/Kconfig >> +++ b/drivers/video/fbdev/Kconfig >> @@ -455,7 +455,7 @@ config FB_ATARI >> config FB_OF >> bool "Open Firmware frame buffer device support" >> depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) >> - depends on !DRM_OFDRM >> + depends on DRM_OFDRM != y >> select APERTURE_HELPERS > > I would instead make this 'depends on DRM_OFDRM=n', which > completely eliminates configs that have both driver enabled. Yep, that works for me. Thanks. Thomas, Michal, are you OK with that change? > A nicer change would be to make FB_OF a tristate symbol, > which makes it possible to load one of the two modules if > both are enabled =m, while only allowing one of them to > be =y if the other is completely disabled. It looks like > offb was originally written to be usable as a loadable module, > but Kconfig has prevented this since at least the start of > the git history.
Hi Am 23.11.22 um 11:02 schrieb Randy Dunlap: > Hi Arnd, > > On 11/23/22 01:08, Arnd Bergmann wrote: >> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote: >>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. >>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's >>> under FB_OF to modular (=m). This causes undefined symbol references: >>> >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): >>> undefined reference to `cfb_fillrect' >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): >>> undefined reference to `cfb_copyarea' >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): >>> undefined reference to `cfb_imageblit' >>> >>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the >>> selected FB_CFB_* symbols will become =y instead of =m. >>> >>> In tristate logic (for DRM_OFDRM), this changes the dependency from >>> !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) >>> to (boolean) >>> DRM_OFDRM != y == y, allowing the 'select's to cause the >>> FB_CFB_* symbols to =y instead of =m. >>> >> >> Is it actually a useful configuration to have OFDRM=m and >> FB_OF=y though? I would expect in that case that the OFDRM >> driver never binds to a device because it's already owned >> by FB_OF. >> >>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig >>> --- a/drivers/video/fbdev/Kconfig >>> +++ b/drivers/video/fbdev/Kconfig >>> @@ -455,7 +455,7 @@ config FB_ATARI >>> config FB_OF >>> bool "Open Firmware frame buffer device support" >>> depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) >>> - depends on !DRM_OFDRM >>> + depends on DRM_OFDRM != y >>> select APERTURE_HELPERS >> >> I would instead make this 'depends on DRM_OFDRM=n', which >> completely eliminates configs that have both driver enabled. > > Yep, that works for me. Thanks. > > Thomas, Michal, are you OK with that change? Yes. > >> A nicer change would be to make FB_OF a tristate symbol, >> which makes it possible to load one of the two modules if >> both are enabled =m, while only allowing one of them to >> be =y if the other is completely disabled. It looks like >> offb was originally written to be usable as a loadable module, >> but Kconfig has prevented this since at least the start of >> the git history. > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
On 11/23/22 02:02, Randy Dunlap wrote: > Hi Arnd, > > On 11/23/22 01:08, Arnd Bergmann wrote: >> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote: >>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. >>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's >>> under FB_OF to modular (=m). This causes undefined symbol references: >>> >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): >>> undefined reference to `cfb_fillrect' >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): >>> undefined reference to `cfb_copyarea' >>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): >>> undefined reference to `cfb_imageblit' >>> >>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the >>> selected FB_CFB_* symbols will become =y instead of =m. >>> >>> In tristate logic (for DRM_OFDRM), this changes the dependency from >>> !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) >>> to (boolean) >>> DRM_OFDRM != y == y, allowing the 'select's to cause the >>> FB_CFB_* symbols to =y instead of =m. >>> >> >> Is it actually a useful configuration to have OFDRM=m and >> FB_OF=y though? I would expect in that case that the OFDRM >> driver never binds to a device because it's already owned >> by FB_OF. >> >>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig >>> --- a/drivers/video/fbdev/Kconfig >>> +++ b/drivers/video/fbdev/Kconfig >>> @@ -455,7 +455,7 @@ config FB_ATARI >>> config FB_OF >>> bool "Open Firmware frame buffer device support" >>> depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) >>> - depends on !DRM_OFDRM >>> + depends on DRM_OFDRM != y >>> select APERTURE_HELPERS >> >> I would instead make this 'depends on DRM_OFDRM=n', which >> completely eliminates configs that have both driver enabled. > > Yep, that works for me. Thanks. > > Thomas, Michal, are you OK with that change? > >> A nicer change would be to make FB_OF a tristate symbol, >> which makes it possible to load one of the two modules if >> both are enabled =m, while only allowing one of them to >> be =y if the other is completely disabled. It looks like >> offb was originally written to be usable as a loadable module, >> but Kconfig has prevented this since at least the start of >> the git history. ISTM that a distro would prefer to have both DFM_OFDRM and FB_OF as tristate symbols that could both be built as loadable modules, as Arnd describes above. I'll look into that.
diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -455,7 +455,7 @@ config FB_ATARI config FB_OF bool "Open Firmware frame buffer device support" depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) - depends on !DRM_OFDRM + depends on DRM_OFDRM != y select APERTURE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA