All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-07 20:32 ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-07 20:32 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thierry Reding, David Airlie,
	Daniel Vetter, Andy Shevchenko, Randy Dunlap, Sam Ravnborg,
	Linus Walleij, Laurent Pinchart
  Cc: Arnd Bergmann, Sean Paul, dri-devel, Maxime Ripard, Emil Velikov,
	Boris Brezillon, Jani Nikula, linux-kernel

Making this IS_REACHABLE() was still wrong, as that just determines
whether the lower-level backlight code would be reachable from the panel
driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
the drm_panel_of_backlight is left out of drm_panel.o but the condition
tells the driver that it is there, leading to multiple link errors such as

ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!

Change the condition to check for whether the function was actually part
of the drm module. This version of the patch survived a few hundred
randconfig builds, so I have a good feeling this might be the last
one for the export.

Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/drm/drm_panel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 121f7aabccd1..6193cb555acc 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
 }
 #endif
 
-#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
+	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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.20.0


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

* [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-07 20:32 ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-07 20:32 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thierry Reding, David Airlie,
	Daniel Vetter, Andy Shevchenko, Randy Dunlap, Sam Ravnborg,
	Linus Walleij, Laurent Pinchart
  Cc: Arnd Bergmann, Maxime Ripard, linux-kernel, dri-devel,
	Jani Nikula, Boris Brezillon, Sean Paul, Emil Velikov

Making this IS_REACHABLE() was still wrong, as that just determines
whether the lower-level backlight code would be reachable from the panel
driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
the drm_panel_of_backlight is left out of drm_panel.o but the condition
tells the driver that it is there, leading to multiple link errors such as

ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!

Change the condition to check for whether the function was actually part
of the drm module. This version of the patch survived a few hundred
randconfig builds, so I have a good feeling this might be the last
one for the export.

Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/drm/drm_panel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 121f7aabccd1..6193cb555acc 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
 }
 #endif
 
-#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
+	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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.20.0

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

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-07 20:32 ` Arnd Bergmann
@ 2020-01-08  9:55   ` Jani Nikula
  -1 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2020-01-08  9:55 UTC (permalink / raw)
  To: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Sam Ravnborg, Linus Walleij, Laurent Pinchart
  Cc: Arnd Bergmann, Sean Paul, dri-devel, Maxime Ripard, Emil Velikov,
	Boris Brezillon, linux-kernel

On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> Making this IS_REACHABLE() was still wrong, as that just determines
> whether the lower-level backlight code would be reachable from the panel
> driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> the drm_panel_of_backlight is left out of drm_panel.o but the condition
> tells the driver that it is there, leading to multiple link errors such as
>
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
>
> Change the condition to check for whether the function was actually part
> of the drm module. This version of the patch survived a few hundred
> randconfig builds, so I have a good feeling this might be the last
> one for the export.

Broken record, this will still be wrong, even if it builds and links. No
backlight support for panel despite expectations.

See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com

All of this is just another hack until the backlight config usage is
fixed for good. Do we really want to make this the example to copy paste
wherever we hit the issue next?

I'm not naking, but I'm not acking either.

BR,
Jani.


>
> Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
> Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/drm/drm_panel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 121f7aabccd1..6193cb555acc 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
>  }
>  #endif
>  
> -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> +	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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)

-- 
Jani Nikula, Intel Open Source Graphics Center

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-08  9:55   ` Jani Nikula
  0 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2020-01-08  9:55 UTC (permalink / raw)
  To: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Sam Ravnborg, Linus Walleij, Laurent Pinchart
  Cc: Arnd Bergmann, Maxime Ripard, linux-kernel, dri-devel,
	Boris Brezillon, Sean Paul, Emil Velikov

On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> Making this IS_REACHABLE() was still wrong, as that just determines
> whether the lower-level backlight code would be reachable from the panel
> driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> the drm_panel_of_backlight is left out of drm_panel.o but the condition
> tells the driver that it is there, leading to multiple link errors such as
>
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
>
> Change the condition to check for whether the function was actually part
> of the drm module. This version of the patch survived a few hundred
> randconfig builds, so I have a good feeling this might be the last
> one for the export.

Broken record, this will still be wrong, even if it builds and links. No
backlight support for panel despite expectations.

See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com

All of this is just another hack until the backlight config usage is
fixed for good. Do we really want to make this the example to copy paste
wherever we hit the issue next?

I'm not naking, but I'm not acking either.

BR,
Jani.


>
> Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
> Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/drm/drm_panel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 121f7aabccd1..6193cb555acc 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
>  }
>  #endif
>  
> -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> +	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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)

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-08  9:55   ` Jani Nikula
@ 2020-01-08 10:08     ` Sam Ravnborg
  -1 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-08 10:08 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Linus Walleij, Laurent Pinchart, Sean Paul, dri-devel,
	Maxime Ripard, Emil Velikov, Boris Brezillon, linux-kernel

Hi Jani.

On Wed, Jan 08, 2020 at 11:55:29AM +0200, Jani Nikula wrote:
> On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > Making this IS_REACHABLE() was still wrong, as that just determines
> > whether the lower-level backlight code would be reachable from the panel
> > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> > the drm_panel_of_backlight is left out of drm_panel.o but the condition
> > tells the driver that it is there, leading to multiple link errors such as
> >
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> >
> > Change the condition to check for whether the function was actually part
> > of the drm module. This version of the patch survived a few hundred
> > randconfig builds, so I have a good feeling this might be the last
> > one for the export.
> 
> Broken record, this will still be wrong, even if it builds and links. No
> backlight support for panel despite expectations.
> 
> See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com
> 
> All of this is just another hack until the backlight config usage is
> fixed for good. Do we really want to make this the example to copy paste
> wherever we hit the issue next?
> 
> I'm not naking, but I'm not acking either.

I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
weekend. I think we need that one fixed - and then we can have this mess
with "drm_panel_of_backlight" fixed in the right way.

Sigh...

	Sam

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-08 10:08     ` Sam Ravnborg
  0 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-08 10:08 UTC (permalink / raw)
  To: Jani Nikula
  Cc: dri-devel, Arnd Bergmann, David Airlie, Randy Dunlap,
	linux-kernel, Maxime Ripard, Thierry Reding, Laurent Pinchart,
	Boris Brezillon, Andy Shevchenko, Sean Paul, Emil Velikov

Hi Jani.

On Wed, Jan 08, 2020 at 11:55:29AM +0200, Jani Nikula wrote:
> On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > Making this IS_REACHABLE() was still wrong, as that just determines
> > whether the lower-level backlight code would be reachable from the panel
> > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> > the drm_panel_of_backlight is left out of drm_panel.o but the condition
> > tells the driver that it is there, leading to multiple link errors such as
> >
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> >
> > Change the condition to check for whether the function was actually part
> > of the drm module. This version of the patch survived a few hundred
> > randconfig builds, so I have a good feeling this might be the last
> > one for the export.
> 
> Broken record, this will still be wrong, even if it builds and links. No
> backlight support for panel despite expectations.
> 
> See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com
> 
> All of this is just another hack until the backlight config usage is
> fixed for good. Do we really want to make this the example to copy paste
> wherever we hit the issue next?
> 
> I'm not naking, but I'm not acking either.

I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
weekend. I think we need that one fixed - and then we can have this mess
with "drm_panel_of_backlight" fixed in the right way.

Sigh...

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

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-08 10:08     ` Sam Ravnborg
@ 2020-01-08 10:33       ` Arnd Bergmann
  -1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-08 10:33 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jani Nikula, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Linus Walleij, Laurent Pinchart, Sean Paul, dri-devel,
	Maxime Ripard, Emil Velikov, Boris Brezillon, linux-kernel

On Wed, Jan 8, 2020 at 11:08 AM Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Jan 08, 2020 at 11:55:29AM +0200, Jani Nikula wrote:
> > On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > > Making this IS_REACHABLE() was still wrong, as that just determines
> > > whether the lower-level backlight code would be reachable from the panel
> > > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> > > the drm_panel_of_backlight is left out of drm_panel.o but the condition
> > > tells the driver that it is there, leading to multiple link errors such as
> > >
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> > >
> > > Change the condition to check for whether the function was actually part
> > > of the drm module. This version of the patch survived a few hundred
> > > randconfig builds, so I have a good feeling this might be the last
> > > one for the export.
> >
> > Broken record, this will still be wrong, even if it builds and links. No
> > backlight support for panel despite expectations.
> >
> > See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com
> >
> > All of this is just another hack until the backlight config usage is
> > fixed for good. Do we really want to make this the example to copy paste
> > wherever we hit the issue next?
> >
> > I'm not naking, but I'm not acking either.
>
> I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> weekend. I think we need that one fixed - and then we can have this mess
> with "drm_panel_of_backlight" fixed in the right way.

I had also attempted to fix the larger mess around 'select' statements in DRM/FB
around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
some point sent a patch that was acked but never merged and later broke because
of other changes.

If there is a new approach, I'm happy to add patches to my randconfig builder
and see if there are regressions in some corner cases.

      Arnd

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-08 10:33       ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-08 10:33 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Maxime Ripard, dri-devel, Jani Nikula, Randy Dunlap,
	linux-kernel, David Airlie, Thierry Reding, Laurent Pinchart,
	Boris Brezillon, Andy Shevchenko, Sean Paul, Emil Velikov

On Wed, Jan 8, 2020 at 11:08 AM Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Jan 08, 2020 at 11:55:29AM +0200, Jani Nikula wrote:
> > On Tue, 07 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > > Making this IS_REACHABLE() was still wrong, as that just determines
> > > whether the lower-level backlight code would be reachable from the panel
> > > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> > > the drm_panel_of_backlight is left out of drm_panel.o but the condition
> > > tells the driver that it is there, leading to multiple link errors such as
> > >
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> > >
> > > Change the condition to check for whether the function was actually part
> > > of the drm module. This version of the patch survived a few hundred
> > > randconfig builds, so I have a good feeling this might be the last
> > > one for the export.
> >
> > Broken record, this will still be wrong, even if it builds and links. No
> > backlight support for panel despite expectations.
> >
> > See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com
> >
> > All of this is just another hack until the backlight config usage is
> > fixed for good. Do we really want to make this the example to copy paste
> > wherever we hit the issue next?
> >
> > I'm not naking, but I'm not acking either.
>
> I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> weekend. I think we need that one fixed - and then we can have this mess
> with "drm_panel_of_backlight" fixed in the right way.

I had also attempted to fix the larger mess around 'select' statements in DRM/FB
around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
some point sent a patch that was acked but never merged and later broke because
of other changes.

If there is a new approach, I'm happy to add patches to my randconfig builder
and see if there are regressions in some corner cases.

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

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-08 10:33       ` Arnd Bergmann
@ 2020-01-08 16:46         ` Sam Ravnborg
  -1 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-08 16:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jani Nikula, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Linus Walleij, Laurent Pinchart, Sean Paul, dri-devel,
	Maxime Ripard, Emil Velikov, Boris Brezillon, linux-kernel

Hi Arnd.

> > > All of this is just another hack until the backlight config usage is
> > > fixed for good. Do we really want to make this the example to copy paste
> > > wherever we hit the issue next?
> > >
> > > I'm not naking, but I'm not acking either.
> >
> > I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> > weekend. I think we need that one fixed - and then we can have this mess
> > with "drm_panel_of_backlight" fixed in the right way.
> 
> I had also attempted to fix the larger mess around 'select' statements in DRM/FB
> around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
> some point sent a patch that was acked but never merged and later broke because
> of other changes.

