Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1611729 > unrolled thread

[PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE

Started byTobias Regnery <tobias.regnery@gmail.com>
First post2017-03-29 11:40 +0200
Last post2017-03-31 08:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-29 11:40 +0200
    Re: [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE Jani Nikula <jani.nikula@linux.intel.com> - 2017-03-30 09:00 +0200
      Re: [PATCH] drm/i915: fix build error without  CONFIG_BACKLIGHT_CLASS_DEVICE Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-31 08:40 +0200

#1611729 — [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE

FromTobias Regnery <tobias.regnery@gmail.com>
Date2017-03-29 11:40 +0200
Subject[PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE
Message-ID<tqif7-4VF-5@gated-at.bofh.it>
With CONFIG_ACPI=n and CONFIG_BACKLIGHT_CLASS_DEVICE=n we see the following
link error in the i915 driver:

drivers/built-in.o: In function 'intel_backlight_device_register':
(.text+0x2a921d): undefined reference to 'backlight_device_register'

Fix this by removing the condition on ACPI from the appropriate select
statement.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
 drivers/gpu/drm/i915/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index a5cd5dacf055..532df4bb9283 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -15,7 +15,7 @@ config DRM_I915
 	# i915 depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
 	select BACKLIGHT_LCD_SUPPORT if ACPI
-	select BACKLIGHT_CLASS_DEVICE if ACPI
+	select BACKLIGHT_CLASS_DEVICE
 	select INPUT if ACPI
 	select ACPI_VIDEO if ACPI
 	select ACPI_BUTTON if ACPI
-- 
2.11.0

[toc] | [next] | [standalone]


#1612618

FromJani Nikula <jani.nikula@linux.intel.com>
Date2017-03-30 09:00 +0200
Message-ID<tqCdQ-2l8-17@gated-at.bofh.it>
In reply to#1611729
On Wed, 29 Mar 2017, Tobias Regnery <tobias.regnery@gmail.com> wrote:
> With CONFIG_ACPI=n and CONFIG_BACKLIGHT_CLASS_DEVICE=n we see the following
> link error in the i915 driver:
>
> drivers/built-in.o: In function 'intel_backlight_device_register':
> (.text+0x2a921d): undefined reference to 'backlight_device_register'
>
> Fix this by removing the condition on ACPI from the appropriate select
> statement.

The right fix for the build problem is to add empty stub functions for
BACKLIGHT_CLASS_DEVICE=n in include/linux/backlight.h. I'm frankly
surprised nobody's done that yet.

It's another question whether we should support and select backlight for
ACPI=n, and yet another question whether we should support ACPI=n.

Also, selecting BACKLIGHT_CLASS_DEVICE is fundamentally broken, but
people aren't interested [1].


BR,
Jani.

[1] http://mid.mail-archive.com/1413580403-16225-1-git-send-email-jani.nikula@intel.com

>
> Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
> ---
>  drivers/gpu/drm/i915/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index a5cd5dacf055..532df4bb9283 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -15,7 +15,7 @@ config DRM_I915
>  	# i915 depends on ACPI_VIDEO when ACPI is enabled
>  	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
>  	select BACKLIGHT_LCD_SUPPORT if ACPI
> -	select BACKLIGHT_CLASS_DEVICE if ACPI
> +	select BACKLIGHT_CLASS_DEVICE
>  	select INPUT if ACPI
>  	select ACPI_VIDEO if ACPI
>  	select ACPI_BUTTON if ACPI

-- 
Jani Nikula, Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1613661 — Re: [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE

FromTobias Regnery <tobias.regnery@gmail.com>
Date2017-03-31 08:40 +0200
SubjectRe: [PATCH] drm/i915: fix build error without CONFIG_BACKLIGHT_CLASS_DEVICE
Message-ID<tqYo1-UX-11@gated-at.bofh.it>
In reply to#1612618
On 30.03.17, Jani Nikula wrote:
> On Wed, 29 Mar 2017, Tobias Regnery <tobias.regnery@gmail.com> wrote:
> > With CONFIG_ACPI=n and CONFIG_BACKLIGHT_CLASS_DEVICE=n we see the following
> > link error in the i915 driver:
> >
> > drivers/built-in.o: In function 'intel_backlight_device_register':
> > (.text+0x2a921d): undefined reference to 'backlight_device_register'
> >
> > Fix this by removing the condition on ACPI from the appropriate select
> > statement.
> 
> The right fix for the build problem is to add empty stub functions for
> BACKLIGHT_CLASS_DEVICE=n in include/linux/backlight.h. I'm frankly
> surprised nobody's done that yet.

Thanks for the advice, I will try to come up with a patch.

--
Tobias

> 
> It's another question whether we should support and select backlight for
> ACPI=n, and yet another question whether we should support ACPI=n.
> 
> Also, selecting BACKLIGHT_CLASS_DEVICE is fundamentally broken, but
> people aren't interested [1].
> 
> 
> BR,
> Jani.
> 
> [1] http://mid.mail-archive.com/1413580403-16225-1-git-send-email-jani.nikula@intel.com
> 
> >
> > Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
> > ---
> >  drivers/gpu/drm/i915/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> > index a5cd5dacf055..532df4bb9283 100644
> > --- a/drivers/gpu/drm/i915/Kconfig
> > +++ b/drivers/gpu/drm/i915/Kconfig
> > @@ -15,7 +15,7 @@ config DRM_I915
> >  	# i915 depends on ACPI_VIDEO when ACPI is enabled
> >  	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
> >  	select BACKLIGHT_LCD_SUPPORT if ACPI
> > -	select BACKLIGHT_CLASS_DEVICE if ACPI
> > +	select BACKLIGHT_CLASS_DEVICE
> >  	select INPUT if ACPI
> >  	select ACPI_VIDEO if ACPI
> >  	select ACPI_BUTTON if ACPI
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web