Re: [PATCH v5 4/4] drm/tinydrm: select BACKLIGHT_LCD_SUPPORT, BACKLIGHT_CLASS_DEVICE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Den 30.09.2017 11.10, skrev Meghana Madhyastha:
Add select BACKLIGHT_LCD_SUPPORT, BACKLIGHT_CLASS_DEVICE to
the Kconfig of drm. This is required for the successful build of
drm_of_find_backlight helpers.

Signed-off-by: Meghana Madhyastha <meghana.madhyastha@xxxxxxxxx>
---
Changes in v5:
-This commit was not present in v4. Selecting BACKLIGHT_LCD_SUPPORT,
BACKLIGHT_CLASS_DEVICE in the Kconfig file under the symbol DRM seems
to fix the Kbuild error drm_of.c:(.text+0x3bc): undefined reference to
`of_find_backlight_by_node'.

  drivers/gpu/drm/Kconfig | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 83cb2a8..3ba5632 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -7,6 +7,8 @@
  menuconfig DRM
  	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
  	depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
+	select BACKLIGHT_LCD_SUPPORT
+	select BACKLIGHT_CLASS_DEVICE
  	select HDMI
  	select FB_CMDLINE
  	select I2C

A night's sleep has made this more clear, we don't need 'depends on'
or select as you have tried here, it's enough that we make a change in
the backlight subsystem as I outlined earlier:

include/linux/backlight.h:

-#ifdef CONFIG_OF
+#if defined(CONFIG_OF) && IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
 struct backlight_device *of_find_backlight_by_node(struct device_node *node);
 #else
 static inline struct backlight_device *
 of_find_backlight_by_node(struct device_node *node)
 {
     return NULL;
 }
 #endif

Now we don't have to care about backlight being built-in, module or disabled.

This patch has to be the first in the patchset. No single patch can break anything
even if it's fixed later. This is so people can bisect.

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux