[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqKu=08VvrkP7hWeW=Sr0oYoDUsEZGKCQmTMgtPc9gxHkg@mail.gmail.com>
Date: Wed, 21 Jul 2021 10:29:52 -0600
From: Rob Herring <robh+dt@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Thomas Zimmermann <tzimmermann@...e.de>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Maxime Ripard <maxime@...no.tech>,
Arnd Bergmann <arnd@...db.de>,
Frank Rowand <frowand.list@...il.com>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Fbdev development list <linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH] fbdev: simplefb: fix Kconfig dependencies
On Wed, Jul 21, 2021 at 9:18 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> Configurations with both CONFIG_FB_SIMPLE=y and CONFIG_DRM_SIMPLEDRM=m
> are allowed by Kconfig because the 'depends on !DRM_SIMPLEDRM' dependency
> does not disallow FB_SIMPLE as long as SIMPLEDRM is not built-in. This
Double negative. How about:
allows FB_SIMPLE as long as SIMPLEDRM is not built-in.
> can however result in a build failure when cfb_fillrect() etc are then
> also in loadable modules:
>
> x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x1f8): undefined reference to `cfb_fillrect'
> x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x200): undefined reference to `cfb_copyarea'
> x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x208): undefined reference to `cfb_imageblit'
>
> To work around this, change FB_SIMPLE to be a 'tristate' symbol,
> which still allows both to be =m together, but not one of them to
> be =y if the other one is =m. If a distro kernel picks this
> configuration, it can be determined by local policy which of
> the two modules gets loaded. The 'of_chosen' export is needed
> as this is the first loadable module referencing it.
>
> Alternatively, the Kconfig dependency could be changed to
> 'depends on DRM_SIMPLEDRM=n', which would forbid the configuration
> with both drivers.
>
> Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/of/base.c | 1 +
> drivers/video/fbdev/Kconfig | 5 +++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
For the DT change:
Acked-by: Rob Herring <robh@...nel.org>
Powered by blists - more mailing lists