From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
Paul Bolle <pebolle@tiscali.nl>,
linux-samsung-soc@vger.kernel.org,
Donghwa Lee <dh09.lee@samsung.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
linux-kernel@vger.kernel.org, Inki Dae <inki.dae@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Kukjin Kim <kgene@kernel.org>,
linux-fbdev@vger.kernel.org,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Subject: Re: [PATCH v2] video: exynos: fix modular build
Date: Mon, 29 Feb 2016 17:39:59 +0100 [thread overview]
Message-ID: <6291541.7IMAnfX0g2@wuerfel> (raw)
In-Reply-To: <56D46DFD.6090706@ti.com>
On Monday 29 February 2016 18:12:45 Tomi Valkeinen wrote:
> Hi,
>
> On 26/02/16 14:38, Arnd Bergmann wrote:
> > The s6e8ax0 driver has a dependency on BACKLIGHT_CLASS_DEVICE,
> > which can be configured as a loadable module, so we have to
> > make the driver a tristate symbol as well, to avoid this error:
> >
> > drivers/built-in.o: In function `s6e8ax0_probe':
> > :(.text+0x23a48): undefined reference to `devm_backlight_device_register'
>
> If a 'bool' Kconfig option depends on BACKLIGHT_CLASS_DEVICE, shouldn't
> the Kconfig dependency take care of having BACKLIGHT_CLASS_DEVICE as
> built-in?
No, that's not how Kconfig interprets it. There are many bool option
that depend on tristate options but can be enabled if the dependency
is built-in.
Take this one for example:
config FIRMWARE_EDID
bool "Enable firmware EDID"
depends on FB
We clearly want to be able to turn this on even for FB=m.
> > This also means we get another error from a missing export, which
> > this fixes as well:
> >
> > ERROR: "exynos_mipi_dsi_register_lcd_driver" [drivers/video/fbdev/exynos/s6e8ax0.ko] undefined!
> >
> > The drivers are all written to be loadable modules already,
> > except the Kconfig options for that are missing, which makes
> > the patch really easy.
>
> Looks and sound fine, except doesn't this tell that the drivers have
> never been tested as modules? Did you or someone else actually test these?
No, this is not runtime tested. Generally there is very little that
can go wrong here though.
An alternative would be to change the dependency to
depends on BACKLIGHT_CLASS_DEVICE=y
which doesn't allow the driver to be turned on for the =m case.
However, no other framebuffer driver does this.
> > diff --git a/drivers/video/fbdev/exynos/Makefile b/drivers/video/fbdev/exynos/Makefile
> > index b5b1bd228abb..02d8dc522fea 100644
> > --- a/drivers/video/fbdev/exynos/Makefile
> > +++ b/drivers/video/fbdev/exynos/Makefile
> > @@ -2,6 +2,8 @@
> > # Makefile for the exynos video drivers.
> > #
> >
> > -obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
> > - exynos_mipi_dsi_lowlevel.o
> > +obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos-mipi-dsi-mod.o
> > +
> > +exynos-mipi-dsi-mod-objs += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
> > + exynos_mipi_dsi_lowlevel.o
>
> Hmm, why is this makefile change needed?
The original Makefile would link each file into a separate module, but that
cannot work, because they reference symbols from each other that are not
exported to other modules.
With my change, all the files get linked into a single module.
Arnd
next prev parent reply other threads:[~2016-02-29 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 12:38 [PATCH v2] video: exynos: fix modular build Arnd Bergmann
2016-02-29 16:12 ` Tomi Valkeinen
2016-02-29 16:39 ` Arnd Bergmann [this message]
2016-02-29 16:55 ` Tomi Valkeinen
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=6291541.7IMAnfX0g2@wuerfel \
--to=arnd@arndb.de \
--cc=dh09.lee@samsung.com \
--cc=inki.dae@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox