All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
Date: Mon, 9 Jul 2018 11:15:24 +0200	[thread overview]
Message-ID: <20180709091524.sfamfdmbmwclmegj@flea> (raw)
In-Reply-To: <CAGb2v64HmXRK19-ahv624F8mpNCt21ri3AaVEiB+Gw9GsVeb=Q@mail.gmail.com>

On Mon, Jul 09, 2018 at 04:58:48PM +0800, Chen-Yu Tsai wrote:
> On Mon, Jul 9, 2018 at 4:07 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > On Fri, Jul 06, 2018 at 02:45:53PM +0200, Arnd Bergmann wrote:
> >> Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
> >> a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:
> >>
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi.ko] undefined!
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] undefined!
> >>
> >> This solves the problem by making DRM_SUN8I_MIXER a 'bool' symbol, building
> >> the sun8i_tcon_top module the same way as the core sun4i-drm module whenever
> >> DRM_SUN8I_MIXER is enabled, or not building it at all otherwise.
> >>
> >> Alternatively, we could always build sun8i_tcon_top.ko along with sun4-drm.ko
> >> and detach it from the mixer module, I could not tell which way is more
> >> appropriate here.
> >
> > If that's easily doable, then yeah, that would be the preferred option
> > I guess. Jernej? Chen-Yu? Any opinion on this?
> 
> Yeah, that definitely works for me. Having TCON TOP being part of the core
> sun4i-drm makes more sense. The TCON code will likely call into it later on
> when Jernej adds the encoder muxing code.
> 
> I wonder if we shouldn't just build the whole display engine code, excluding
> downstream encoders (HDMI, DSI, TV) into one module. That would also fix the
> issue that DRM_SUN4I_BACKEND has to be built-in if DRM_SUN4I is built-in.
> That might be overkill though, given that one day we should be able to get
> rid of the frontend check.

We can't really do that (or at least without rewriting a significant
part of the driver), since we can have only one
module_init/module_exit function per module, and we have one
per-hardware block.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180709/c83521e5/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
	Arnd Bergmann <arnd@arndb.de>, David Airlie <airlied@linux.ie>,
	Jonathan Liu <net147@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
Date: Mon, 9 Jul 2018 11:15:24 +0200	[thread overview]
Message-ID: <20180709091524.sfamfdmbmwclmegj@flea> (raw)
In-Reply-To: <CAGb2v64HmXRK19-ahv624F8mpNCt21ri3AaVEiB+Gw9GsVeb=Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2021 bytes --]

On Mon, Jul 09, 2018 at 04:58:48PM +0800, Chen-Yu Tsai wrote:
> On Mon, Jul 9, 2018 at 4:07 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > On Fri, Jul 06, 2018 at 02:45:53PM +0200, Arnd Bergmann wrote:
> >> Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
> >> a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:
> >>
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi.ko] undefined!
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] undefined!
> >>
> >> This solves the problem by making DRM_SUN8I_MIXER a 'bool' symbol, building
> >> the sun8i_tcon_top module the same way as the core sun4i-drm module whenever
> >> DRM_SUN8I_MIXER is enabled, or not building it at all otherwise.
> >>
> >> Alternatively, we could always build sun8i_tcon_top.ko along with sun4-drm.ko
> >> and detach it from the mixer module, I could not tell which way is more
> >> appropriate here.
> >
> > If that's easily doable, then yeah, that would be the preferred option
> > I guess. Jernej? Chen-Yu? Any opinion on this?
> 
> Yeah, that definitely works for me. Having TCON TOP being part of the core
> sun4i-drm makes more sense. The TCON code will likely call into it later on
> when Jernej adds the encoder muxing code.
> 
> I wonder if we shouldn't just build the whole display engine code, excluding
> downstream encoders (HDMI, DSI, TV) into one module. That would also fix the
> issue that DRM_SUN4I_BACKEND has to be built-in if DRM_SUN4I is built-in.
> That might be overkill though, given that one day we should be able to get
> rid of the frontend check.

