All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Maxime Ripard <maxime@cerno.tech>, Arnd Bergmann <arnd@arndb.de>,
	Frank Rowand <frowand.list@gmail.com>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH] fbdev: simplefb: fix Kconfig dependencies
Date: Wed, 21 Jul 2021 10:29:52 -0600	[thread overview]
Message-ID: <CAL_JsqKu=08VvrkP7hWeW=Sr0oYoDUsEZGKCQmTMgtPc9gxHkg@mail.gmail.com> (raw)
In-Reply-To: <20210721151839.2484245-1-arnd@kernel.org>

On Wed, Jul 21, 2021 at 9:18 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.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@arndb.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@kernel.org>

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: devicetree@vger.kernel.org,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Maxime Ripard <maxime@cerno.tech>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH] fbdev: simplefb: fix Kconfig dependencies
Date: Wed, 21 Jul 2021 10:29:52 -0600	[thread overview]
Message-ID: <CAL_JsqKu=08VvrkP7hWeW=Sr0oYoDUsEZGKCQmTMgtPc9gxHkg@mail.gmail.com> (raw)
In-Reply-To: <20210721151839.2484245-1-arnd@kernel.org>

On Wed, Jul 21, 2021 at 9:18 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.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@arndb.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@kernel.org>

  reply	other threads:[~2021-07-21 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 15:17 [PATCH] fbdev: simplefb: fix Kconfig dependencies Arnd Bergmann
2021-07-21 15:17 ` Arnd Bergmann
2021-07-21 16:29 ` Rob Herring [this message]
2021-07-21 16:29   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqKu=08VvrkP7hWeW=Sr0oYoDUsEZGKCQmTMgtPc9gxHkg@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=maxime@cerno.tech \
    --cc=mchehab+huawei@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.