Skip to contentSkip to conversation

drm/panel: rm68200: add backlight dependency

PATCH In review Arnd Bergmann 2 participants 4 messages Mar 13, 2018 – Mar 14, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: rm68200: add backlight dependency

Like many other panel drivers, this one fails to build when backlight support is disabled:

drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe':
panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight'

This adds the appropriate dependency.

Fixes 2b7ed18bed1a ("drm/panel: Add support for Raydium RM68200 panel driver")
---
 drivers/gpu/drm/panel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/Kconfig +1 -0
index 077bc58c1913..25682ff3449a 100644
@@ -112,6 +112,7 @@ config DRM_PANEL_RAYDIUM_RM68200
 	tristate "Raydium RM68200 720x1280 DSI video mode panel"
 	depends on OF
 	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
 	help
 	  Say Y here if you want to enable support for Raydium RM68200
 	  720x1280 DSI video mode panel.
Signature · 6 lines
2.9.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 6 lines · Arnd Bergmann

Like many other panel drivers, this one fails to build when backlight support is disabled:

drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe':
panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight'

Quoted 7 lines

This adds the appropriate dependency.

Fixes 2b7ed18bed1a ("drm/panel: Add support for Raydium RM68200 panel driver")
---
 drivers/gpu/drm/panel/Kconfig | 1 +
 1 file changed, 1 insertion(+)

This shouldn't be necessary. include/linux/backlight.h defines a stub if the backlight class is not enabled.

What tree are you seeing this on?

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 15 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

Like many other panel drivers, this one fails to build when backlight support is disabled:

drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe':
panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight'

Quoted 7 lines

This adds the appropriate dependency.

Fixes 2b7ed18bed1a ("drm/panel: Add support for Raydium RM68200 panel driver")
---
 drivers/gpu/drm/panel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 4 lines

This shouldn't be necessary. include/linux/backlight.h defines a stub if the backlight class is not enabled.

What tree are you seeing this on?

This is on linux-next.

It must be with BACKLIGHT_CLASS_DEVICE=m and DRM_PANEL_RAYDIUM_RM68200=y, meaning that it should be sufficient to do

    depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

to force DRM_PANEL_RAYDIUM_RM68200 to be a loadable module whenever BACKLIGHT_CLASS_DEVICE=m. For the patch, I looked at what the other drivers in the same directory do and followed their example.

I see three options here:

1. update my patch changelog with the explanation I wrote here but leave it untouched
2. use the more elaborate dependency (after testing) but not change the others
3. change all panel drivers with a backlight dependency the same way, possibly with a helper symbol like

config BACKLIGHT_CLASS_DEVICE_OPTIONAL
tristate
default m if BACKLIGHT_CLASS_DEVICE=m
default y

Arnd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 44 lines · Arnd Bergmann
Quoted 15 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

Like many other panel drivers, this one fails to build when backlight support is disabled:

drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe':
panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight'

Quoted 7 lines

This adds the appropriate dependency.

Fixes 2b7ed18bed1a ("drm/panel: Add support for Raydium RM68200 panel driver")
---
 drivers/gpu/drm/panel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 4 lines

This shouldn't be necessary. include/linux/backlight.h defines a stub if the backlight class is not enabled.

What tree are you seeing this on?

This is on linux-next.

It must be with BACKLIGHT_CLASS_DEVICE=m and DRM_PANEL_RAYDIUM_RM68200=y, meaning that it should be sufficient to do

    depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

to force DRM_PANEL_RAYDIUM_RM68200 to be a loadable module whenever BACKLIGHT_CLASS_DEVICE=m. For the patch, I looked at what the other drivers in the same directory do and followed their example.

I see three options here:

1. update my patch changelog with the explanation I wrote here but leave it untouched
2. use the more elaborate dependency (after testing) but not change the others
3. change all panel drivers with a backlight dependency the same way, possibly with a helper symbol like

Quoted 6 lines

config BACKLIGHT_CLASS_DEVICE_OPTIONAL
tristate
default m if BACKLIGHT_CLASS_DEVICE=m
default y

Arnd

I went with option 1) and added some text that hopefully clarifies the issue.

	https://cgit.freedesktop.org/drm/drm-misc/commit/?id=a8efe516316472ac771ba3f591295c7515e46172

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel