dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight
@ 2019-12-10 19:47 Sam Ravnborg
  2019-12-10 21:29 ` Linus Walleij
  2019-12-16 18:03 ` powernv build issue David Hildenbrand
  0 siblings, 2 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-12-10 19:47 UTC (permalink / raw)
  To: dri-devel, Thierry Reding, Laurent Pinchart, Linus Walleij,
	Sam Ravnborg
  Cc: Maxime Ripard, David Airlie, Sean Paul

Fix link failure for module builds of panels.
The conditional compilation around drm_panel_of_backlight()
was wrong for a module build.
Fix it using IS_ENABLED().

Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/drm_panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index 03395ad4d907..79ff3fdf6f6e 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -302,7 +302,7 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np)
 EXPORT_SYMBOL(of_drm_find_panel);
 #endif
 
-#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
 /**
  * drm_panel_of_backlight - use backlight device node for backlight
  * @panel: DRM panel
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight
  2019-12-10 19:47 [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight Sam Ravnborg
@ 2019-12-10 21:29 ` Linus Walleij
  2019-12-11  0:23   ` Sam Ravnborg
  2019-12-16 18:03 ` powernv build issue David Hildenbrand
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2019-12-10 21:29 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Maxime Ripard, open list:DRM PANEL DRIVERS, David Airlie,
	Thierry Reding, Laurent Pinchart, Sean Paul

On Tue, Dec 10, 2019 at 8:48 PM Sam Ravnborg <sam@ravnborg.org> wrote:

> Fix link failure for module builds of panels.
> The conditional compilation around drm_panel_of_backlight()
> was wrong for a module build.
> Fix it using IS_ENABLED().
>
> Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Looks like the right fix to me:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight
  2019-12-10 21:29 ` Linus Walleij
@ 2019-12-11  0:23   ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-12-11  0:23 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Maxime Ripard, open list:DRM PANEL DRIVERS, David Airlie,
	Thierry Reding, Laurent Pinchart, Sean Paul

Hi Linus.

On Tue, Dec 10, 2019 at 10:29:59PM +0100, Linus Walleij wrote:
> On Tue, Dec 10, 2019 at 8:48 PM Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > Fix link failure for module builds of panels.
> > The conditional compilation around drm_panel_of_backlight()
> > was wrong for a module build.
> > Fix it using IS_ENABLED().
> >
> > Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> 
> Looks like the right fix to me:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks, patch pushed to drm-misc-next so we have this fixed.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* powernv build issue
  2019-12-10 19:47 [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight Sam Ravnborg
  2019-12-10 21:29 ` Linus Walleij
@ 2019-12-16 18:03 ` David Hildenbrand
  2019-12-18  9:26   ` Sam Ravnborg
  1 sibling, 1 reply; 5+ messages in thread
From: David Hildenbrand @ 2019-12-16 18:03 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: DRI Development

Hi,

the patch "drm/drm_panel: fix EXPORT of drm_panel_of_backlight" in
linux-next breaks the powernv build:

desktop: ~/git/linux-ppc memtrace $ ./compile.sh
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x2fc8): Section mismatch in reference from the
variable start_here_common to the function .init.text:start_kernel()
The function start_here_common() references
the function __init start_kernel().
This is often because start_here_common lacks a __init
annotation or the annotation of start_kernel is wrong.

  MODINFO modules.builtin.modinfo
  LD      .tmp_vmlinux1
ppc64-linux-gnu-ld: drivers/gpu/drm/drm_panel.o: in function
`drm_panel_of_backlight':
(.text+0x434): undefined reference to `devm_of_find_backlight'
make: *** [Makefile:1079: vmlinux] Fehler 1

Reverting it makes it compile again. (not exploring the root issue, I
just need a powernv built and reverting that commit did the trick )

-- 
Thanks,

David / dhildenb

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: powernv build issue
  2019-12-16 18:03 ` powernv build issue David Hildenbrand
@ 2019-12-18  9:26   ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-12-18  9:26 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: DRI Development

Hi David.

On Mon, Dec 16, 2019 at 07:03:17PM +0100, David Hildenbrand wrote:
> Hi,
> 
> the patch "drm/drm_panel: fix EXPORT of drm_panel_of_backlight" in
> linux-next breaks the powernv build:
> 
> desktop: ~/git/linux-ppc memtrace $ ./compile.sh
>   CALL    scripts/atomic/check-atomics.sh
>   CALL    scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   GEN     .version
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   AR      init/built-in.a
>   LD      vmlinux.o
>   MODPOST vmlinux.o
> WARNING: vmlinux.o(.text+0x2fc8): Section mismatch in reference from the
> variable start_here_common to the function .init.text:start_kernel()
> The function start_here_common() references
> the function __init start_kernel().
> This is often because start_here_common lacks a __init
> annotation or the annotation of start_kernel is wrong.
> 
>   MODINFO modules.builtin.modinfo
>   LD      .tmp_vmlinux1
> ppc64-linux-gnu-ld: drivers/gpu/drm/drm_panel.o: in function
> `drm_panel_of_backlight':
> (.text+0x434): undefined reference to `devm_of_find_backlight'
> make: *** [Makefile:1079: vmlinux] Fehler 1
> 
> Reverting it makes it compile again. (not exploring the root issue, I
> just need a powernv built and reverting that commit did the trick )
Thanks for the report.

Andy already provided a fix that is now applied to drm-misc-next - and
should show up in -next within a day.
Sorry for the troubles!

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-18  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-10 19:47 [PATCH] drm/drm_panel: fix EXPORT of drm_panel_of_backlight Sam Ravnborg
2019-12-10 21:29 ` Linus Walleij
2019-12-11  0:23   ` Sam Ravnborg
2019-12-16 18:03 ` powernv build issue David Hildenbrand
2019-12-18  9:26   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox