* [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
@ 2019-12-17 14:07 Andy Shevchenko
2019-12-17 16:25 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2019-12-17 14:07 UTC (permalink / raw)
To: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List
Cc: Andy Shevchenko, Linus Walleij, Sam Ravnborg, Laurent Pinchart,
Thierry Reding, Maarten Lankhorst, Sean Paul, David Airlie,
Daniel Vetter, Maxime Ripard, dri-devel
The initial commit followed by the fix didn't take into consideration the case
CONFIG_DRM_PANEL=y
CONFIG_BACKLIGHT_CLASS_DEVICE=m
CONFIG_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.
Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
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: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpu/drm/drm_panel.c | 2 +-
include/drm/drm_panel.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index 79ff3fdf6f6e..8c7bac85a793 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
-#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
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 5f27b693e1a0..121f7aabccd1 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -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)
--
2.24.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
2019-12-17 14:07 [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time Andy Shevchenko
@ 2019-12-17 16:25 ` Randy Dunlap
2019-12-17 19:40 ` Sam Ravnborg
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2019-12-17 16:25 UTC (permalink / raw)
To: Andy Shevchenko, Stephen Rothwell, Linux Next Mailing List
Cc: Linus Walleij, Sam Ravnborg, Laurent Pinchart, Thierry Reding,
Maarten Lankhorst, Sean Paul, David Airlie, Daniel Vetter,
Maxime Ripard, dri-devel
On 12/17/19 6:07 AM, Andy Shevchenko wrote:
> The initial commit followed by the fix didn't take into consideration the case
>
> CONFIG_DRM_PANEL=y
> CONFIG_BACKLIGHT_CLASS_DEVICE=m
> CONFIG_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.
>
> Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> 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: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Yes, that fixes the build error. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> ---
> drivers/gpu/drm/drm_panel.c | 2 +-
> include/drm/drm_panel.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
> index 79ff3fdf6f6e..8c7bac85a793 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
>
> -#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
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 5f27b693e1a0..121f7aabccd1 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -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)
>
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
2019-12-17 16:25 ` Randy Dunlap
@ 2019-12-17 19:40 ` Sam Ravnborg
2019-12-18 10:30 ` Jani Nikula
0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2019-12-17 19:40 UTC (permalink / raw)
To: Randy Dunlap
Cc: Andy Shevchenko, Stephen Rothwell, Linux Next Mailing List,
Linus Walleij, Laurent Pinchart, Thierry Reding,
Maarten Lankhorst, Sean Paul, David Airlie, Daniel Vetter,
Maxime Ripard, dri-devel
On Tue, Dec 17, 2019 at 08:25:03AM -0800, Randy Dunlap wrote:
> On 12/17/19 6:07 AM, Andy Shevchenko wrote:
> > The initial commit followed by the fix didn't take into consideration the case
> >
> > CONFIG_DRM_PANEL=y
> > CONFIG_BACKLIGHT_CLASS_DEVICE=m
> > CONFIG_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.
> >
> > Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > 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: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Yes, that fixes the build error. Thanks.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
2019-12-17 19:40 ` Sam Ravnborg
@ 2019-12-18 10:30 ` Jani Nikula
2019-12-18 10:47 ` Sam Ravnborg
0 siblings, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2019-12-18 10:30 UTC (permalink / raw)
To: Sam Ravnborg, Randy Dunlap
Cc: Stephen Rothwell, dri-devel, David Airlie, Thierry Reding,
Linux Next Mailing List, Andy Shevchenko, Sean Paul,
Laurent Pinchart
On Tue, 17 Dec 2019, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Dec 17, 2019 at 08:25:03AM -0800, Randy Dunlap wrote:
>> On 12/17/19 6:07 AM, Andy Shevchenko wrote:
>> > The initial commit followed by the fix didn't take into consideration the case
>> >
>> > CONFIG_DRM_PANEL=y
>> > CONFIG_BACKLIGHT_CLASS_DEVICE=m
>> > CONFIG_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.
>> >
>> > Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
>> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
>> > Cc: Linus Walleij <linus.walleij@linaro.org>
>> > 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: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> Yes, that fixes the build error. Thanks.
>>
>> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>
> 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/87d0cnynst.fsf@intel.com
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time
2019-12-18 10:30 ` Jani Nikula
@ 2019-12-18 10:47 ` Sam Ravnborg
0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-12-18 10:47 UTC (permalink / raw)
To: Jani Nikula
Cc: Randy Dunlap, Stephen Rothwell, dri-devel, David Airlie,
Thierry Reding, Linux Next Mailing List, Andy Shevchenko,
Sean Paul, Laurent Pinchart
Hi Jani.
> 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/1413580403-16225-1-git-send-email-jani.nikula@intel.com
is added to my TODO list.
May take a stamp on this over xmas.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-18 10:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 14:07 [PATCH v1 1/1] drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time Andy Shevchenko
2019-12-17 16:25 ` Randy Dunlap
2019-12-17 19:40 ` Sam Ravnborg
2019-12-18 10:30 ` Jani Nikula
2019-12-18 10:47 ` Sam Ravnborg
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).