All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 14:01 ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2020-01-08 14:01 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Chris Wilson, Dave Airlie, Alexander Shiyan,
	Krzysztof Kozlowski, Ville Syrjälä,
	Maarten Lankhorst, Hans de Goede, intel-gfx, dri-devel,
	linux-kernel

The i915 driver can use the backlight subsystem as an option, and usually
selects it when CONFIG_ACPI is set. However it is possible to configure
a kernel with modular backlight classdev support and a built-in i915
driver, which leads to a linker error:

drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'

Add another Kconfig option to ensure the driver only tries to use
the backlight support when it can in fact be linked that way. The
new option is on by default to keep the existing behavior.

This is roughly what other drivers like nouveau do as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I've had this one lying around for a long time, it is still needed
but I am not sure which solution is best here. This version is
probably the least invasive, but it does not solve the bigger
problem around too many 'select' statements in drm
---
 drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
 drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
 drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index ba9595960bbe..81d956040d18 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
 	select INPUT if ACPI
 	select ACPI_VIDEO if ACPI
 	select ACPI_BUTTON if ACPI
@@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
 
 	  Use "*" to force probe the driver for all known devices.
 
+config DRM_I915_BACKLIGHT
+	tristate "Control backlight support"
+	depends on DRM_I915
+	default DRM_I915
+	select BACKLIGHT_CLASS_DEVICE
+	help
+          Say Y here if you want to control the backlight of your display
+          (e.g. a laptop panel).
+
 config DRM_I915_CAPTURE_ERROR
 	bool "Enable capturing GPU state following a hang"
 	depends on DRM_I915
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 7b3ec6eb3382..e2fe7a50dcbf 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
 	mutex_unlock(&dev_priv->backlight_lock);
 }
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 static u32 intel_panel_get_backlight(struct intel_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
@@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
 		panel->backlight.device = NULL;
 	}
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 /*
  * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
index cedeea443336..e6e81268b7ed 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.h
+++ b/drivers/gpu/drm/i915/display/intel_panel.h
@@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
 struct drm_display_mode *
 intel_panel_vbt_fixed_mode(struct intel_connector *connector);
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 int intel_backlight_device_register(struct intel_connector *connector);
 void intel_backlight_device_unregister(struct intel_connector *connector);
-#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#else /* CONFIG_DRM_I915_BACKLIGHT */
 static inline int intel_backlight_device_register(struct intel_connector *connector)
 {
 	return 0;
@@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
 static inline void intel_backlight_device_unregister(struct intel_connector *connector)
 {
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 #endif /* __INTEL_PANEL_H__ */
-- 
2.20.0


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

* [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 14:01 ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2020-01-08 14:01 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Alexander Shiyan, intel-gfx, linux-kernel,
	Krzysztof Kozlowski, Hans de Goede, dri-devel, Dave Airlie

The i915 driver can use the backlight subsystem as an option, and usually
selects it when CONFIG_ACPI is set. However it is possible to configure
a kernel with modular backlight classdev support and a built-in i915
driver, which leads to a linker error:

drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'

Add another Kconfig option to ensure the driver only tries to use
the backlight support when it can in fact be linked that way. The
new option is on by default to keep the existing behavior.

This is roughly what other drivers like nouveau do as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I've had this one lying around for a long time, it is still needed
but I am not sure which solution is best here. This version is
probably the least invasive, but it does not solve the bigger
problem around too many 'select' statements in drm
---
 drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
 drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
 drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index ba9595960bbe..81d956040d18 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
 	select INPUT if ACPI
 	select ACPI_VIDEO if ACPI
 	select ACPI_BUTTON if ACPI
@@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
 
 	  Use "*" to force probe the driver for all known devices.
 
+config DRM_I915_BACKLIGHT
+	tristate "Control backlight support"
+	depends on DRM_I915
+	default DRM_I915
+	select BACKLIGHT_CLASS_DEVICE
+	help
+          Say Y here if you want to control the backlight of your display
+          (e.g. a laptop panel).
+
 config DRM_I915_CAPTURE_ERROR
 	bool "Enable capturing GPU state following a hang"
 	depends on DRM_I915
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 7b3ec6eb3382..e2fe7a50dcbf 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
 	mutex_unlock(&dev_priv->backlight_lock);
 }
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 static u32 intel_panel_get_backlight(struct intel_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
@@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
 		panel->backlight.device = NULL;
 	}
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 /*
  * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
index cedeea443336..e6e81268b7ed 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.h
+++ b/drivers/gpu/drm/i915/display/intel_panel.h
@@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
 struct drm_display_mode *
 intel_panel_vbt_fixed_mode(struct intel_connector *connector);
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 int intel_backlight_device_register(struct intel_connector *connector);
 void intel_backlight_device_unregister(struct intel_connector *connector);
-#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#else /* CONFIG_DRM_I915_BACKLIGHT */
 static inline int intel_backlight_device_register(struct intel_connector *connector)
 {
 	return 0;
@@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
 static inline void intel_backlight_device_unregister(struct intel_connector *connector)
 {
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 #endif /* __INTEL_PANEL_H__ */
-- 
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] 11+ messages in thread

* [Intel-gfx] [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 14:01 ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2020-01-08 14:01 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Alexander Shiyan, intel-gfx, linux-kernel,
	Krzysztof Kozlowski, dri-devel, Dave Airlie

The i915 driver can use the backlight subsystem as an option, and usually
selects it when CONFIG_ACPI is set. However it is possible to configure
a kernel with modular backlight classdev support and a built-in i915
driver, which leads to a linker error:

drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'

Add another Kconfig option to ensure the driver only tries to use
the backlight support when it can in fact be linked that way. The
new option is on by default to keep the existing behavior.

This is roughly what other drivers like nouveau do as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I've had this one lying around for a long time, it is still needed
but I am not sure which solution is best here. This version is
probably the least invasive, but it does not solve the bigger
problem around too many 'select' statements in drm
---
 drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
 drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
 drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index ba9595960bbe..81d956040d18 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
 	select INPUT if ACPI
 	select ACPI_VIDEO if ACPI
 	select ACPI_BUTTON if ACPI
@@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
 
 	  Use "*" to force probe the driver for all known devices.
 
+config DRM_I915_BACKLIGHT
+	tristate "Control backlight support"
+	depends on DRM_I915
+	default DRM_I915
+	select BACKLIGHT_CLASS_DEVICE
+	help
+          Say Y here if you want to control the backlight of your display
+          (e.g. a laptop panel).
+
 config DRM_I915_CAPTURE_ERROR
 	bool "Enable capturing GPU state following a hang"
 	depends on DRM_I915
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 7b3ec6eb3382..e2fe7a50dcbf 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
 	mutex_unlock(&dev_priv->backlight_lock);
 }
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 static u32 intel_panel_get_backlight(struct intel_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
@@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
 		panel->backlight.device = NULL;
 	}
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 /*
  * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
index cedeea443336..e6e81268b7ed 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.h
+++ b/drivers/gpu/drm/i915/display/intel_panel.h
@@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
 struct drm_display_mode *
 intel_panel_vbt_fixed_mode(struct intel_connector *connector);
 
-#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
 int intel_backlight_device_register(struct intel_connector *connector);
 void intel_backlight_device_unregister(struct intel_connector *connector);
-#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#else /* CONFIG_DRM_I915_BACKLIGHT */
 static inline int intel_backlight_device_register(struct intel_connector *connector)
 {
 	return 0;
@@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
 static inline void intel_backlight_device_unregister(struct intel_connector *connector)
 {
 }
-#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
+#endif /* CONFIG_DRM_I915_BACKLIGHT */
 
 #endif /* __INTEL_PANEL_H__ */
-- 
2.20.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: fix backlight configuration issue
  2020-01-08 14:01 ` Arnd Bergmann
  (?)
  (?)
@ 2020-01-08 14:36 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-01-08 14:36 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: intel-gfx

== Series Details ==

Series: i915: fix backlight configuration issue
URL   : https://patchwork.freedesktop.org/series/71766/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
3237c6dfef7c i915: fix backlight configuration issue
-:12: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#12: 
intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'

-:41: WARNING:CONFIG_DESCRIPTION: please write a paragraph that describes the config symbol fully
#41: FILE: drivers/gpu/drm/i915/Kconfig:71:
+config DRM_I915_BACKLIGHT

total: 0 errors, 2 warnings, 0 checks, 58 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✓ Fi.CI.BAT: success for i915: fix backlight configuration issue
  2020-01-08 14:01 ` Arnd Bergmann
                   ` (2 preceding siblings ...)
  (?)
@ 2020-01-08 15:05 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-01-08 15:05 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: intel-gfx

== Series Details ==

Series: i915: fix backlight configuration issue
URL   : https://patchwork.freedesktop.org/series/71766/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7703 -> Patchwork_16026
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/index.html

Known issues
------------

  Here are the changes found in Patchwork_16026 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_close_race@basic-threads:
    - fi-byt-j1900:       [PASS][1] -> [TIMEOUT][2] ([i915#816])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-byt-j1900/igt@gem_close_race@basic-threads.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-byt-j1900/igt@gem_close_race@basic-threads.html

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-kbl-x1275:       [PASS][3] -> [INCOMPLETE][4] ([i915#879])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-kbl-x1275/igt@i915_module_load@reload-with-fault-injection.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-kbl-x1275/igt@i915_module_load@reload-with-fault-injection.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6700k2:      [INCOMPLETE][5] ([i915#671]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-skl-6700k2/igt@i915_module_load@reload-with-fault-injection.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-skl-6700k2/igt@i915_module_load@reload-with-fault-injection.html

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      [FAIL][7] ([i915#178]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_execlists:
    - fi-kbl-soraka:      [DMESG-FAIL][9] ([i915#656]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-kbl-soraka/igt@i915_selftest@live_execlists.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-kbl-soraka/igt@i915_selftest@live_execlists.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-8700k:       [INCOMPLETE][11] ([i915#424]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html

  
#### Warnings ####

  * igt@i915_selftest@live_blt:
    - fi-ivb-3770:        [DMESG-FAIL][13] ([i915#725]) -> [DMESG-FAIL][14] ([i915#770])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7703/fi-ivb-3770/igt@i915_selftest@live_blt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/fi-ivb-3770/igt@i915_selftest@live_blt.html

  
  [i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
  [i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
  [i915#671]: https://gitlab.freedesktop.org/drm/intel/issues/671
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
  [i915#770]: https://gitlab.freedesktop.org/drm/intel/issues/770
  [i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
  [i915#879]: https://gitlab.freedesktop.org/drm/intel/issues/879


Participating hosts (51 -> 43)
------------------------------

  Additional (1): fi-tgl-y 
  Missing    (9): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-skl-lmem fi-blb-e6850 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7703 -> Patchwork_16026

  CI-20190529: 20190529
  CI_DRM_7703: 17da00c0d18968f69a34991f54804c7eaa8a3312 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5358: c6fc013f414b806175dc4143c58ab445e5235ea5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_16026: 3237c6dfef7c2ce97a999c38725250b4dc5f4577 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3237c6dfef7c i915: fix backlight configuration issue

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16026/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] i915: fix backlight configuration issue
  2020-01-08 14:01 ` Arnd Bergmann
  (?)
@ 2020-01-08 15:32   ` Jani Nikula
  -1 siblings, 0 replies; 11+ messages in thread
From: Jani Nikula @ 2020-01-08 15:32 UTC (permalink / raw)
  To: Arnd Bergmann, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
	Daniel Vetter
  Cc: Arnd Bergmann, Chris Wilson, Dave Airlie, Alexander Shiyan,
	Krzysztof Kozlowski, Ville Syrjälä,
	Maarten Lankhorst, Hans de Goede, intel-gfx, dri-devel,
	linux-kernel

On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> The i915 driver can use the backlight subsystem as an option, and usually
> selects it when CONFIG_ACPI is set. However it is possible to configure
> a kernel with modular backlight classdev support and a built-in i915
> driver, which leads to a linker error:
>
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
>
> Add another Kconfig option to ensure the driver only tries to use
> the backlight support when it can in fact be linked that way. The
> new option is on by default to keep the existing behavior.
>
> This is roughly what other drivers like nouveau do as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I've had this one lying around for a long time, it is still needed
> but I am not sure which solution is best here. This version is
> probably the least invasive, but it does not solve the bigger
> problem around too many 'select' statements in drm

This is just another hack that's only required because backlight is
selected instead of depended on throughout the kernel. (*)

i915 (and most drm drivers, with some variations) could easily handle
this with:

	depends on (ACPI && ACPI_VIDEO) || ACPI=n
	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

Those two lines express the allowed configurations. It's just that we
can't do that in i915 *alone*. The combinations of depends and selects
lead to impossible configurations. It's all or nothing.

I am not amused by adding more hacks, and I am really *not* interested
in adding another useless i915 config option to "solve" this issue.

So thanks, but no thanks. I'm not taking this patch.


BR,
Jani.


(*) The deeper issue is that people as well as the kconfig tools ignore
the warnings in Documentation/kbuild/kconfig-language.rst:

	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.

I don't think we can, uh, fix the people, but it might be possible to
warn about selecting visible symbols or symbols with dependencies.

> ---
>  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
>  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
>  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
>  3 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index ba9595960bbe..81d956040d18 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
>  	select INPUT if ACPI
>  	select ACPI_VIDEO if ACPI
>  	select ACPI_BUTTON if ACPI
> @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
>  
>  	  Use "*" to force probe the driver for all known devices.
>  
> +config DRM_I915_BACKLIGHT
> +	tristate "Control backlight support"
> +	depends on DRM_I915
> +	default DRM_I915
> +	select BACKLIGHT_CLASS_DEVICE
> +	help
> +          Say Y here if you want to control the backlight of your display
> +          (e.g. a laptop panel).
> +
>  config DRM_I915_CAPTURE_ERROR
>  	bool "Enable capturing GPU state following a hang"
>  	depends on DRM_I915
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 7b3ec6eb3382..e2fe7a50dcbf 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
>  	mutex_unlock(&dev_priv->backlight_lock);
>  }
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  static u32 intel_panel_get_backlight(struct intel_connector *connector)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
>  		panel->backlight.device = NULL;
>  	}
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  /*
>   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> index cedeea443336..e6e81268b7ed 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.h
> +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
>  struct drm_display_mode *
>  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  int intel_backlight_device_register(struct intel_connector *connector);
>  void intel_backlight_device_unregister(struct intel_connector *connector);
> -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#else /* CONFIG_DRM_I915_BACKLIGHT */
>  static inline int intel_backlight_device_register(struct intel_connector *connector)
>  {
>  	return 0;
> @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
>  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
>  {
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  #endif /* __INTEL_PANEL_H__ */

-- 
Jani Nikula, Intel Open Source Graphics Center

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

* Re: [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 15:32   ` Jani Nikula
  0 siblings, 0 replies; 11+ messages in thread
From: Jani Nikula @ 2020-01-08 15:32 UTC (permalink / raw)
  To: Arnd Bergmann, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
	Daniel Vetter
  Cc: Arnd Bergmann, Alexander Shiyan, intel-gfx, linux-kernel,
	Krzysztof Kozlowski, Hans de Goede, dri-devel, Dave Airlie

On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> The i915 driver can use the backlight subsystem as an option, and usually
> selects it when CONFIG_ACPI is set. However it is possible to configure
> a kernel with modular backlight classdev support and a built-in i915
> driver, which leads to a linker error:
>
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
>
> Add another Kconfig option to ensure the driver only tries to use
> the backlight support when it can in fact be linked that way. The
> new option is on by default to keep the existing behavior.
>
> This is roughly what other drivers like nouveau do as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I've had this one lying around for a long time, it is still needed
> but I am not sure which solution is best here. This version is
> probably the least invasive, but it does not solve the bigger
> problem around too many 'select' statements in drm

This is just another hack that's only required because backlight is
selected instead of depended on throughout the kernel. (*)

i915 (and most drm drivers, with some variations) could easily handle
this with:

	depends on (ACPI && ACPI_VIDEO) || ACPI=n
	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

Those two lines express the allowed configurations. It's just that we
can't do that in i915 *alone*. The combinations of depends and selects
lead to impossible configurations. It's all or nothing.

I am not amused by adding more hacks, and I am really *not* interested
in adding another useless i915 config option to "solve" this issue.

So thanks, but no thanks. I'm not taking this patch.


BR,
Jani.


(*) The deeper issue is that people as well as the kconfig tools ignore
the warnings in Documentation/kbuild/kconfig-language.rst:

	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.

I don't think we can, uh, fix the people, but it might be possible to
warn about selecting visible symbols or symbols with dependencies.

> ---
>  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
>  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
>  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
>  3 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index ba9595960bbe..81d956040d18 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
>  	select INPUT if ACPI
>  	select ACPI_VIDEO if ACPI
>  	select ACPI_BUTTON if ACPI
> @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
>  
>  	  Use "*" to force probe the driver for all known devices.
>  
> +config DRM_I915_BACKLIGHT
> +	tristate "Control backlight support"
> +	depends on DRM_I915
> +	default DRM_I915
> +	select BACKLIGHT_CLASS_DEVICE
> +	help
> +          Say Y here if you want to control the backlight of your display
> +          (e.g. a laptop panel).
> +
>  config DRM_I915_CAPTURE_ERROR
>  	bool "Enable capturing GPU state following a hang"
>  	depends on DRM_I915
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 7b3ec6eb3382..e2fe7a50dcbf 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
>  	mutex_unlock(&dev_priv->backlight_lock);
>  }
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  static u32 intel_panel_get_backlight(struct intel_connector *connector)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
>  		panel->backlight.device = NULL;
>  	}
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  /*
>   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> index cedeea443336..e6e81268b7ed 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.h
> +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
>  struct drm_display_mode *
>  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  int intel_backlight_device_register(struct intel_connector *connector);
>  void intel_backlight_device_unregister(struct intel_connector *connector);
> -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#else /* CONFIG_DRM_I915_BACKLIGHT */
>  static inline int intel_backlight_device_register(struct intel_connector *connector)
>  {
>  	return 0;
> @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
>  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
>  {
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  #endif /* __INTEL_PANEL_H__ */

-- 
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] 11+ messages in thread

* Re: [Intel-gfx] [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 15:32   ` Jani Nikula
  0 siblings, 0 replies; 11+ messages in thread
From: Jani Nikula @ 2020-01-08 15:32 UTC (permalink / raw)
  To: Arnd Bergmann, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
	Daniel Vetter
  Cc: Arnd Bergmann, Alexander Shiyan, intel-gfx, linux-kernel,
	Krzysztof Kozlowski, dri-devel, Dave Airlie

On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> The i915 driver can use the backlight subsystem as an option, and usually
> selects it when CONFIG_ACPI is set. However it is possible to configure
> a kernel with modular backlight classdev support and a built-in i915
> driver, which leads to a linker error:
>
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
>
> Add another Kconfig option to ensure the driver only tries to use
> the backlight support when it can in fact be linked that way. The
> new option is on by default to keep the existing behavior.
>
> This is roughly what other drivers like nouveau do as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I've had this one lying around for a long time, it is still needed
> but I am not sure which solution is best here. This version is
> probably the least invasive, but it does not solve the bigger
> problem around too many 'select' statements in drm

This is just another hack that's only required because backlight is
selected instead of depended on throughout the kernel. (*)

i915 (and most drm drivers, with some variations) could easily handle
this with:

	depends on (ACPI && ACPI_VIDEO) || ACPI=n
	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n

Those two lines express the allowed configurations. It's just that we
can't do that in i915 *alone*. The combinations of depends and selects
lead to impossible configurations. It's all or nothing.

I am not amused by adding more hacks, and I am really *not* interested
in adding another useless i915 config option to "solve" this issue.

So thanks, but no thanks. I'm not taking this patch.


BR,
Jani.


(*) The deeper issue is that people as well as the kconfig tools ignore
the warnings in Documentation/kbuild/kconfig-language.rst:

	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.

I don't think we can, uh, fix the people, but it might be possible to
warn about selecting visible symbols or symbols with dependencies.

> ---
>  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
>  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
>  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
>  3 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index ba9595960bbe..81d956040d18 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
>  	select INPUT if ACPI
>  	select ACPI_VIDEO if ACPI
>  	select ACPI_BUTTON if ACPI
> @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
>  
>  	  Use "*" to force probe the driver for all known devices.
>  
> +config DRM_I915_BACKLIGHT
> +	tristate "Control backlight support"
> +	depends on DRM_I915
> +	default DRM_I915
> +	select BACKLIGHT_CLASS_DEVICE
> +	help
> +          Say Y here if you want to control the backlight of your display
> +          (e.g. a laptop panel).
> +
>  config DRM_I915_CAPTURE_ERROR
>  	bool "Enable capturing GPU state following a hang"
>  	depends on DRM_I915
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 7b3ec6eb3382..e2fe7a50dcbf 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
>  	mutex_unlock(&dev_priv->backlight_lock);
>  }
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  static u32 intel_panel_get_backlight(struct intel_connector *connector)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
>  		panel->backlight.device = NULL;
>  	}
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  /*
>   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> index cedeea443336..e6e81268b7ed 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.h
> +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
>  struct drm_display_mode *
>  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
>  
> -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
>  int intel_backlight_device_register(struct intel_connector *connector);
>  void intel_backlight_device_unregister(struct intel_connector *connector);
> -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#else /* CONFIG_DRM_I915_BACKLIGHT */
>  static inline int intel_backlight_device_register(struct intel_connector *connector)
>  {
>  	return 0;
> @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
>  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
>  {
>  }
> -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> +#endif /* CONFIG_DRM_I915_BACKLIGHT */
>  
>  #endif /* __INTEL_PANEL_H__ */

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

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

* Re: [PATCH] i915: fix backlight configuration issue
  2020-01-08 15:32   ` Jani Nikula
  (?)
@ 2020-01-08 18:55     ` Daniel Vetter
  -1 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-01-08 18:55 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Arnd Bergmann, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
	Daniel Vetter, Chris Wilson, Dave Airlie, Alexander Shiyan,
	Krzysztof Kozlowski, Ville Syrjälä,
	Maarten Lankhorst, Hans de Goede, intel-gfx, dri-devel,
	linux-kernel

On Wed, Jan 08, 2020 at 05:32:26PM +0200, Jani Nikula wrote:
> On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > The i915 driver can use the backlight subsystem as an option, and usually
> > selects it when CONFIG_ACPI is set. However it is possible to configure
> > a kernel with modular backlight classdev support and a built-in i915
> > driver, which leads to a linker error:
> >
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> > intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> > intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
> >
> > Add another Kconfig option to ensure the driver only tries to use
> > the backlight support when it can in fact be linked that way. The
> > new option is on by default to keep the existing behavior.
> >
> > This is roughly what other drivers like nouveau do as well.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > I've had this one lying around for a long time, it is still needed
> > but I am not sure which solution is best here. This version is
> > probably the least invasive, but it does not solve the bigger
> > problem around too many 'select' statements in drm
> 
> This is just another hack that's only required because backlight is
> selected instead of depended on throughout the kernel. (*)
> 
> i915 (and most drm drivers, with some variations) could easily handle
> this with:
> 
> 	depends on (ACPI && ACPI_VIDEO) || ACPI=n
> 	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n
> 
> Those two lines express the allowed configurations. It's just that we
> can't do that in i915 *alone*. The combinations of depends and selects
> lead to impossible configurations. It's all or nothing.
> 
> I am not amused by adding more hacks, and I am really *not* interested
> in adding another useless i915 config option to "solve" this issue.
> 
> So thanks, but no thanks. I'm not taking this patch.

Yeah I'm also leaning towards that the real fix here is to convert
backlight over to be a depends on symbol, not a select symbol. It's
clearly not a simple stand-alone helper. Or someone makes select recursive
and adds a SAT solver to Kconfig :-)
-Daniel

> 
> 
> BR,
> Jani.
> 
> 
> (*) The deeper issue is that people as well as the kconfig tools ignore
> the warnings in Documentation/kbuild/kconfig-language.rst:
> 
> 	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.
> 
> I don't think we can, uh, fix the people, but it might be possible to
> warn about selecting visible symbols or symbols with dependencies.
> 
> > ---
> >  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
> >  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
> >  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
> >  3 files changed, 15 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> > index ba9595960bbe..81d956040d18 100644
> > --- a/drivers/gpu/drm/i915/Kconfig
> > +++ b/drivers/gpu/drm/i915/Kconfig
> > @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
> >  	select INPUT if ACPI
> >  	select ACPI_VIDEO if ACPI
> >  	select ACPI_BUTTON if ACPI
> > @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
> >  
> >  	  Use "*" to force probe the driver for all known devices.
> >  
> > +config DRM_I915_BACKLIGHT
> > +	tristate "Control backlight support"
> > +	depends on DRM_I915
> > +	default DRM_I915
> > +	select BACKLIGHT_CLASS_DEVICE
> > +	help
> > +          Say Y here if you want to control the backlight of your display
> > +          (e.g. a laptop panel).
> > +
> >  config DRM_I915_CAPTURE_ERROR
> >  	bool "Enable capturing GPU state following a hang"
> >  	depends on DRM_I915
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> > index 7b3ec6eb3382..e2fe7a50dcbf 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> > @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
> >  	mutex_unlock(&dev_priv->backlight_lock);
> >  }
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  static u32 intel_panel_get_backlight(struct intel_connector *connector)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> > @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
> >  		panel->backlight.device = NULL;
> >  	}
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  /*
> >   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> > index cedeea443336..e6e81268b7ed 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.h
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> > @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
> >  struct drm_display_mode *
> >  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  int intel_backlight_device_register(struct intel_connector *connector);
> >  void intel_backlight_device_unregister(struct intel_connector *connector);
> > -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#else /* CONFIG_DRM_I915_BACKLIGHT */
> >  static inline int intel_backlight_device_register(struct intel_connector *connector)
> >  {
> >  	return 0;
> > @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
> >  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
> >  {
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  #endif /* __INTEL_PANEL_H__ */
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 18:55     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-01-08 18:55 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Alexander Shiyan, Arnd Bergmann, David Airlie, intel-gfx,
	linux-kernel, Krzysztof Kozlowski, Hans de Goede, dri-devel,
	Rodrigo Vivi, Dave Airlie

On Wed, Jan 08, 2020 at 05:32:26PM +0200, Jani Nikula wrote:
> On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > The i915 driver can use the backlight subsystem as an option, and usually
> > selects it when CONFIG_ACPI is set. However it is possible to configure
> > a kernel with modular backlight classdev support and a built-in i915
> > driver, which leads to a linker error:
> >
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> > intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> > intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
> >
> > Add another Kconfig option to ensure the driver only tries to use
> > the backlight support when it can in fact be linked that way. The
> > new option is on by default to keep the existing behavior.
> >
> > This is roughly what other drivers like nouveau do as well.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > I've had this one lying around for a long time, it is still needed
> > but I am not sure which solution is best here. This version is
> > probably the least invasive, but it does not solve the bigger
> > problem around too many 'select' statements in drm
> 
> This is just another hack that's only required because backlight is
> selected instead of depended on throughout the kernel. (*)
> 
> i915 (and most drm drivers, with some variations) could easily handle
> this with:
> 
> 	depends on (ACPI && ACPI_VIDEO) || ACPI=n
> 	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n
> 
> Those two lines express the allowed configurations. It's just that we
> can't do that in i915 *alone*. The combinations of depends and selects
> lead to impossible configurations. It's all or nothing.
> 
> I am not amused by adding more hacks, and I am really *not* interested
> in adding another useless i915 config option to "solve" this issue.
> 
> So thanks, but no thanks. I'm not taking this patch.

Yeah I'm also leaning towards that the real fix here is to convert
backlight over to be a depends on symbol, not a select symbol. It's
clearly not a simple stand-alone helper. Or someone makes select recursive
and adds a SAT solver to Kconfig :-)
-Daniel

> 
> 
> BR,
> Jani.
> 
> 
> (*) The deeper issue is that people as well as the kconfig tools ignore
> the warnings in Documentation/kbuild/kconfig-language.rst:
> 
> 	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.
> 
> I don't think we can, uh, fix the people, but it might be possible to
> warn about selecting visible symbols or symbols with dependencies.
> 
> > ---
> >  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
> >  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
> >  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
> >  3 files changed, 15 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> > index ba9595960bbe..81d956040d18 100644
> > --- a/drivers/gpu/drm/i915/Kconfig
> > +++ b/drivers/gpu/drm/i915/Kconfig
> > @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
> >  	select INPUT if ACPI
> >  	select ACPI_VIDEO if ACPI
> >  	select ACPI_BUTTON if ACPI
> > @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
> >  
> >  	  Use "*" to force probe the driver for all known devices.
> >  
> > +config DRM_I915_BACKLIGHT
> > +	tristate "Control backlight support"
> > +	depends on DRM_I915
> > +	default DRM_I915
> > +	select BACKLIGHT_CLASS_DEVICE
> > +	help
> > +          Say Y here if you want to control the backlight of your display
> > +          (e.g. a laptop panel).
> > +
> >  config DRM_I915_CAPTURE_ERROR
> >  	bool "Enable capturing GPU state following a hang"
> >  	depends on DRM_I915
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> > index 7b3ec6eb3382..e2fe7a50dcbf 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> > @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
> >  	mutex_unlock(&dev_priv->backlight_lock);
> >  }
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  static u32 intel_panel_get_backlight(struct intel_connector *connector)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> > @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
> >  		panel->backlight.device = NULL;
> >  	}
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  /*
> >   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> > index cedeea443336..e6e81268b7ed 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.h
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> > @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
> >  struct drm_display_mode *
> >  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  int intel_backlight_device_register(struct intel_connector *connector);
> >  void intel_backlight_device_unregister(struct intel_connector *connector);
> > -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#else /* CONFIG_DRM_I915_BACKLIGHT */
> >  static inline int intel_backlight_device_register(struct intel_connector *connector)
> >  {
> >  	return 0;
> > @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
> >  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
> >  {
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  #endif /* __INTEL_PANEL_H__ */
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [Intel-gfx] [PATCH] i915: fix backlight configuration issue
@ 2020-01-08 18:55     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-01-08 18:55 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Alexander Shiyan, Arnd Bergmann, David Airlie, intel-gfx,
	linux-kernel, Krzysztof Kozlowski, dri-devel, Dave Airlie

On Wed, Jan 08, 2020 at 05:32:26PM +0200, Jani Nikula wrote:
> On Wed, 08 Jan 2020, Arnd Bergmann <arnd@arndb.de> wrote:
> > The i915 driver can use the backlight subsystem as an option, and usually
> > selects it when CONFIG_ACPI is set. However it is possible to configure
> > a kernel with modular backlight classdev support and a built-in i915
> > driver, which leads to a linker error:
> >
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register':
> > intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register'
> > drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister':
> > intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'
> >
> > Add another Kconfig option to ensure the driver only tries to use
> > the backlight support when it can in fact be linked that way. The
> > new option is on by default to keep the existing behavior.
> >
> > This is roughly what other drivers like nouveau do as well.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > I've had this one lying around for a long time, it is still needed
> > but I am not sure which solution is best here. This version is
> > probably the least invasive, but it does not solve the bigger
> > problem around too many 'select' statements in drm
> 
> This is just another hack that's only required because backlight is
> selected instead of depended on throughout the kernel. (*)
> 
> i915 (and most drm drivers, with some variations) could easily handle
> this with:
> 
> 	depends on (ACPI && ACPI_VIDEO) || ACPI=n
> 	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n
> 
> Those two lines express the allowed configurations. It's just that we
> can't do that in i915 *alone*. The combinations of depends and selects
> lead to impossible configurations. It's all or nothing.
> 
> I am not amused by adding more hacks, and I am really *not* interested
> in adding another useless i915 config option to "solve" this issue.
> 
> So thanks, but no thanks. I'm not taking this patch.

Yeah I'm also leaning towards that the real fix here is to convert
backlight over to be a depends on symbol, not a select symbol. It's
clearly not a simple stand-alone helper. Or someone makes select recursive
and adds a SAT solver to Kconfig :-)
-Daniel

> 
> 
> BR,
> Jani.
> 
> 
> (*) The deeper issue is that people as well as the kconfig tools ignore
> the warnings in Documentation/kbuild/kconfig-language.rst:
> 
> 	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.
> 
> I don't think we can, uh, fix the people, but it might be possible to
> warn about selecting visible symbols or symbols with dependencies.
> 
> > ---
> >  drivers/gpu/drm/i915/Kconfig               | 11 ++++++++++-
> >  drivers/gpu/drm/i915/display/intel_panel.c |  4 ++--
> >  drivers/gpu/drm/i915/display/intel_panel.h |  6 +++---
> >  3 files changed, 15 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> > index ba9595960bbe..81d956040d18 100644
> > --- a/drivers/gpu/drm/i915/Kconfig
> > +++ b/drivers/gpu/drm/i915/Kconfig
> > @@ -16,7 +16,7 @@ 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 DRM_I915_BACKLIGHT if ACPI
> >  	select INPUT if ACPI
> >  	select ACPI_VIDEO if ACPI
> >  	select ACPI_BUTTON if ACPI
> > @@ -68,6 +68,15 @@ config DRM_I915_FORCE_PROBE
> >  
> >  	  Use "*" to force probe the driver for all known devices.
> >  
> > +config DRM_I915_BACKLIGHT
> > +	tristate "Control backlight support"
> > +	depends on DRM_I915
> > +	default DRM_I915
> > +	select BACKLIGHT_CLASS_DEVICE
> > +	help
> > +          Say Y here if you want to control the backlight of your display
> > +          (e.g. a laptop panel).
> > +
> >  config DRM_I915_CAPTURE_ERROR
> >  	bool "Enable capturing GPU state following a hang"
> >  	depends on DRM_I915
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> > index 7b3ec6eb3382..e2fe7a50dcbf 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> > @@ -1203,7 +1203,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
> >  	mutex_unlock(&dev_priv->backlight_lock);
> >  }
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  static u32 intel_panel_get_backlight(struct intel_connector *connector)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> > @@ -1370,7 +1370,7 @@ void intel_backlight_device_unregister(struct intel_connector *connector)
> >  		panel->backlight.device = NULL;
> >  	}
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  /*
> >   * CNP: PWM clock frequency is 19.2 MHz or 24 MHz.
> > diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> > index cedeea443336..e6e81268b7ed 100644
> > --- a/drivers/gpu/drm/i915/display/intel_panel.h
> > +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> > @@ -49,10 +49,10 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector);
> >  struct drm_display_mode *
> >  intel_panel_vbt_fixed_mode(struct intel_connector *connector);
> >  
> > -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > +#if IS_ENABLED(CONFIG_DRM_I915_BACKLIGHT)
> >  int intel_backlight_device_register(struct intel_connector *connector);
> >  void intel_backlight_device_unregister(struct intel_connector *connector);
> > -#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#else /* CONFIG_DRM_I915_BACKLIGHT */
> >  static inline int intel_backlight_device_register(struct intel_connector *connector)
> >  {
> >  	return 0;
> > @@ -60,6 +60,6 @@ static inline int intel_backlight_device_register(struct intel_connector *connec
> >  static inline void intel_backlight_device_unregister(struct intel_connector *connector)
> >  {
> >  }
> > -#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
> > +#endif /* CONFIG_DRM_I915_BACKLIGHT */
> >  
> >  #endif /* __INTEL_PANEL_H__ */
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-01-08 18:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 14:01 [PATCH] i915: fix backlight configuration issue Arnd Bergmann
2020-01-08 14:01 ` [Intel-gfx] " Arnd Bergmann
2020-01-08 14:01 ` Arnd Bergmann
2020-01-08 14:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-01-08 15:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-08 15:32 ` [PATCH] " Jani Nikula
2020-01-08 15:32   ` [Intel-gfx] " Jani Nikula
2020-01-08 15:32   ` Jani Nikula
2020-01-08 18:55   ` Daniel Vetter
2020-01-08 18:55     ` [Intel-gfx] " Daniel Vetter
2020-01-08 18:55     ` Daniel Vetter

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.