2022-10-04 10:49:45

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH 1/2] drm/i915/display: fix randconfig build

When DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m, the build fails:
ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_register':
intel_backlight.c:(.text+0x5587): undefined reference to `backlight_device_get_by_name'

ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_unregister':
intel_backlight.c:(.text+0x576e): undefined reference to `backlight_device_unregister'

To fix this, use IS_REACHABLE(), not IS_ENABLED() in backlight. That is,
with the above config, backlight support is disabled.

Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reported-by: Martin Liška <[email protected]>
Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
---
drivers/gpu/drm/i915/display/intel_backlight.c | 2 +-
drivers/gpu/drm/i915/display/intel_backlight.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
index beba39a38c87..c1ba68796b6d 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -825,7 +825,7 @@ void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
mutex_unlock(&dev_priv->display.backlight.lock);
}

-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
static u32 intel_panel_get_backlight(struct intel_connector *connector)
{
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
diff --git a/drivers/gpu/drm/i915/display/intel_backlight.h b/drivers/gpu/drm/i915/display/intel_backlight.h
index 339643f63897..207fe1c613d8 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.h
+++ b/drivers/gpu/drm/i915/display/intel_backlight.h
@@ -36,7 +36,7 @@ u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 leve
u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);

-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
int intel_backlight_device_register(struct intel_connector *connector);
void intel_backlight_device_unregister(struct intel_connector *connector);
#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
--
2.37.3


2022-10-04 10:50:18

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH 2/2] drm/i915: remove circ_buf.h includes

The last user of macros from that include was removed in 2018 by the
commit below.

Fixes: 6cc42152b02b ("drm/i915: Remove support for legacy debugfs crc interface")
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
---
drivers/gpu/drm/i915/display/intel_pipe_crc.c | 1 -
drivers/gpu/drm/i915/i915_irq.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
index 8ac263f471be..9070935b0443 100644
--- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
@@ -24,7 +24,6 @@
*
*/

-#include <linux/circ_buf.h>
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 86a42d9e8041..09d728b34a47 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -28,7 +28,6 @@

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

-#include <linux/circ_buf.h>
#include <linux/slab.h>
#include <linux/sysrq.h>

--
2.37.3

2022-10-04 11:43:50

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH 1/2] drm/i915/display: fix randconfig build

On Tue, 04 Oct 2022, "Jiri Slaby (SUSE)" <[email protected]> wrote:
> When DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m, the build fails:
> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_register':
> intel_backlight.c:(.text+0x5587): undefined reference to `backlight_device_get_by_name'
>
> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_unregister':
> intel_backlight.c:(.text+0x576e): undefined reference to `backlight_device_unregister'
>
> To fix this, use IS_REACHABLE(), not IS_ENABLED() in backlight. That is,
> with the above config, backlight support is disabled.

So I don't want this. I'll take a patch that fixes the dependencies to
block DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m. Nobody wants that combo,
and IMO using IS_REACHABLE() is a workaround to hide a broken config
under the carpet.

The right thing to do is

config DRM_I915
depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n.

We're selecting BACKLIGHT_CLASS_DEVICE because almost everyone else is
too, and a combo of selecting and depending leads to circular
dependencies. But depending is the right fix.

Documentation/kbuild/kconfig-language.rst:

Note:
select should be used with care. select will force
a symbol to a value without visiting the dependencies.
By abusing select you are able to select a symbol FOO even
if FOO depends on BAR that is not set.
In general use select only for non-visible symbols
(no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.


BR,
Jani.

>
> Cc: Jani Nikula <[email protected]>
> Cc: Joonas Lahtinen <[email protected]>
> Cc: Rodrigo Vivi <[email protected]>
> Cc: Tvrtko Ursulin <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: Martin Liška <[email protected]>
> Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
> ---
> drivers/gpu/drm/i915/display/intel_backlight.c | 2 +-
> drivers/gpu/drm/i915/display/intel_backlight.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
> index beba39a38c87..c1ba68796b6d 100644
> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
> @@ -825,7 +825,7 @@ void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
> mutex_unlock(&dev_priv->display.backlight.lock);
> }
>
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> static u32 intel_panel_get_backlight(struct intel_connector *connector)
> {
> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.h b/drivers/gpu/drm/i915/display/intel_backlight.h
> index 339643f63897..207fe1c613d8 100644
> --- a/drivers/gpu/drm/i915/display/intel_backlight.h
> +++ b/drivers/gpu/drm/i915/display/intel_backlight.h
> @@ -36,7 +36,7 @@ u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 leve
> u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
> u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);
>
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
> int intel_backlight_device_register(struct intel_connector *connector);
> void intel_backlight_device_unregister(struct intel_connector *connector);
> #else /* CONFIG_BACKLIGHT_CLASS_DEVICE */

--
Jani Nikula, Intel Open Source Graphics Center

2022-10-04 11:46:14

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH 2/2] drm/i915: remove circ_buf.h includes

On Tue, 04 Oct 2022, "Jiri Slaby (SUSE)" <[email protected]> wrote:
> The last user of macros from that include was removed in 2018 by the
> commit below.
>
> Fixes: 6cc42152b02b ("drm/i915: Remove support for legacy debugfs crc interface")
> Cc: Jani Nikula <[email protected]>
> Cc: Joonas Lahtinen <[email protected]>
> Cc: Rodrigo Vivi <[email protected]>
> Cc: Tvrtko Ursulin <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Jiri Slaby (SUSE) <[email protected]>

Reviewed-by: Jani Nikula <[email protected]>

> ---
> drivers/gpu/drm/i915/display/intel_pipe_crc.c | 1 -
> drivers/gpu/drm/i915/i915_irq.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> index 8ac263f471be..9070935b0443 100644
> --- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> @@ -24,7 +24,6 @@
> *
> */
>
> -#include <linux/circ_buf.h>
> #include <linux/ctype.h>
> #include <linux/debugfs.h>
> #include <linux/seq_file.h>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 86a42d9e8041..09d728b34a47 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -28,7 +28,6 @@
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> -#include <linux/circ_buf.h>
> #include <linux/slab.h>
> #include <linux/sysrq.h>

--
Jani Nikula, Intel Open Source Graphics Center

2022-10-05 11:23:15

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH 1/2] drm/i915/display: fix randconfig build

On 04. 10. 22, 12:52, Jani Nikula wrote:
> On Tue, 04 Oct 2022, "Jiri Slaby (SUSE)" <[email protected]> wrote:
>> When DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m, the build fails:
>> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_register':
>> intel_backlight.c:(.text+0x5587): undefined reference to `backlight_device_get_by_name'
>>
>> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_unregister':
>> intel_backlight.c:(.text+0x576e): undefined reference to `backlight_device_unregister'
>>
>> To fix this, use IS_REACHABLE(), not IS_ENABLED() in backlight. That is,
>> with the above config, backlight support is disabled.
>
> So I don't want this. I'll take a patch that fixes the dependencies to
> block DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m. Nobody wants that combo,
> and IMO using IS_REACHABLE() is a workaround to hide a broken config
> under the carpet.
>
> The right thing to do is
>
> config DRM_I915
> depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n.
>
> We're selecting BACKLIGHT_CLASS_DEVICE because almost everyone else is
> too, and a combo of selecting and depending leads to circular
> dependencies. But depending is the right fix.

I'm not sure what should I do now. If I do:
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -4,6 +4,7 @@ config DRM_I915
depends on DRM
depends on X86 && PCI
depends on !PREEMPT_RT
+ depends on (BACKLIGHT_CLASS_DEVICE && ACPI) ||
(BACKLIGHT_CLASS_DEVICE=n && ACPI=n)
select INTEL_GTT if X86
select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular
@@ -21,7 +22,6 @@ config DRM_I915
select IRQ_WORK
# i915 depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's
dependencies, ick
- select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
select X86_PLATFORM_DEVICES if ACPI
select ACPI_WMI if ACPI

I get:
drivers/gpu/drm/i915/Kconfig:2:error: recursive dependency detected!
drivers/gpu/drm/i915/Kconfig:2: symbol DRM_I915 depends on
BACKLIGHT_CLASS_DEVICE
drivers/video/backlight/Kconfig:143: symbol BACKLIGHT_CLASS_DEVICE is
selected by DRM_FSL_DCU
drivers/gpu/drm/fsl-dcu/Kconfig:2: symbol DRM_FSL_DCU depends on
COMMON_CLK
drivers/clk/Kconfig:21: symbol COMMON_CLK is selected by X86_INTEL_QUARK
arch/x86/Kconfig:633: symbol X86_INTEL_QUARK depends on
X86_PLATFORM_DEVICES
drivers/platform/x86/Kconfig:6: symbol X86_PLATFORM_DEVICES is selected
by DRM_I915


Those dependencies are really cumbersome :/.

> Documentation/kbuild/kconfig-language.rst:
>
> Note:
> select should be used with care. select will force
> a symbol to a value without visiting the dependencies.
> By abusing select you are able to select a symbol FOO even
> if FOO depends on BAR that is not set.
> In general use select only for non-visible symbols
> (no prompts anywhere) and for symbols with no dependencies.
> That will limit the usefulness but on the other hand avoid
> the illegal configurations all over.
>
>
> BR,
> Jani.
>
>>
>> Cc: Jani Nikula <[email protected]>
>> Cc: Joonas Lahtinen <[email protected]>
>> Cc: Rodrigo Vivi <[email protected]>
>> Cc: Tvrtko Ursulin <[email protected]>
>> Cc: David Airlie <[email protected]>
>> Cc: Daniel Vetter <[email protected]>
>> Cc: [email protected]
>> Cc: [email protected]
>> Reported-by: Martin Liška <[email protected]>
>> Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
>> ---
>> drivers/gpu/drm/i915/display/intel_backlight.c | 2 +-
>> drivers/gpu/drm/i915/display/intel_backlight.h | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
>> index beba39a38c87..c1ba68796b6d 100644
>> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
>> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
>> @@ -825,7 +825,7 @@ void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
>> mutex_unlock(&dev_priv->display.backlight.lock);
>> }
>>
>> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
>> static u32 intel_panel_get_backlight(struct intel_connector *connector)
>> {
>> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
>> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.h b/drivers/gpu/drm/i915/display/intel_backlight.h
>> index 339643f63897..207fe1c613d8 100644
>> --- a/drivers/gpu/drm/i915/display/intel_backlight.h
>> +++ b/drivers/gpu/drm/i915/display/intel_backlight.h
>> @@ -36,7 +36,7 @@ u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 leve
>> u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
>> u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);
>>
>> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
>> int intel_backlight_device_register(struct intel_connector *connector);
>> void intel_backlight_device_unregister(struct intel_connector *connector);
>> #else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
>

--
js
suse labs

2022-10-05 12:22:18

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH 1/2] drm/i915/display: fix randconfig build

On Wed, 05 Oct 2022, Jiri Slaby <[email protected]> wrote:
> On 04. 10. 22, 12:52, Jani Nikula wrote:
>> On Tue, 04 Oct 2022, "Jiri Slaby (SUSE)" <[email protected]> wrote:
>>> When DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m, the build fails:
>>> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_register':
>>> intel_backlight.c:(.text+0x5587): undefined reference to `backlight_device_get_by_name'
>>>
>>> ld: drivers/gpu/drm/i915/display/intel_backlight.o: in function `intel_backlight_device_unregister':
>>> intel_backlight.c:(.text+0x576e): undefined reference to `backlight_device_unregister'
>>>
>>> To fix this, use IS_REACHABLE(), not IS_ENABLED() in backlight. That is,
>>> with the above config, backlight support is disabled.
>>
>> So I don't want this. I'll take a patch that fixes the dependencies to
>> block DRM_I915=y and BACKLIGHT_CLASS_DEVICE=m. Nobody wants that combo,
>> and IMO using IS_REACHABLE() is a workaround to hide a broken config
>> under the carpet.
>>
>> The right thing to do is
>>
>> config DRM_I915
>> depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n.
>>
>> We're selecting BACKLIGHT_CLASS_DEVICE because almost everyone else is
>> too, and a combo of selecting and depending leads to circular
>> dependencies. But depending is the right fix.
>
> I'm not sure what should I do now. If I do:
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -4,6 +4,7 @@ config DRM_I915
> depends on DRM
> depends on X86 && PCI
> depends on !PREEMPT_RT
> + depends on (BACKLIGHT_CLASS_DEVICE && ACPI) ||
> (BACKLIGHT_CLASS_DEVICE=n && ACPI=n)
> select INTEL_GTT if X86
> select INTERVAL_TREE
> # we need shmfs for the swappable backing store, and in particular
> @@ -21,7 +22,6 @@ config DRM_I915
> select IRQ_WORK
> # i915 depends on ACPI_VIDEO when ACPI is enabled
> # but for select to work, need to select ACPI_VIDEO's
> dependencies, ick
> - select BACKLIGHT_CLASS_DEVICE if ACPI
> select INPUT if ACPI
> select X86_PLATFORM_DEVICES if ACPI
> select ACPI_WMI if ACPI
>
> I get:
> drivers/gpu/drm/i915/Kconfig:2:error: recursive dependency detected!
> drivers/gpu/drm/i915/Kconfig:2: symbol DRM_I915 depends on
> BACKLIGHT_CLASS_DEVICE
> drivers/video/backlight/Kconfig:143: symbol BACKLIGHT_CLASS_DEVICE is
> selected by DRM_FSL_DCU
> drivers/gpu/drm/fsl-dcu/Kconfig:2: symbol DRM_FSL_DCU depends on
> COMMON_CLK
> drivers/clk/Kconfig:21: symbol COMMON_CLK is selected by X86_INTEL_QUARK
> arch/x86/Kconfig:633: symbol X86_INTEL_QUARK depends on
> X86_PLATFORM_DEVICES
> drivers/platform/x86/Kconfig:6: symbol X86_PLATFORM_DEVICES is selected
> by DRM_I915
>
>
> Those dependencies are really cumbersome :/.

Yes. They could be fixed, though [1]. IS_REACHABLE() is just band-aid.

BR,
Jani.


[1] https://lore.kernel.org/r/[email protected]

>
>> Documentation/kbuild/kconfig-language.rst:
>>
>> Note:
>> select should be used with care. select will force
>> a symbol to a value without visiting the dependencies.
>> By abusing select you are able to select a symbol FOO even
>> if FOO depends on BAR that is not set.
>> In general use select only for non-visible symbols
>> (no prompts anywhere) and for symbols with no dependencies.
>> That will limit the usefulness but on the other hand avoid
>> the illegal configurations all over.
>>
>>
>> BR,
>> Jani.
>>
>>>
>>> Cc: Jani Nikula <[email protected]>
>>> Cc: Joonas Lahtinen <[email protected]>
>>> Cc: Rodrigo Vivi <[email protected]>
>>> Cc: Tvrtko Ursulin <[email protected]>
>>> Cc: David Airlie <[email protected]>
>>> Cc: Daniel Vetter <[email protected]>
>>> Cc: [email protected]
>>> Cc: [email protected]
>>> Reported-by: Martin Liška <[email protected]>
>>> Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
>>> ---
>>> drivers/gpu/drm/i915/display/intel_backlight.c | 2 +-
>>> drivers/gpu/drm/i915/display/intel_backlight.h | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
>>> index beba39a38c87..c1ba68796b6d 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
>>> @@ -825,7 +825,7 @@ void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
>>> mutex_unlock(&dev_priv->display.backlight.lock);
>>> }
>>>
>>> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>> static u32 intel_panel_get_backlight(struct intel_connector *connector)
>>> {
>>> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
>>> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.h b/drivers/gpu/drm/i915/display/intel_backlight.h
>>> index 339643f63897..207fe1c613d8 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_backlight.h
>>> +++ b/drivers/gpu/drm/i915/display/intel_backlight.h
>>> @@ -36,7 +36,7 @@ u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 leve
>>> u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
>>> u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);
>>>
>>> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>> int intel_backlight_device_register(struct intel_connector *connector);
>>> void intel_backlight_device_unregister(struct intel_connector *connector);
>>> #else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
>>

--
Jani Nikula, Intel Open Source Graphics Center