We can't really do that (or at least without rewriting a significant
part of the driver), since we can have only one
module_init/module_exit function per module, and we have one
per-hardware block.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"David Airlie" <airlied@linux.ie>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Jernej Skrabec" <jernej.skrabec@siol.net>,
	"Jonathan Liu" <net147@gmail.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
Date: Mon, 9 Jul 2018 11:15:24 +0200	[thread overview]
Message-ID: <20180709091524.sfamfdmbmwclmegj@flea> (raw)
In-Reply-To: <CAGb2v64HmXRK19-ahv624F8mpNCt21ri3AaVEiB+Gw9GsVeb=Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

On Mon, Jul 09, 2018 at 04:58:48PM +0800, Chen-Yu Tsai wrote:
> On Mon, Jul 9, 2018 at 4:07 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > On Fri, Jul 06, 2018 at 02:45:53PM +0200, Arnd Bergmann wrote:
> >> Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
> >> a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:
> >>
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi.ko] undefined!
> >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] undefined!
> >>
> >> This solves the problem by making DRM_SUN8I_MIXER a 'bool' symbol, building
> >> the sun8i_tcon_top module the same way as the core sun4i-drm module whenever
> >> DRM_SUN8I_MIXER is enabled, or not building it at all otherwise.
> >>
> >> Alternatively, we could always build sun8i_tcon_top.ko along with sun4-drm.ko
> >> and detach it from the mixer module, I could not tell which way is more
> >> appropriate here.
> >
> > If that's easily doable, then yeah, that would be the preferred option
> > I guess. Jernej? Chen-Yu? Any opinion on this?
> 
> Yeah, that definitely works for me. Having TCON TOP being part of the core
> sun4i-drm makes more sense. The TCON code will likely call into it later on
> when Jernej adds the encoder muxing code.
> 
> I wonder if we shouldn't just build the whole display engine code, excluding
> downstream encoders (HDMI, DSI, TV) into one module. That would also fix the
> issue that DRM_SUN4I_BACKEND has to be built-in if DRM_SUN4I is built-in.
> That might be overkill though, given that one day we should be able to get
> rid of the frontend check.

We can't really do that (or at least without rewriting a significant
part of the driver), since we can have only one
module_init/module_exit function per module, and we have one
per-hardware block.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-07-09  9:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 12:45 [PATCH] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Arnd Bergmann
2018-07-06 12:45 ` Arnd Bergmann
2018-07-06 12:45 ` Arnd Bergmann
2018-07-09  8:07 ` Maxime Ripard
2018-07-09  8:07   ` Maxime Ripard
2018-07-09  8:07   ` Maxime Ripard
2018-07-09  8:58   ` Jernej Škrabec
2018-07-09  8:58     ` Jernej Škrabec
2018-07-09  8:58   ` Chen-Yu Tsai
2018-07-09  8:58     ` Chen-Yu Tsai
2018-07-09  8:58     ` Chen-Yu Tsai
2018-07-09  9:15     ` Maxime Ripard [this message]
2018-07-09  9:15       ` Maxime Ripard
2018-07-09  9:15       ` Maxime Ripard
2018-07-09  9:17       ` Chen-Yu Tsai
2018-07-09  9:17         ` Chen-Yu Tsai
2018-07-09  9:17         ` Chen-Yu Tsai
  -- strict thread matches above, loose matches on Subject: below --
2018-09-11 11:33 Maxime Ripard
2018-09-11 20:17 ` Daniel Vetter
2018-09-12  9:53   ` Maxime Ripard
2018-09-12 14:25     ` Daniel Vetter
2018-09-12 15:47       ` Maxime Ripard
2018-09-12 15:53         ` Daniel Vetter
2018-09-13  8:02           ` Maxime Ripard
2018-09-13  8:19             ` Arnd Bergmann
2018-09-12 14:02   ` Maxime Ripard

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=20180709091524.sfamfdmbmwclmegj@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.