Any chance you have the patch around or can dig up a pointer?
My google foo did not turn up anything.

	Sam

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-08 16:46         ` Sam Ravnborg
  0 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-08 16:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Maxime Ripard, dri-devel, Jani Nikula, Randy Dunlap,
	linux-kernel, David Airlie, Thierry Reding, Laurent Pinchart,
	Boris Brezillon, Andy Shevchenko, Sean Paul, Emil Velikov

Hi Arnd.

> > > All of this is just another hack until the backlight config usage is
> > > fixed for good. Do we really want to make this the example to copy paste
> > > wherever we hit the issue next?
> > >
> > > I'm not naking, but I'm not acking either.
> >
> > I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> > weekend. I think we need that one fixed - and then we can have this mess
> > with "drm_panel_of_backlight" fixed in the right way.
> 
> I had also attempted to fix the larger mess around 'select' statements in DRM/FB
> around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
> some point sent a patch that was acked but never merged and later broke because
> of other changes.

Any chance you have the patch around or can dig up a pointer?
My google foo did not turn up anything.

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

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-08 16:46         ` Sam Ravnborg
@ 2020-01-08 20:17           ` Arnd Bergmann
  -1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-08 20:17 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jani Nikula, Maarten Lankhorst, Maxime Ripard, Thierry Reding,
	David Airlie, Daniel Vetter, Andy Shevchenko, Randy Dunlap,
	Linus Walleij, Laurent Pinchart, Sean Paul, dri-devel,
	Maxime Ripard, Emil Velikov, Boris Brezillon, linux-kernel

On Wed, Jan 8, 2020 at 5:46 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Arnd.
>
> > > > All of this is just another hack until the backlight config usage is
> > > > fixed for good. Do we really want to make this the example to copy paste
> > > > wherever we hit the issue next?
> > > >
> > > > I'm not naking, but I'm not acking either.
> > >
> > > I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> > > weekend. I think we need that one fixed - and then we can have this mess
> > > with "drm_panel_of_backlight" fixed in the right way.
> >
> > I had also attempted to fix the larger mess around 'select' statements in DRM/FB
> > around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
> > some point sent a patch that was acked but never merged and later broke because
> > of other changes.
>
> Any chance you have the patch around or can dig up a pointer?
> My google foo did not turn up anything.

I found it now:
https://lore.kernel.org/lkml/20170726135312.2214309-1-arnd@arndb.de/

      Arnd

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-08 20:17           ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-01-08 20:17 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Maxime Ripard, dri-devel, Jani Nikula, Randy Dunlap,
	linux-kernel, David Airlie, Thierry Reding, Laurent Pinchart,
	Boris Brezillon, Andy Shevchenko, Sean Paul, Emil Velikov

On Wed, Jan 8, 2020 at 5:46 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Arnd.
>
> > > > All of this is just another hack until the backlight config usage is
> > > > fixed for good. Do we really want to make this the example to copy paste
> > > > wherever we hit the issue next?
> > > >
> > > > I'm not naking, but I'm not acking either.
> > >
> > > I will try to take a look at your old BACKLIGHT_CLASS_DEVICE patch this
> > > weekend. I think we need that one fixed - and then we can have this mess
> > > with "drm_panel_of_backlight" fixed in the right way.
> >
> > I had also attempted to fix the larger mess around 'select' statements in DRM/FB
> > around BACKLIGHT_CLASS_DEVICE  several times in the past, and even at
> > some point sent a patch that was acked but never merged and later broke because
> > of other changes.
>
> Any chance you have the patch around or can dig up a pointer?
> My google foo did not turn up anything.

I found it now:
https://lore.kernel.org/lkml/20170726135312.2214309-1-arnd@arndb.de/

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

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
  2020-01-07 20:32 ` Arnd Bergmann
@ 2020-01-12 20:22   ` Sam Ravnborg
  -1 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-12 20:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Maarten Lankhorst, Maxime Ripard, Thierry Reding, David Airlie,
	Daniel Vetter, Andy Shevchenko, Randy Dunlap, Linus Walleij,
	Laurent Pinchart, Sean Paul, dri-devel, Maxime Ripard,
	Emil Velikov, Boris Brezillon, Jani Nikula, linux-kernel

Hi Arnd.

On Tue, Jan 07, 2020 at 09:32:19PM +0100, Arnd Bergmann wrote:
> Making this IS_REACHABLE() was still wrong, as that just determines
> whether the lower-level backlight code would be reachable from the panel
> driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> the drm_panel_of_backlight is left out of drm_panel.o but the condition
> tells the driver that it is there, leading to multiple link errors such as
> 
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> 
> Change the condition to check for whether the function was actually part
> of the drm module. This version of the patch survived a few hundred
> randconfig builds, so I have a good feeling this might be the last
> one for the export.
> 
> Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
> Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I spent some hours this weekend trying to improve the Kconfig
logic around BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO.

I did manage to change something but I did not manage to make something
that is a real improvement to the current situation.
So everything abandoned.

As we need this fixed I have applied your patch to drm-misc-next.
Thanks,

	Sam

> ---
>  include/drm/drm_panel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 121f7aabccd1..6193cb555acc 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
>  }
>  #endif
>  
> -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> +	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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.20.0

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

* Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3
@ 2020-01-12 20:22   ` Sam Ravnborg
  0 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2020-01-12 20:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jani Nikula, dri-devel, David Airlie, Randy Dunlap, linux-kernel,
	Maxime Ripard, Thierry Reding, Laurent Pinchart, Boris Brezillon,
	Andy Shevchenko, Sean Paul, Emil Velikov

Hi Arnd.

On Tue, Jan 07, 2020 at 09:32:19PM +0100, Arnd Bergmann wrote:
> Making this IS_REACHABLE() was still wrong, as that just determines
> whether the lower-level backlight code would be reachable from the panel
> driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m,
> the drm_panel_of_backlight is left out of drm_panel.o but the condition
> tells the driver that it is there, leading to multiple link errors such as
> 
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined!
> ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined!
> 
> Change the condition to check for whether the function was actually part
> of the drm module. This version of the patch survived a few hundred
> randconfig builds, so I have a good feeling this might be the last
> one for the export.
> 
> Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time")
> Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight")
> Fixes: 152dbdeab1b2 ("drm/panel: add backlight support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I spent some hours this weekend trying to improve the Kconfig
logic around BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO.

I did manage to change something but I did not manage to make something
that is a real improvement to the current situation.
So everything abandoned.

As we need this fixed I have applied your patch to drm-misc-next.
Thanks,

	Sam

> ---
>  include/drm/drm_panel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 121f7aabccd1..6193cb555acc 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
>  }
>  #endif
>  
> -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> +	(IS_MODULE(CONFIG_DRM) && IS_MODULE(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.20.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-01-12 20:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 20:32 [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3 Arnd Bergmann
2020-01-07 20:32 ` Arnd Bergmann
2020-01-08  9:55 ` Jani Nikula
2020-01-08  9:55   ` Jani Nikula
2020-01-08 10:08   ` Sam Ravnborg
2020-01-08 10:08     ` Sam Ravnborg
2020-01-08 10:33     ` Arnd Bergmann
2020-01-08 10:33       ` Arnd Bergmann
2020-01-08 16:46       ` Sam Ravnborg
2020-01-08 16:46         ` Sam Ravnborg
2020-01-08 20:17         ` Arnd Bergmann
2020-01-08 20:17           ` Arnd Bergmann
2020-01-12 20:22 ` Sam Ravnborg
2020-01-12 20:22   ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.