drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
Subsystems (4)
PATCH 1/1 drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
The initial commit followed by the fix didn't take into consideration the case
CONFIG_DRM_PANEL=yCONFIG_BACKLIGHT_CLASS_DEVICE=mCONFIG_DRM_I915=y
where symbol devm_of_find_backlight() is not reachable from DRM subsystem. Quick fix is to avoid drm_panel_of_backlight() from exporting in such case.
--- drivers/gpu/drm/drm_panel.c | 2 +- include/drm/drm_panel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_panel.c +1 -1
@@ -302,7 +302,7 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np)EXPORT_SYMBOL (of_drm_find_panel);#endif -#if IS_ENABLED (CONFIG_BACKLIGHT_CLASS_DEVICE ) +#if IS_REACHABLE (CONFIG_BACKLIGHT_CLASS_DEVICE )/** * drm_panel_of_backlight - use backlight device node for backlight * @panel: DRM panel
include/drm/drm_panel.h +1 -1
@@ -198,7 +198,7 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) }#endif -#if IS_ENABLED (CONFIG_BACKLIGHT_CLASS_DEVICE ) +#if IS_REACHABLE (CONFIG_BACKLIGHT_CLASS_DEVICE )int drm_panel_of_backlight (struct drm_panel *panel);#else static inline int drm_panel_of_backlight (struct drm_panel *panel)
Signature · 1 line
2.24.0
Quoted 9 lines · Andy Shevchenko
The initial commit followed by the fix didn't take into consideration the case
CONFIG_DRM_PANEL=yCONFIG_BACKLIGHT_CLASS_DEVICE=mCONFIG_DRM_I915=ywhere symbol
devm_of_find_backlight()is not reachable from DRM subsystem. Quick fix is to avoiddrm_panel_of_backlight()from exporting in such case.
Quoted 13 lines
Fixes 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")Reported-by Randy Dunlap <[email protected]>Cc Linus Walleij <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Thierry Reding <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Yes, that fixes the build error. Thanks.
Quoted 32 lines
--- drivers/gpu/drm/drm_panel.c | 2 +- include/drm/drm_panel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_panel.c +1
-1@@ -302,7 +302,7 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np)EXPORT_SYMBOL (of_drm_find_panel);#endif -#if IS_ENABLED (CONFIG_BACKLIGHT_CLASS_DEVICE ) +#if IS_REACHABLE (CONFIG_BACKLIGHT_CLASS_DEVICE )/** * drm_panel_of_backlight - use backlight device node for backlight * @panel: DRM panel include/drm/drm_panel.h +1
-1@@ -198,7 +198,7 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) }#endif -#if IS_ENABLED (CONFIG_BACKLIGHT_CLASS_DEVICE ) +#if IS_REACHABLE (CONFIG_BACKLIGHT_CLASS_DEVICE )int drm_panel_of_backlight (struct drm_panel *panel);#else static inline int drm_panel_of_backlight (struct drm_panel *panel)
Signature · 1 line
~Randy
Quoted 24 lines · Randy Dunlap
Quoted 9 lines · Andy Shevchenko
The initial commit followed by the fix didn't take into consideration the case
CONFIG_DRM_PANEL=yCONFIG_BACKLIGHT_CLASS_DEVICE=mCONFIG_DRM_I915=ywhere symbol
devm_of_find_backlight()is not reachable from DRM subsystem. Quick fix is to avoiddrm_panel_of_backlight()from exporting in such case.Quoted 13 lines
Fixes 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")Reported-by Randy Dunlap <[email protected]>Cc Linus Walleij <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Thierry Reding <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Quoted 3 lines
Yes, that fixes the build error. Thanks.
Hi Andy - thanks for fixing this. And thanks Randy for verifying the fix.
It passed my build test and is now pushed to drm-misc-next.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 25 lines · Sam Ravnborg
Quoted 24 lines · Randy Dunlap
Quoted 22 lines · Andy Shevchenko
The initial commit followed by the fix didn't take into consideration the case
CONFIG_DRM_PANEL=yCONFIG_BACKLIGHT_CLASS_DEVICE=mCONFIG_DRM_I915=ywhere symbol
devm_of_find_backlight()is not reachable from DRM subsystem. Quick fix is to avoiddrm_panel_of_backlight()from exporting in such case.Fixes 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")Reported-by Randy Dunlap <[email protected]>Cc Linus Walleij <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Thierry Reding <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Quoted 7 lines
Quoted 3 lines
Yes, that fixes the build error. Thanks.
Hi Andy - thanks for fixing this. And thanks Randy for verifying the fix.
It passed my build test and is now pushed to drm-misc-next.
As I wrote in [1], this allows a configuration that builds and links, but is silently broken. You won't get backlight support in drm panel which would be a reasonable expectation with CONFIG_BACKLIGHT_CLASS_DEVICE=m.
BR,
Jani.
[1] http://mid.mail-archive.com/[email protected]
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Hi Jani.
Quoted 4 lines
As I wrote in [1], this allows a configuration that builds and links, but is silently broken. You won't get backlight support in drm panel which would be a reasonable expectation with
CONFIG_BACKLIGHT_CLASS_DEVICE=m.
Agreed - it needs to be improved. But right now we had to fix the build breakage.
http://lore.kernel.org/r/[email protected]
is added to my TODO list.
May take a stamp on this over xmas.
Sam