* [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
@ 2018-07-11 14:43 Arnd Bergmann
2018-07-12 7:35 ` Maxime Ripard
2018-09-07 9:41 ` Jon Hunter
0 siblings, 2 replies; 9+ messages in thread
From: Arnd Bergmann @ 2018-07-11 14:43 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Arnd Bergmann, dri-devel, linux-arm-kernel, linux-kernel
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 adding a silent symbol for the tcon_top module,
building it as a separate module in exactly the cases that we need it,
but in a way that it is reachable by the other modules.
Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs")
Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: link the tcon top module separately instead of into the mixer
v3: rebased on top of the latest git://anongit.freedesktop.org/drm/drm-misc for-linux-next
---
drivers/gpu/drm/sun4i/Kconfig | 7 +++++++
drivers/gpu/drm/sun4i/Makefile | 3 ++-
drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++-
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 3 ++-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig
index 156a865c3e6d..c2c042287c19 100644
--- a/drivers/gpu/drm/sun4i/Kconfig
+++ b/drivers/gpu/drm/sun4i/Kconfig
@@ -68,4 +68,11 @@ config DRM_SUN8I_MIXER
graphics mixture and feed graphics to TCON, If M is
selected the module will be called sun8i-mixer.
+config DRM_SUN8I_TCON_TOP
+ tristate
+ default DRM_SUN4I if DRM_SUN8I_MIXER!=n
+ help
+ TCON TOP is responsible for configuring display pipeline for
+ HTMI, TVE and LCD.
+
endif
diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile
index cd27d02c94e2..0eb38ac8e86e 100644
--- a/drivers/gpu/drm/sun4i/Makefile
+++ b/drivers/gpu/drm/sun4i/Makefile
@@ -39,4 +39,5 @@ endif
obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o
obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o
obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o
-obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o sun8i_tcon_top.o
+obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o
+obj-$(CONFIG_DRM_SUN8I_TCON_TOP) += sun8i_tcon_top.o
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index a15feb807393..03ffbcc98dd0 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -216,7 +216,8 @@ static bool sun4i_drv_node_is_tcon_with_ch0(struct device_node *node)
static bool sun4i_drv_node_is_tcon_top(struct device_node *node)
{
- return !!of_match_node(sun8i_tcon_top_of_table, node);
+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
+ !!of_match_node(sun8i_tcon_top_of_table, node);
}
static int compare_of(struct device *dev, void *data)
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
index 21dc9ebad0b4..e184cb17690b 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
@@ -44,7 +44,8 @@ sun8i_dw_hdmi_mode_valid(struct drm_connector *connector,
static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node)
{
- return !!of_match_node(sun8i_tcon_top_of_table, node);
+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
+ !!of_match_node(sun8i_tcon_top_of_table, node);
}
static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm,
--
2.9.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-07-11 14:43 [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Arnd Bergmann @ 2018-07-12 7:35 ` Maxime Ripard 2018-09-07 9:41 ` Jon Hunter 1 sibling, 0 replies; 9+ messages in thread From: Maxime Ripard @ 2018-07-12 7:35 UTC (permalink / raw) To: Arnd Bergmann; +Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 983 bytes --] On Wed, Jul 11, 2018 at 04:43:10PM +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 adding a silent symbol for the tcon_top module, > building it as a separate module in exactly the cases that we need it, > but in a way that it is reachable by the other modules. > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Applied, thanks! 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 --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-07-11 14:43 [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Arnd Bergmann 2018-07-12 7:35 ` Maxime Ripard @ 2018-09-07 9:41 ` Jon Hunter 2018-09-07 11:26 ` Arnd Bergmann 2018-09-07 17:23 ` Naresh Kamboju 1 sibling, 2 replies; 9+ messages in thread From: Jon Hunter @ 2018-09-07 9:41 UTC (permalink / raw) To: Arnd Bergmann, Maxime Ripard, Chen-Yu Tsai Cc: dri-devel, linux-arm-kernel, linux-kernel On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, > building it as a separate module in exactly the cases that we need it, > but in a way that it is reachable by the other modules. > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> I am seeing the following on today's -next (20180907) as well the last few -next versions for that matter ... ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! Seems like this issue has cropped up again as Arnd's fix is present. I am seeing this on ARM64 builds. Cheers Jon -- nvpublic ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-07 9:41 ` Jon Hunter @ 2018-09-07 11:26 ` Arnd Bergmann 2018-09-07 11:42 ` Maxime Ripard 2018-09-07 17:23 ` Naresh Kamboju 1 sibling, 1 reply; 9+ messages in thread From: Arnd Bergmann @ 2018-09-07 11:26 UTC (permalink / raw) To: Jonathan Hunter Cc: Maxime Ripard, Chen-Yu Tsai, dri-devel, Linux ARM, Linux Kernel Mailing List On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter <jonathanh@nvidia.com> wrote: > > > On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, > > building it as a separate module in exactly the cases that we need it, > > but in a way that it is reachable by the other modules. > > > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") > > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > I am seeing the following on today's -next (20180907) as well the last > few -next versions for that matter ... > > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > > Seems like this issue has cropped up again as Arnd's fix is present. I > am seeing this on ARM64 builds. I have not started build testing on linux-next since the merge window, but looking at the changes that got queued up, I find commits cf77d79b4e29 ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both introduced a reference to the tcon_top file from sun4i_tcon.c. More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in the caller like I did in my patch would help, or alternatively one could decide to give up and just always include the TCON_TOP. Arnd ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-07 11:26 ` Arnd Bergmann @ 2018-09-07 11:42 ` Maxime Ripard 2018-09-10 12:35 ` Jon Hunter 2018-09-12 11:25 ` Matt Hart 0 siblings, 2 replies; 9+ messages in thread From: Maxime Ripard @ 2018-09-07 11:42 UTC (permalink / raw) To: Arnd Bergmann Cc: Jonathan Hunter, Chen-Yu Tsai, dri-devel, Linux ARM, Linux Kernel Mailing List, Jernej Skrabec [-- Attachment #1: Type: text/plain, Size: 3516 bytes --] On Fri, Sep 07, 2018 at 01:26:30PM +0200, Arnd Bergmann wrote: > On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter <jonathanh@nvidia.com> wrote: > > > > > > On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, > > > building it as a separate module in exactly the cases that we need it, > > > but in a way that it is reachable by the other modules. > > > > > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") > > > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > I am seeing the following on today's -next (20180907) as well the last > > few -next versions for that matter ... > > > > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > > > > Seems like this issue has cropped up again as Arnd's fix is present. I > > am seeing this on ARM64 builds. > > I have not started build testing on linux-next since the merge window, but > looking at the changes that got queued up, I find commits cf77d79b4e29 > ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and > 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both > introduced a reference to the tcon_top file from sun4i_tcon.c. > > More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in > the caller like I did in my patch would help, or alternatively one could > decide to give up and just always include the TCON_TOP. Sorry for the breakage. Can you test: ----8<---- diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 4834c90b4912..c78cd35a1294 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node) remote = of_graph_get_remote_node(node, 0, -1); if (remote) { - ret = !!of_match_node(sun8i_tcon_top_of_table, remote); + ret = !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && + of_match_node(sun8i_tcon_top_of_table, remote)); of_node_put(remote); } @@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, if (!pdev) return -EINVAL; - if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && + encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); if (ret) return ret; } - return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { + ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); + if (ret) + return ret; + } + + return 0; } static const struct sun4i_tcon_quirks sun4i_a10_quirks = { ----8<---- Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-07 11:42 ` Maxime Ripard @ 2018-09-10 12:35 ` Jon Hunter 2018-09-12 11:25 ` Matt Hart 1 sibling, 0 replies; 9+ messages in thread From: Jon Hunter @ 2018-09-10 12:35 UTC (permalink / raw) To: Maxime Ripard, Arnd Bergmann Cc: Chen-Yu Tsai, dri-devel, Linux ARM, Linux Kernel Mailing List, Jernej Skrabec On 07/09/18 12:42, Maxime Ripard wrote: > On Fri, Sep 07, 2018 at 01:26:30PM +0200, Arnd Bergmann wrote: >> On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter <jonathanh@nvidia.com> wrote: >>> >>> >>> On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, >>>> building it as a separate module in exactly the cases that we need it, >>>> but in a way that it is reachable by the other modules. >>>> >>>> Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") >>>> Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") >>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >>> I am seeing the following on today's -next (20180907) as well the last >>> few -next versions for that matter ... >>> >>> ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >>> ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >>> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >>> >>> Seems like this issue has cropped up again as Arnd's fix is present. I >>> am seeing this on ARM64 builds. >> >> I have not started build testing on linux-next since the merge window, but >> looking at the changes that got queued up, I find commits cf77d79b4e29 >> ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and >> 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both >> introduced a reference to the tcon_top file from sun4i_tcon.c. >> >> More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in >> the caller like I did in my patch would help, or alternatively one could >> decide to give up and just always include the TCON_TOP. > > Sorry for the breakage. > > Can you test: > > ----8<---- > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > index 4834c90b4912..c78cd35a1294 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > @@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node) > > remote = of_graph_get_remote_node(node, 0, -1); > if (remote) { > - ret = !!of_match_node(sun8i_tcon_top_of_table, remote); > + ret = !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > + of_match_node(sun8i_tcon_top_of_table, remote)); > of_node_put(remote); > } > > @@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, > if (!pdev) > return -EINVAL; > > - if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > + encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); > if (ret) > return ret; > } > > - return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { > + ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > + if (ret) > + return ret; > + } > + > + return 0; > } > > static const struct sun4i_tcon_quirks sun4i_a10_quirks = { > ----8<---- Yes works for me! Thanks, Jon -- nvpublic ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-07 11:42 ` Maxime Ripard 2018-09-10 12:35 ` Jon Hunter @ 2018-09-12 11:25 ` Matt Hart 2018-09-12 14:34 ` Maxime Ripard 1 sibling, 1 reply; 9+ messages in thread From: Matt Hart @ 2018-09-12 11:25 UTC (permalink / raw) To: Maxime Ripard Cc: Arnd Bergmann, Jonathan Hunter, Chen-Yu Tsai, dri-devel, Linux ARM, Linux Kernel Mailing List, Jernej Skrabec On 7 September 2018 at 12:42, Maxime Ripard <maxime.ripard@bootlin.com> wrote: > On Fri, Sep 07, 2018 at 01:26:30PM +0200, Arnd Bergmann wrote: >> On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter <jonathanh@nvidia.com> wrote: >> > >> > >> > On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, >> > > building it as a separate module in exactly the cases that we need it, >> > > but in a way that it is reachable by the other modules. >> > > >> > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") >> > > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") >> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> > I am seeing the following on today's -next (20180907) as well the last >> > few -next versions for that matter ... >> > >> > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >> > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >> > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! >> > >> > Seems like this issue has cropped up again as Arnd's fix is present. I >> > am seeing this on ARM64 builds. >> >> I have not started build testing on linux-next since the merge window, but >> looking at the changes that got queued up, I find commits cf77d79b4e29 >> ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and >> 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both >> introduced a reference to the tcon_top file from sun4i_tcon.c. >> >> More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in >> the caller like I did in my patch would help, or alternatively one could >> decide to give up and just always include the TCON_TOP. > > Sorry for the breakage. > > Can you test: > > ----8<---- > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > index 4834c90b4912..c78cd35a1294 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > @@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node) > > remote = of_graph_get_remote_node(node, 0, -1); > if (remote) { > - ret = !!of_match_node(sun8i_tcon_top_of_table, remote); > + ret = !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > + of_match_node(sun8i_tcon_top_of_table, remote)); > of_node_put(remote); > } > > @@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, > if (!pdev) > return -EINVAL; > > - if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > + encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); > if (ret) > return ret; > } > > - return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { > + ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > + if (ret) > + return ret; > + } > + > + return 0; > } > > static const struct sun4i_tcon_quirks sun4i_a10_quirks = { > ----8<---- Works for me, and still broken in todays next > > Thanks! > Maxime > > -- > Maxime Ripard, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-12 11:25 ` Matt Hart @ 2018-09-12 14:34 ` Maxime Ripard 0 siblings, 0 replies; 9+ messages in thread From: Maxime Ripard @ 2018-09-12 14:34 UTC (permalink / raw) To: Matt Hart Cc: Arnd Bergmann, Jonathan Hunter, Chen-Yu Tsai, dri-devel, Linux ARM, Linux Kernel Mailing List, Jernej Skrabec [-- Attachment #1: Type: text/plain, Size: 4239 bytes --] On Wed, Sep 12, 2018 at 12:25:54PM +0100, Matt Hart wrote: > On 7 September 2018 at 12:42, Maxime Ripard <maxime.ripard@bootlin.com> wrote: > > On Fri, Sep 07, 2018 at 01:26:30PM +0200, Arnd Bergmann wrote: > >> On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter <jonathanh@nvidia.com> wrote: > >> > > >> > > >> > On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, > >> > > building it as a separate module in exactly the cases that we need it, > >> > > but in a way that it is reachable by the other modules. > >> > > > >> > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") > >> > > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") > >> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > >> > I am seeing the following on today's -next (20180907) as well the last > >> > few -next versions for that matter ... > >> > > >> > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > >> > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > >> > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > >> > > >> > Seems like this issue has cropped up again as Arnd's fix is present. I > >> > am seeing this on ARM64 builds. > >> > >> I have not started build testing on linux-next since the merge window, but > >> looking at the changes that got queued up, I find commits cf77d79b4e29 > >> ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and > >> 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both > >> introduced a reference to the tcon_top file from sun4i_tcon.c. > >> > >> More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in > >> the caller like I did in my patch would help, or alternatively one could > >> decide to give up and just always include the TCON_TOP. > > > > Sorry for the breakage. > > > > Can you test: > > > > ----8<---- > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > index 4834c90b4912..c78cd35a1294 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > > @@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node) > > > > remote = of_graph_get_remote_node(node, 0, -1); > > if (remote) { > > - ret = !!of_match_node(sun8i_tcon_top_of_table, remote); > > + ret = !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > > + of_match_node(sun8i_tcon_top_of_table, remote)); > > of_node_put(remote); > > } > > > > @@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, > > if (!pdev) > > return -EINVAL; > > > > - if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && > > + encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { > > ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); > > if (ret) > > return ret; > > } > > > > - return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > > + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { > > + ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); > > + if (ret) > > + return ret; > > + } > > + > > + return 0; > > } > > > > static const struct sun4i_tcon_quirks sun4i_a10_quirks = { > > ----8<---- > > Works for me, and still broken in todays next I pushed that fix, thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m 2018-09-07 9:41 ` Jon Hunter 2018-09-07 11:26 ` Arnd Bergmann @ 2018-09-07 17:23 ` Naresh Kamboju 1 sibling, 0 replies; 9+ messages in thread From: Naresh Kamboju @ 2018-09-07 17:23 UTC (permalink / raw) To: Jon Hunter Cc: Arnd Bergmann, Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-arm-kernel, open list On 7 September 2018 at 15:11, Jon Hunter <jonathanh@nvidia.com> wrote: > > On 11/07/18 15:43, 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 adding a silent symbol for the tcon_top module, >> building it as a separate module in exactly the cases that we need it, >> but in a way that it is reachable by the other modules. >> >> Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs") >> Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP") >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> > I am seeing the following on today's -next (20180907) as well the last > few -next versions for that matter ... > > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! > > Seems like this issue has cropped up again as Arnd's fix is present. I > am seeing this on ARM64 builds. I do notice these failures on ARM64 builds on linux next 20180906 and 20180907. 11:40:55 | ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! 11:40:55 | ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! 11:40:55 | ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined! Build full log can be found on this link. https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DISTRO=rpb,MACHINE=dragonboard-410c,label=docker-stretch-amd64/346/console - Naresh > > Cheers > Jon > > -- > nvpublic ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-09-12 14:34 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-11 14:43 [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Arnd Bergmann 2018-07-12 7:35 ` Maxime Ripard 2018-09-07 9:41 ` Jon Hunter 2018-09-07 11:26 ` Arnd Bergmann 2018-09-07 11:42 ` Maxime Ripard 2018-09-10 12:35 ` Jon Hunter 2018-09-12 11:25 ` Matt Hart 2018-09-12 14:34 ` Maxime Ripard 2018-09-07 17:23 ` Naresh Kamboju
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).