Skip to contentSkip to conversation

drm/display: Convert helpers Kconfig symbols to depends on

PATCH Applied Maxime Ripard 6 participants 27 messages Mar 27, 2024 – Apr 23, 2024

Subsystems (30)
lore
Share & tools
lore

Maxime Ripard

author maintainer
#0 lore raw

v3 cover drm/display: Convert helpers Kconfig symbols to depends on

Hi,

Jani recently pointed out that the Kconfig symbols are a bit difficult to work with at the moment when they depend on each other, and that using depends on would be a better idea, but no one really did the work so far.

So here it goes :)

It's been tested by comparing the riscv defconfig, arm multi_v7_defconfig, arm64 defconfig, drm-misc-arm, drm-misc-arm64 and drm-misc-x86 before and after this series and making sure they are identical.

Let me know what you think,
Maxime

---
Changes in v3:
- Fix a build issue for DRM_DW_HDMI
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Make all the symbols that used to be selected enabled by default to
prevent defconfig disruptions.
- Fix typo in commit log of patch 3
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Maxime Ripard (13):
drm/display: Make DisplayPort AUX bus Kconfig name consistent drm/display: Make DisplayPort tunnel debug Kconfig name consistent drm/display: Make DisplayPort AUX Chardev Kconfig name consistent drm/display: Make DisplayPort CEC-over-AUX Kconfig name consistent drm/display: Reorder Kconfig symbols
drm/display: Make all helpers visible and switch to depends on
drm: Make drivers depends on DRM_DW_HDMI
drm: Switch DRM_DISPLAY_HELPER to depends on
drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on
drm: Switch DRM_DISPLAY_DP_HELPER to depends on
drm: Switch DRM_DISPLAY_HDCP_HELPER to depends on
drm: Switch DRM_DISPLAY_HDMI_HELPER to depends on drm/bridge: it6505: Remove useless select

 arch/parisc/configs/generic-32bit_defconfig      |  2 +-
 drivers/gpu/drm/Kconfig                          |  8 ++-
 drivers/gpu/drm/amd/amdgpu/Kconfig               | 12 ++--
 drivers/gpu/drm/bridge/Kconfig                   | 29 +++++----
 drivers/gpu/drm/bridge/analogix/Kconfig          | 16 ++---
 drivers/gpu/drm/bridge/cadence/Kconfig           |  8 +--
 drivers/gpu/drm/bridge/imx/Kconfig               |  4 +-
 drivers/gpu/drm/bridge/synopsys/Kconfig          |  4 +-
 drivers/gpu/drm/display/Kconfig                  | 75 +++++++++++++-----------
 drivers/gpu/drm/display/Makefile                 |  6 +-
 drivers/gpu/drm/display/drm_dp_helper.c          |  2 +-
 drivers/gpu/drm/display/drm_dp_helper_internal.h |  2 +-
 drivers/gpu/drm/display/drm_dp_tunnel.c          | 10 ++--
 drivers/gpu/drm/exynos/Kconfig                   |  4 +-
 drivers/gpu/drm/i915/Kconfig                     |  8 +--
 drivers/gpu/drm/i915/Kconfig.debug               |  4 +-
 drivers/gpu/drm/imx/ipuv3/Kconfig                |  5 +-
 drivers/gpu/drm/ingenic/Kconfig                  |  2 +-
 drivers/gpu/drm/mediatek/Kconfig                 |  6 +-
 drivers/gpu/drm/meson/Kconfig                    |  2 +-
 drivers/gpu/drm/msm/Kconfig                      |  8 +--
 drivers/gpu/drm/nouveau/Kconfig                  | 10 ++--
 drivers/gpu/drm/panel/Kconfig                    | 32 +++++-----
 drivers/gpu/drm/radeon/Kconfig                   |  8 ++-
 drivers/gpu/drm/renesas/rcar-du/Kconfig          |  2 +-
 drivers/gpu/drm/rockchip/Kconfig                 | 10 ++--
 drivers/gpu/drm/sun4i/Kconfig                    |  2 +-
 drivers/gpu/drm/tegra/Kconfig                    |  8 +--
 drivers/gpu/drm/vc4/Kconfig                      | 10 ++--
 drivers/gpu/drm/xe/Kconfig                       | 13 ++--
 drivers/gpu/drm/xlnx/Kconfig                     |  8 ++-
 include/drm/display/drm_dp_helper.h              |  2 +-
 32 files changed, 171 insertions(+), 151 deletions(-)

---
base-commit: 5e842d55bad7794823a50f24fd645b58f2ef93ab
change-id: 20240325-kms-kconfig-helpers-f94991bdd6fa

Best regards,

Signature · 1 line
Maxime Ripard <[email protected]>
author maintainer
#1 lore raw

PATCH v3 1/13 drm/display: Make DisplayPort AUX bus Kconfig name consistent

While most display helpers Kconfig symbols have the DRM_DISPLAY prefix, the DisplayPort AUX bus implementation uses DRM_DP_AUX_BUS.

Since the number of users is limited and it's a selected symbol, we can easily rename it to make it consistent.

---
 drivers/gpu/drm/bridge/Kconfig          | 6 +++---
 drivers/gpu/drm/bridge/analogix/Kconfig | 2 +-
 drivers/gpu/drm/display/Kconfig         | 2 +-
 drivers/gpu/drm/display/Makefile        | 2 +-
 drivers/gpu/drm/mediatek/Kconfig        | 2 +-
 drivers/gpu/drm/msm/Kconfig             | 2 +-
 drivers/gpu/drm/panel/Kconfig           | 4 ++--
 drivers/gpu/drm/tegra/Kconfig           | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/bridge/Kconfig +3 -3
index efd996f6c138..703c3e30885b 100644
@@ -94,11 +94,11 @@ config DRM_ITE_IT6505
 	tristate "ITE IT6505 DisplayPort bridge"
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
 	select CRYPTO_HASH
@@ -227,11 +227,11 @@ config DRM_PARADE_PS8622
 config DRM_PARADE_PS8640
 	tristate "Parade PS8640 MIPI DSI to eDP Converter"
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
 	  Choose this option if you have PS8640 for display
@@ -387,11 +387,11 @@ config DRM_TI_SN65DSI86
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select AUXILIARY_BUS
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
 config DRM_TI_TPD12S015
 	tristate "TI TPD12S015 HDMI level shifter and ESD protection"
drivers/gpu/drm/bridge/analogix/Kconfig +1 -1
index 173dada218ec..4846b2e9be7c 100644
@@ -35,11 +35,11 @@ config DRM_ANALOGIX_ANX7625
 	depends on DRM
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_MIPI_DSI
 	help
 	  ANX7625 is an ultra-low power 4K mobile HD transmitter
 	  designed for portable devices. It converts MIPI/DPI to
 	  DisplayPort1.3 4K.
drivers/gpu/drm/display/Kconfig +1 -1
index c0f56888c328..843d74db1dce 100644
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: MIT
 
-config DRM_DP_AUX_BUS
+config DRM_DISPLAY_DP_AUX_BUS
 	tristate
 	depends on DRM
 	depends on OF || COMPILE_TEST
 
 config DRM_DISPLAY_HELPER
drivers/gpu/drm/display/Makefile +1 -1
index 7ca61333c669..3edf1ba2764e 100644
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: MIT
 
-obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o
+obj-$(CONFIG_DRM_DISPLAY_DP_AUX_BUS) += drm_dp_aux_bus.o
 
 drm_display_helper-y := drm_display_helper_mod.o
 drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_HELPER) += \
 	drm_dp_dual_mode_helper.o \
 	drm_dp_helper.o \
drivers/gpu/drm/mediatek/Kconfig +1 -1
index 76cab28e010c..96cbe020f493 100644
@@ -24,11 +24,11 @@ config DRM_MEDIATEK_DP
 	tristate "DRM DPTX Support for MediaTek SoCs"
 	depends on DRM_MEDIATEK
 	select PHY_MTK_DP
 	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM/KMS Display Port driver for MediaTek SoCs.
 
 config DRM_MEDIATEK_HDMI
 	tristate "DRM HDMI Support for Mediatek SoCs"
drivers/gpu/drm/msm/Kconfig +1 -1
index f202f26adab2..27d72ed8b389 100644
@@ -12,11 +12,11 @@ config DRM_MSM
 	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
 	depends on PM
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HELPER
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_PANEL
drivers/gpu/drm/panel/Kconfig +2 -2
index 6dc451f58a3e..9eefe09c2ecb 100644
@@ -562,11 +562,11 @@ config DRM_PANEL_SAMSUNG_ATNA33XC20
 	depends on OF
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on PM
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
 	  be handled by the DRM_PANEL_SIMPLE driver because its power
 	  sequencing is non-standard.
 
@@ -803,11 +803,11 @@ config DRM_PANEL_EDP
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on PM
 	select VIDEOMODE_HELPERS
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	help
 	  DRM panel driver for dumb eDP panels that need at most a regulator and
 	  a GPIO to be powered up. Optionally a backlight can be attached so
 	  that it can be automatically turned off when the panel goes into a
drivers/gpu/drm/tegra/Kconfig +1 -1
index 84e7e6bc3a0c..782f51d3044a 100644
@@ -6,11 +6,11 @@ config DRM_TEGRA
 	depends on DRM
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_DISPLAY_HELPER
-	select DRM_DP_AUX_BUS
+	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
 	select TEGRA_HOST1X
Signature · 1 line
2.44.0
author maintainer
#2 lore raw

PATCH v3 2/13 drm/display: Make DisplayPort tunnel debug Kconfig name consistent

In reply to Maxime Ripard

While most display helpers Kconfig symbols have the DRM_DISPLAY prefix, the DisplayPort Tunnel debugging uses DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE.

Since the number of users is limited and it's a selected symbol, we can easily rename it to make it consistent.

---
 drivers/gpu/drm/display/Kconfig         |  2 +-
 drivers/gpu/drm/display/drm_dp_tunnel.c | 10 +++++-----
 drivers/gpu/drm/i915/Kconfig.debug      |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/display/Kconfig +1 -1
index 843d74db1dce..0d350e9db807 100644
@@ -23,11 +23,11 @@ config DRM_DISPLAY_DP_TUNNEL
 	help
 	  Enable support for DisplayPort tunnels. This allows drivers to use
 	  DP tunnel features like the Bandwidth Allocation mode to maximize the
 	  BW utilization for display streams on Thunderbolt links.
 
-config DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	bool "Enable debugging the DP tunnel state"
 	depends on REF_TRACKER
 	depends on DRM_DISPLAY_DP_TUNNEL
 	depends on DEBUG_KERNEL
 	depends on EXPERT
drivers/gpu/drm/display/drm_dp_tunnel.c +5 -5
index 120e0de674c1..2a91e9b11d03 100644
@@ -189,11 +189,11 @@ struct drm_dp_tunnel_mgr {
 
 	int group_count;
 	struct drm_dp_tunnel_group *groups;
 	wait_queue_head_t bw_req_queue;
 
-#ifdef CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	struct ref_tracker_dir ref_tracker;
 #endif
 };
 
 /*
@@ -383,11 +383,11 @@ static void free_tunnel(struct kref *kref)
 static void tunnel_put(struct drm_dp_tunnel *tunnel)
 {
 	kref_put(&tunnel->kref, free_tunnel);
 }
 
-#ifdef CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 static void track_tunnel_ref(struct drm_dp_tunnel *tunnel,
 			     struct ref_tracker **tracker)
 {
 	ref_tracker_alloc(&tunnel->group->mgr->ref_tracker,
 			  tracker, GFP_KERNEL);
@@ -1601,11 +1601,11 @@ static bool init_group(struct drm_dp_tunnel_mgr *mgr, struct drm_dp_tunnel_group
 static void cleanup_group(struct drm_dp_tunnel_group *group)
 {
 	drm_atomic_private_obj_fini(&group->base);
 }
 
-#ifdef CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 static void check_unique_stream_ids(const struct drm_dp_tunnel_group_state *group_state)
 {
 	const struct drm_dp_tunnel_state *tunnel_state;
 	u32 stream_mask = 0;
 
@@ -1879,11 +1879,11 @@ static void destroy_mgr(struct drm_dp_tunnel_mgr *mgr)
 	for (i = 0; i < mgr->group_count; i++) {
 		cleanup_group(&mgr->groups[i]);
 		drm_WARN_ON(mgr->dev, !list_empty(&mgr->groups[i].tunnels));
 	}
 
-#ifdef CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	ref_tracker_dir_exit(&mgr->ref_tracker);
 #endif
 
 	kfree(mgr->groups);
 	kfree(mgr);
@@ -1916,11 +1916,11 @@ drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
 		kfree(mgr);
 
 		return NULL;
 	}
 
-#ifdef CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE
+#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	ref_tracker_dir_init(&mgr->ref_tracker, 16, "dptun");
 #endif
 
 	for (i = 0; i < max_group_count; i++) {
 		if (!init_group(mgr, &mgr->groups[i])) {
drivers/gpu/drm/i915/Kconfig.debug +1 -1
index bc18e2d9ea05..5ae02c1cd25c 100644
@@ -26,11 +26,11 @@ config DRM_I915_DEBUG
 	select I2C_CHARDEV
 	select REF_TRACKER
 	select STACKDEPOT
 	select STACKTRACE
 	select DRM_DP_AUX_CHARDEV
-	select DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE if DRM_I915_DP_TUNNEL
+	select DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG if DRM_I915_DP_TUNNEL
 	select X86_MSR # used by igt/pm_rpm
 	select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
 	select DRM_DEBUG_MM if DRM=y
 	select DRM_EXPORT_FOR_TESTS if m
 	select DRM_DEBUG_SELFTEST
Signature · 1 line
2.44.0
author maintainer
#3 lore raw

PATCH v3 3/13 drm/display: Make DisplayPort AUX Chardev Kconfig name consistent

In reply to Maxime Ripard

While most display helpers Kconfig symbols have the DRM_DISPLAY prefix, the DisplayPort-AUX chardev interface uses DRM_DP_AUX_CHARDEV.

Since the number of users is limited and it's a selected symbol, we can easily rename it to make it consistent.

---
 drivers/gpu/drm/display/Kconfig                  | 2 +-
 drivers/gpu/drm/display/Makefile                 | 2 +-
 drivers/gpu/drm/display/drm_dp_helper.c          | 2 +-
 drivers/gpu/drm/display/drm_dp_helper_internal.h | 2 +-
 drivers/gpu/drm/i915/Kconfig.debug               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/display/Kconfig +1 -1
index 0d350e9db807..038be9795581 100644
@@ -48,11 +48,11 @@ config DRM_DISPLAY_HDMI_HELPER
 	bool
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for HDMI.
 
-config DRM_DP_AUX_CHARDEV
+config DRM_DISPLAY_DP_AUX_CHARDEV
 	bool "DRM DP AUX Interface"
 	depends on DRM && DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	help
 	  Choose this option to enable a /dev/drm_dp_auxN node that allows to
drivers/gpu/drm/display/Makefile +1 -1
index 3edf1ba2764e..44015aef1e8c 100644
@@ -12,9 +12,9 @@ drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_TUNNEL) += \
 	drm_dp_tunnel.o
 drm_display_helper-$(CONFIG_DRM_DISPLAY_HDCP_HELPER) += drm_hdcp_helper.o
 drm_display_helper-$(CONFIG_DRM_DISPLAY_HDMI_HELPER) += \
 	drm_hdmi_helper.o \
 	drm_scdc_helper.o
-drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o
+drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV) += drm_dp_aux_dev.o
 drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
 
 obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
drivers/gpu/drm/display/drm_dp_helper.c +1 -1
index 266826eac4a7..66a1785447b8 100644
@@ -2111,11 +2111,11 @@ EXPORT_SYMBOL(drm_dp_aux_init);
  * &drm_dp_aux.dev will typically be the &drm_connector &device which
  * corresponds to @aux. For these devices, it's advised to call
  * drm_dp_aux_register() in &drm_connector_funcs.late_register, and likewise to
  * call drm_dp_aux_unregister() in &drm_connector_funcs.early_unregister.
  * Functions which don't follow this will likely Oops when
- * %CONFIG_DRM_DP_AUX_CHARDEV is enabled.
+ * %CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV is enabled.
  *
  * For devices where the AUX channel is a device that exists independently of
  * the &drm_device that uses it, such as SoCs and bridge devices, it is
  * recommended to call drm_dp_aux_register() after a &drm_device has been
  * assigned to &drm_dp_aux.drm_dev, and likewise to call
drivers/gpu/drm/display/drm_dp_helper_internal.h +1 -1
index 8917fc3af9ec..737949a2820f 100644
@@ -3,11 +3,11 @@
 #ifndef DRM_DP_HELPER_INTERNAL_H
 #define DRM_DP_HELPER_INTERNAL_H
 
 struct drm_dp_aux;
 
-#ifdef CONFIG_DRM_DP_AUX_CHARDEV
+#ifdef CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV
 int drm_dp_aux_dev_init(void);
 void drm_dp_aux_dev_exit(void);
 int drm_dp_aux_register_devnode(struct drm_dp_aux *aux);
 void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux);
 #else
drivers/gpu/drm/i915/Kconfig.debug +1 -1
index 5ae02c1cd25c..d8397065c3f0 100644
@@ -25,11 +25,11 @@ config DRM_I915_DEBUG
 	select PREEMPT_COUNT
 	select I2C_CHARDEV
 	select REF_TRACKER
 	select STACKDEPOT
 	select STACKTRACE
-	select DRM_DP_AUX_CHARDEV
+	select DRM_DISPLAY_DP_AUX_CHARDEV
 	select DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG if DRM_I915_DP_TUNNEL
 	select X86_MSR # used by igt/pm_rpm
 	select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
 	select DRM_DEBUG_MM if DRM=y
 	select DRM_EXPORT_FOR_TESTS if m
Signature · 1 line
2.44.0
author maintainer
#4 lore raw

PATCH v3 4/13 drm/display: Make DisplayPort CEC-over-AUX Kconfig name consistent

In reply to Maxime Ripard

While most display helpers Kconfig symbols have the DRM_DISPLAY prefix, the DisplayPort CEC tunnelling implementation uses CONFIG_DRM_DISPLAY_DP_AUX_CEC.

Since the number of users is limited, we can easily rename it to make it consistent.

---
 arch/parisc/configs/generic-32bit_defconfig | 2 +-
 drivers/gpu/drm/display/Kconfig             | 2 +-
 drivers/gpu/drm/display/Makefile            | 2 +-
 include/drm/display/drm_dp_helper.h         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/parisc/configs/generic-32bit_defconfig +1 -1
index ee4febb30386..5ce258f3fffa 100644
@@ -129,11 +129,11 @@ CONFIG_PRINTER=m
 CONFIG_PPDEV=m
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C=y
 CONFIG_HWMON=m
 CONFIG_DRM=m
-CONFIG_DRM_DP_CEC=y
+CONFIG_DRM_DISPLAY_DP_AUX_CEC=y
 # CONFIG_DRM_I2C_CH7006 is not set
 # CONFIG_DRM_I2C_SIL164 is not set
 CONFIG_DRM_RADEON=m
 CONFIG_DRM_NOUVEAU=m
 # CONFIG_DRM_NOUVEAU_BACKLIGHT is not set
drivers/gpu/drm/display/Kconfig +1 -1
index 038be9795581..35cb68db0bfd 100644
@@ -57,11 +57,11 @@ config DRM_DISPLAY_DP_AUX_CHARDEV
 	help
 	  Choose this option to enable a /dev/drm_dp_auxN node that allows to
 	  read and write values to arbitrary DPCD registers on the DP aux
 	  channel.
 
-config DRM_DP_CEC
+config DRM_DISPLAY_DP_AUX_CEC
 	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
 	depends on DRM && DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	select CEC_CORE
 	help
drivers/gpu/drm/display/Makefile +1 -1
index 44015aef1e8c..17d2cc73ff56 100644
@@ -13,8 +13,8 @@ drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_TUNNEL) += \
 drm_display_helper-$(CONFIG_DRM_DISPLAY_HDCP_HELPER) += drm_hdcp_helper.o
 drm_display_helper-$(CONFIG_DRM_DISPLAY_HDMI_HELPER) += \
 	drm_hdmi_helper.o \
 	drm_scdc_helper.o
 drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV) += drm_dp_aux_dev.o
-drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
+drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_AUX_CEC) += drm_dp_cec.o
 
 obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
include/drm/display/drm_dp_helper.h +1 -1
index a62fcd051d4d..46f4e0467d24 100644
@@ -720,11 +720,11 @@ static inline int drm_panel_dp_aux_backlight(struct drm_panel *panel,
 	return 0;
 }
 
 #endif
 
-#ifdef CONFIG_DRM_DP_CEC
+#ifdef CONFIG_DRM_DISPLAY_DP_AUX_CEC
 void drm_dp_cec_irq(struct drm_dp_aux *aux);
 void drm_dp_cec_register_connector(struct drm_dp_aux *aux,
 				   struct drm_connector *connector);
 void drm_dp_cec_unregister_connector(struct drm_dp_aux *aux);
 void drm_dp_cec_attach(struct drm_dp_aux *aux, u16 source_physical_address);
Signature · 1 line
2.44.0
author maintainer
#5 lore raw

PATCH v3 5/13 drm/display: Reorder Kconfig symbols

In reply to Maxime Ripard

The display kconfig helpers are not organized in any particular order, so let's move them around to create an alphabetical order.

---
 drivers/gpu/drm/display/Kconfig | 52 ++++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/gpu/drm/display/Kconfig +26 -26
index 35cb68db0bfd..864a6488bfdf 100644
@@ -1,18 +1,39 @@
 # SPDX-License-Identifier: MIT
 
-config DRM_DISPLAY_DP_AUX_BUS
-	tristate
-	depends on DRM
-	depends on OF || COMPILE_TEST
-
 config DRM_DISPLAY_HELPER
 	tristate
 	depends on DRM
 	help
 	  DRM helpers for display adapters.
 
+config DRM_DISPLAY_DP_AUX_BUS
+	tristate
+	depends on DRM
+	depends on OF || COMPILE_TEST
+
+config DRM_DISPLAY_DP_AUX_CEC
+	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
+	depends on DRM && DRM_DISPLAY_HELPER
+	select DRM_DISPLAY_DP_HELPER
+	select CEC_CORE
+	help
+	  Choose this option if you want to enable HDMI CEC support for
+	  DisplayPort/USB-C to HDMI adapters.
+
+	  Note: not all adapters support this feature, and even for those
+	  that do support this they often do not hook up the CEC pin.
+
+config DRM_DISPLAY_DP_AUX_CHARDEV
+	bool "DRM DP AUX Interface"
+	depends on DRM && DRM_DISPLAY_HELPER
+	select DRM_DISPLAY_DP_HELPER
+	help
+	  Choose this option to enable a /dev/drm_dp_auxN node that allows to
+	  read and write values to arbitrary DPCD registers on the DP aux
+	  channel.
+
 config DRM_DISPLAY_DP_HELPER
 	bool
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for DisplayPort.
@@ -47,26 +68,5 @@ config DRM_DISPLAY_HDCP_HELPER
 config DRM_DISPLAY_HDMI_HELPER
 	bool
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for HDMI.
-
-config DRM_DISPLAY_DP_AUX_CHARDEV
-	bool "DRM DP AUX Interface"
-	depends on DRM && DRM_DISPLAY_HELPER
-	select DRM_DISPLAY_DP_HELPER
-	help
-	  Choose this option to enable a /dev/drm_dp_auxN node that allows to
-	  read and write values to arbitrary DPCD registers on the DP aux
-	  channel.
-
-config DRM_DISPLAY_DP_AUX_CEC
-	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
-	depends on DRM && DRM_DISPLAY_HELPER
-	select DRM_DISPLAY_DP_HELPER
-	select CEC_CORE
-	help
-	  Choose this option if you want to enable HDMI CEC support for
-	  DisplayPort/USB-C to HDMI adapters.
-
-	  Note: not all adapters support this feature, and even for those
-	  that do support this they often do not hook up the CEC pin.
Signature · 1 line
2.44.0
author maintainer
#6 lore raw

PATCH v3 6/13 drm/display: Make all helpers visible and switch to depends on

In reply to Maxime Ripard

All the helpers Kconfig symbols so far have relied on drivers selecting them, and that's what most drivers did.

However, this creates an issue nowadays when helpers depend on each other, and select doesn't transitively select a dependency dependencies.

Depends on doesn't have that limitation though, so let's convert those symbols to be dependable and use depends on between them too.

---
 drivers/gpu/drm/display/Kconfig | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/gpu/drm/display/Kconfig +14 -12
index 864a6488bfdf..c77e7f85bd67 100644
@@ -1,48 +1,50 @@
 # SPDX-License-Identifier: MIT
 
 config DRM_DISPLAY_HELPER
-	tristate
+	tristate "DRM Display Helpers"
 	depends on DRM
 	help
 	  DRM helpers for display adapters.
 
 config DRM_DISPLAY_DP_AUX_BUS
-	tristate
+	tristate "DRM DisplayPort AUX bus support"
 	depends on DRM
 	depends on OF || COMPILE_TEST
 
 config DRM_DISPLAY_DP_AUX_CEC
 	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
-	depends on DRM && DRM_DISPLAY_HELPER
-	select DRM_DISPLAY_DP_HELPER
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on DRM_DISPLAY_DP_HELPER
 	select CEC_CORE
 	help
 	  Choose this option if you want to enable HDMI CEC support for
 	  DisplayPort/USB-C to HDMI adapters.
 
 	  Note: not all adapters support this feature, and even for those
 	  that do support this they often do not hook up the CEC pin.
 
 config DRM_DISPLAY_DP_AUX_CHARDEV
-	bool "DRM DP AUX Interface"
-	depends on DRM && DRM_DISPLAY_HELPER
-	select DRM_DISPLAY_DP_HELPER
+	bool "DRM DisplayPort AUX Interface"
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on DRM_DISPLAY_DP_HELPER
 	help
 	  Choose this option to enable a /dev/drm_dp_auxN node that allows to
 	  read and write values to arbitrary DPCD registers on the DP aux
 	  channel.
 
 config DRM_DISPLAY_DP_HELPER
-	bool
+	bool "DRM DisplayPort Helpers"
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for DisplayPort.
 
 config DRM_DISPLAY_DP_TUNNEL
-	bool
-	select DRM_DISPLAY_DP_HELPER
+	bool "DRM DisplayPort tunnels support"
+	depends on DRM_DISPLAY_DP_HELPER
 	help
 	  Enable support for DisplayPort tunnels. This allows drivers to use
 	  DP tunnel features like the Bandwidth Allocation mode to maximize the
 	  BW utilization for display streams on Thunderbolt links.
 
@@ -58,15 +60,15 @@ config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	  streams contained in tunnels.
 
 	  If in doubt, say "N".
 
 config DRM_DISPLAY_HDCP_HELPER
-	bool
+	bool "DRM HDCD Helpers"
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for HDCP.
 
 config DRM_DISPLAY_HDMI_HELPER
-	bool
+	bool "DRM HDMI Helpers"
 	depends on DRM_DISPLAY_HELPER
 	help
 	  DRM display helpers for HDMI.
Signature · 1 line
2.44.0
author maintainer
#7 lore raw

PATCH v3 7/13 drm: Make drivers depends on DRM_DW_HDMI

In reply to Maxime Ripard

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

---
 drivers/gpu/drm/bridge/imx/Kconfig      | 4 ++--
 drivers/gpu/drm/imx/ipuv3/Kconfig       | 5 +++--
 drivers/gpu/drm/ingenic/Kconfig         | 2 +-
 drivers/gpu/drm/meson/Kconfig           | 2 +-
 drivers/gpu/drm/renesas/rcar-du/Kconfig | 2 +-
 drivers/gpu/drm/rockchip/Kconfig        | 2 +-
 drivers/gpu/drm/sun4i/Kconfig           | 2 +-
 7 files changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/imx/Kconfig +2 -2
index 5965e8027529..7687ed652df5 100644
@@ -3,13 +3,13 @@ if ARCH_MXC || COMPILE_TEST
 config DRM_IMX_LDB_HELPER
 	tristate
 
 config DRM_IMX8MP_DW_HDMI_BRIDGE
 	tristate "Freescale i.MX8MP HDMI-TX bridge support"
-	depends on OF
 	depends on COMMON_CLK
-	select DRM_DW_HDMI
+	depends on DRM_DW_HDMI
+	depends on OF
 	select DRM_IMX8MP_HDMI_PVI
 	select PHY_FSL_SAMSUNG_HDMI_PHY
 	help
 	  Choose this to enable support for the internal HDMI encoder found
 	  on the i.MX8MP SoC.
drivers/gpu/drm/imx/ipuv3/Kconfig +3 -2
index bacf0655ebaf..5d810ac02171 100644
@@ -33,9 +33,10 @@ config DRM_IMX_LDB
 	  Choose this to enable the internal LVDS Display Bridge (LDB)
 	  found on i.MX53 and i.MX6 processors.
 
 config DRM_IMX_HDMI
 	tristate "Freescale i.MX DRM HDMI"
-	select DRM_DW_HDMI
-	depends on DRM_IMX && OF
+	depends on DRM_DW_HDMI
+	depends on DRM_IMX
+	depends on OF
 	help
 	  Choose this if you want to use HDMI on i.MX6.
drivers/gpu/drm/ingenic/Kconfig +1 -1
index 3db117c5edd9..23effeb2ac72 100644
@@ -25,12 +25,12 @@ config DRM_INGENIC_IPU
 
 	  The Image Processing Unit (IPU) will appear as a second primary plane.
 
 config DRM_INGENIC_DW_HDMI
 	tristate "Ingenic specific support for Synopsys DW HDMI"
+	depends on DRM_DW_HDMI
 	depends on MACH_JZ4780
-	select DRM_DW_HDMI
 	help
 	  Choose this option to enable Synopsys DesignWare HDMI based driver.
 	  If you want to enable HDMI on Ingenic JZ4780 based SoC, you should
 	  select this option.
 
drivers/gpu/drm/meson/Kconfig +1 -1
index 615fdd0ce41b..5520b9e3f010 100644
@@ -11,13 +11,13 @@ config DRM_MESON
 	select MESON_CANVAS
 	select CEC_CORE if CEC_NOTIFIER
 
 config DRM_MESON_DW_HDMI
 	tristate "HDMI Synopsys Controller support for Amlogic Meson Display"
+	depends on DRM_DW_HDMI
 	depends on DRM_MESON
 	default y if DRM_MESON
-	select DRM_DW_HDMI
 	imply DRM_DW_HDMI_I2S_AUDIO
 
 config DRM_MESON_DW_MIPI_DSI
 	tristate "MIPI DSI Synopsys Controller support for Amlogic Meson Display"
 	depends on DRM_MESON
drivers/gpu/drm/renesas/rcar-du/Kconfig +1 -1
index 53c356aed5d5..2dc739db2ba3 100644
@@ -23,12 +23,12 @@ config DRM_RCAR_CMM
 	depends on DRM_RCAR_USE_CMM
 
 config DRM_RCAR_DW_HDMI
 	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
 	depends on DRM && OF
+	depends on DRM_DW_HDMI
 	depends on DRM_RCAR_DU || COMPILE_TEST
-	select DRM_DW_HDMI
 	help
 	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.
 
 config DRM_RCAR_USE_LVDS
 	bool "R-Car DU LVDS Encoder Support"
drivers/gpu/drm/rockchip/Kconfig +1 -1
index 1bf3e2829cd0..0d5260e10f27 100644
@@ -5,11 +5,10 @@ config DRM_ROCKCHIP
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select VIDEOMODE_HELPERS
 	select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP
-	select DRM_DW_HDMI if ROCKCHIP_DW_HDMI
 	select DRM_DW_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI
 	select GENERIC_PHY if ROCKCHIP_DW_MIPI_DSI
 	select GENERIC_PHY_MIPI_DPHY if ROCKCHIP_DW_MIPI_DSI
 	select SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC
 	help
@@ -55,10 +54,11 @@ config ROCKCHIP_CDN_DP
 	  RK3399 based SoC, you should select this
 	  option.
 
 config ROCKCHIP_DW_HDMI
 	bool "Rockchip specific extensions for Synopsys DW HDMI"
+	depends on DRM_DW_HDMI
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the Synopsys DesignWare HDMI driver. If you want to
 	  enable HDMI on RK3288 or RK3399 based SoC, you should select
 	  this option.
drivers/gpu/drm/sun4i/Kconfig +1 -1
index 4741d9f6544c..5b19c7cb7b7e 100644
@@ -55,12 +55,12 @@ config DRM_SUN6I_DSI
 	  sun6i_mipi_dsi.
 
 config DRM_SUN8I_DW_HDMI
 	tristate "Support for Allwinner version of DesignWare HDMI"
 	depends on DRM_SUN4I
+	depends on DRM_DW_HDMI
 	default DRM_SUN4I
-	select DRM_DW_HDMI
 	help
 	  Choose this option if you have an Allwinner SoC with the
 	  DesignWare HDMI controller. SoCs that support HDMI and
 	  have a Display Engine 2.0 contain this controller. If M is
 	  selected the module will be called sun8i_dw_hdmi.
Signature · 1 line
2.44.0
maintainer Acked-by on v3 7/13
#8 lore raw

Re: [PATCH v3 07/13] drm: Make drivers depends on DRM_DW_HDMI

Quoted 13 lines · Maxime Ripard

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

Quoted 3 lines
Quoted 148 lines
---
 drivers/gpu/drm/bridge/imx/Kconfig      | 4 ++--
 drivers/gpu/drm/imx/ipuv3/Kconfig       | 5 +++--
 drivers/gpu/drm/ingenic/Kconfig         | 2 +-
 drivers/gpu/drm/meson/Kconfig           | 2 +-
 drivers/gpu/drm/renesas/rcar-du/Kconfig | 2 +-
 drivers/gpu/drm/rockchip/Kconfig        | 2 +-
 drivers/gpu/drm/sun4i/Kconfig           | 2 +-
 7 files changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/imx/Kconfig +2 -2
index 5965e8027529..7687ed652df5 100644
@@ -3,13 +3,13 @@ if ARCH_MXC || COMPILE_TEST
 config DRM_IMX_LDB_HELPER
 	tristate
 
 config DRM_IMX8MP_DW_HDMI_BRIDGE
 	tristate "Freescale i.MX8MP HDMI-TX bridge support"
-	depends on OF
 	depends on COMMON_CLK
-	select DRM_DW_HDMI
+	depends on DRM_DW_HDMI
+	depends on OF
 	select DRM_IMX8MP_HDMI_PVI
 	select PHY_FSL_SAMSUNG_HDMI_PHY
 	help
 	  Choose this to enable support for the internal HDMI encoder found
 	  on the i.MX8MP SoC.
drivers/gpu/drm/imx/ipuv3/Kconfig +3 -2
index bacf0655ebaf..5d810ac02171 100644
@@ -33,9 +33,10 @@ config DRM_IMX_LDB
 	  Choose this to enable the internal LVDS Display Bridge (LDB)
 	  found on i.MX53 and i.MX6 processors.
 
 config DRM_IMX_HDMI
 	tristate "Freescale i.MX DRM HDMI"
-	select DRM_DW_HDMI
-	depends on DRM_IMX && OF
+	depends on DRM_DW_HDMI
+	depends on DRM_IMX
+	depends on OF
 	help
 	  Choose this if you want to use HDMI on i.MX6.
drivers/gpu/drm/ingenic/Kconfig +1 -1
index 3db117c5edd9..23effeb2ac72 100644
@@ -25,12 +25,12 @@ config DRM_INGENIC_IPU
 
 	  The Image Processing Unit (IPU) will appear as a second primary plane.
 
 config DRM_INGENIC_DW_HDMI
 	tristate "Ingenic specific support for Synopsys DW HDMI"
+	depends on DRM_DW_HDMI
 	depends on MACH_JZ4780
-	select DRM_DW_HDMI
 	help
 	  Choose this option to enable Synopsys DesignWare HDMI based driver.
 	  If you want to enable HDMI on Ingenic JZ4780 based SoC, you should
 	  select this option.
 
drivers/gpu/drm/meson/Kconfig +1 -1
index 615fdd0ce41b..5520b9e3f010 100644
@@ -11,13 +11,13 @@ config DRM_MESON
 	select MESON_CANVAS
 	select CEC_CORE if CEC_NOTIFIER
 
 config DRM_MESON_DW_HDMI
 	tristate "HDMI Synopsys Controller support for Amlogic Meson Display"
+	depends on DRM_DW_HDMI
 	depends on DRM_MESON
 	default y if DRM_MESON
-	select DRM_DW_HDMI
 	imply DRM_DW_HDMI_I2S_AUDIO
 
 config DRM_MESON_DW_MIPI_DSI
 	tristate "MIPI DSI Synopsys Controller support for Amlogic Meson Display"
 	depends on DRM_MESON
drivers/gpu/drm/renesas/rcar-du/Kconfig +1 -1
index 53c356aed5d5..2dc739db2ba3 100644
@@ -23,12 +23,12 @@ config DRM_RCAR_CMM
 	depends on DRM_RCAR_USE_CMM
 
 config DRM_RCAR_DW_HDMI
 	tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
 	depends on DRM && OF
+	depends on DRM_DW_HDMI
 	depends on DRM_RCAR_DU || COMPILE_TEST
-	select DRM_DW_HDMI
 	help
 	  Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.
 
 config DRM_RCAR_USE_LVDS
 	bool "R-Car DU LVDS Encoder Support"
drivers/gpu/drm/rockchip/Kconfig +1 -1
index 1bf3e2829cd0..0d5260e10f27 100644
@@ -5,11 +5,10 @@ config DRM_ROCKCHIP
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select VIDEOMODE_HELPERS
 	select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP
-	select DRM_DW_HDMI if ROCKCHIP_DW_HDMI
 	select DRM_DW_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI
 	select GENERIC_PHY if ROCKCHIP_DW_MIPI_DSI
 	select GENERIC_PHY_MIPI_DPHY if ROCKCHIP_DW_MIPI_DSI
 	select SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC
 	help
@@ -55,10 +54,11 @@ config ROCKCHIP_CDN_DP
 	  RK3399 based SoC, you should select this
 	  option.
 
 config ROCKCHIP_DW_HDMI
 	bool "Rockchip specific extensions for Synopsys DW HDMI"
+	depends on DRM_DW_HDMI
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the Synopsys DesignWare HDMI driver. If you want to
 	  enable HDMI on RK3288 or RK3399 based SoC, you should select
 	  this option.
drivers/gpu/drm/sun4i/Kconfig +1 -1
index 4741d9f6544c..5b19c7cb7b7e 100644
@@ -55,12 +55,12 @@ config DRM_SUN6I_DSI
 	  sun6i_mipi_dsi.
 
 config DRM_SUN8I_DW_HDMI
 	tristate "Support for Allwinner version of DesignWare HDMI"
 	depends on DRM_SUN4I
+	depends on DRM_DW_HDMI
 	default DRM_SUN4I
-	select DRM_DW_HDMI
 	help
 	  Choose this option if you have an Allwinner SoC with the
 	  DesignWare HDMI controller. SoCs that support HDMI and
 	  have a Display Engine 2.0 contain this controller. If M is
 	  selected the module will be called sun8i_dw_hdmi.
Signature · 1 line
Jani Nikula, Intel
#9 lore raw

Re: [PATCH v3 07/13] drm: Make drivers depends on DRM_DW_HDMI

In reply to Maxime Ripard
Quoted 4 lines · Maxime Ripard

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

Quoted 8 lines

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

This has landed in -next and appears to be causing breakage for several platforms using these devices. For example I'm seeing the HDMI fail to probe on sun50i-a64-pin64-plus with arm64 defconfig, the DT kselftest result isn't terribly informative but it can be seen here:

https://lava.sirena.org.uk/scheduler/job/78288#L6007

which I bisected to this change:

# bad: [c0b832517f627ead3388c6f0c74e8ac10ad5774b] Add linux-next specific files for 20240402
# good: [0fc83069bcaee78f60b8511d9453a9441963a072] Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git
# good: [ba5206881843e16b74a07c37970dcc44d22f8f6f] spi: spi.h: add missing kernel-doc for @last_cs_index_mask
# good: [64fe73d10323e399b2e8eb5407390bcb302a046c] spi: fsl: remove is_dma_mapped checks
# good: [bb77c99ee6d3d704086acf141d3ec92601747809] spi: pxa2xx: Skip SSP initialization if it's done elsewhere
# good: [e64d3b6fc9a388d7dc516668651cf4404bffec9b] spi: omap2-mcpsi: Enable MULTI-mode in more situations
# good: [57ad033ce09d4d0c866ac558fc3c4cf53cfb2599] ASoC: Intel: sof_cs42l42: add mtl_cs42l42_def for mtl boards
# good: [7b5f2072657a9041cbaf4ba139f672be11694ca3] ASoC: dt-bindings: fsl-sai: allow only one dma-names
# good: [a5bef84422eb066ee8fa5c13960657a79b3cc1e7] spi: fsl-dspi: drop driver owner assignment
# good: [29580cd7b9c6f975e88597ca66a001b16b97bae9] ASoC: sdw-mockup: drop driver owner assignment
# good: [ea60ab95723f5738e7737b56dda95e6feefa5b50] ASoC: kirkwood: Fix potential NULL dereference
# good: [c0a3873b9938bfaa77bd337cad33266a50a6583f] ASoC: nau8325: new driver
# good: [559aebe45a054a479fdbd2a3dfba999ffd73cc9d] ASoC: sun8i-codec: Fix build with CONFIG_SND_JACK_INPUT_DEV disabled
# good: [d5449432f794e75cd4f5e46bc33bfe6ce20b657d] spi: pxa2xx: Switch to use dev_err_probe()
# good: [7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8] ASoC: soc-jack: Get rid of legacy GPIO support
# good: [ea5fee227ff3dae209062ac9544906debe1e9ac1] ASoC: hdac_hda: improve error logs
# good: [4ed0915f5bc4bcc81bca783a5b984f3d81e9764e] ASoC: codecs: Add RK3308 internal audio codec driver
# good: [59ffeb15b2f7b44cf934fd778dc0d98a35aa6a84] ASoC: Intel: sof_sdw: Add support for cs42l43 optional speaker output
# good: [1e90a846493c716e3e6b4d901fc0844e9eea6430] ASoC: soc-dai: Note valid values of sysclock direction
# good: [61cafaeab5bca2d3e6a68ee8fa92b5c10b8610ca] ASoC: Intel: sof_rt5682: board id cleanup for cml boards
# good: [9b163e0d330debbf7dcc14b2c3e2dc19a3b50a1d] spi: remove struct spi_message::is_dma_mapped
# good: [b340f56a74b62d8ce8617650c8ab4a26c87ba5c5] ASoC: dt-bindings: wm8974: Convert to dtschema
# good: [bdeef5dcea6b164f4bd614655821b1ef12ebec9a] spi: rspi: Get rid of unused struct rspi_plat_data
# good: [885dd75f41f9fff5b277bc6ab28ad798f98a37b4] ASoC: dt-bindings: fsl-esai: Convert fsl,esai.txt to yaml
# good: [10402419f2d60890525f590b54d0eaec3de0d87a] spi: spi-mt65xx: Rename a variable in interrupt handler
# good: [9855f05e553637f05494cf47a3154cbf9a5cfc67] ASoC: fsl: imx-es8328: Switch to using gpiod API
# good: [5f39231888c63f0a7708abc86b51b847476379d8] ASoC: mediatek: Assign dummy when codec not specified for a DAI link
# good: [5edeb7d312628961046eec9b26a7e72f44baf846] regulator: pca9450: add pca9451a support
# good: [c14445bdcb98feddf9afaeb05e6193cc1f8eec1a] ASoC: fsl: imx-rpmsg: Update to correct DT node
# good: [a39111b1cf0864b1782f30f9a1fa65260d057327] spi: xilinx: Make num_chipselect 8-bit in the struct xspi_platform_data
# good: [b5867a5c0d7a6bf36f59f3d472c7aed33ca4d02c] spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c
# good: [60c10c678b582d41532fefa12667d8adca75811b] ASoC: Intel: avs: i2s_test: Remove redundant dapm routes
# good: [21fa98f4197bb3365dda1417708b318f403c13c1] ASoC: sun8i-codec: Implement jack and accessory detection
# good: [cee28113db17f0de58df0eaea4e2756c404ee01f] ASoC: dmaengine_pcm: Allow passing component name via config
# good: [aad6b35290f52639d3601063d33d9621c0948a04] regmap: maple: Remove second semicolon
# good: [e6913c6ef83c80aa7569c9e08204542222fbf542] ASoC: codecs: ES8326: Delete unused REG_SUPPLY
# good: [0c5f77f4eaef8ed9fe752d21f40ac471dd511cfc] dt-bindings: regulator: qcom,usb-vbus-regulator: Add PM7250B compatible
# good: [ab470abe58c09b2fbe2c1478e67a904fd803e84f] regulator: rpi-panel-attiny: convert to use maple tree register cache
git bisect start 'c0b832517f627ead3388c6f0c74e8ac10ad5774b' '0fc83069bcaee78f60b8511d9453a9441963a072' 'ba5206881843e16b74a07c37970dcc44d22f8f6f' '64fe73d10323e399b2e8eb5407390bcb302a046c' 'bb77c99ee6d3d704086acf141d3ec92601747809' 'e64d3b6fc9a388d7dc516668651cf4404bffec9b' '57ad033ce09d4d0c866ac558fc3c4cf53cfb2599' '7b5f2072657a9041cbaf4ba139f672be11694ca3' 'a5bef84422eb066ee8fa5c13960657a79b3cc1e7' '29580cd7b9c6f975e88597ca66a001b16b97bae9' 'ea60ab95723f5738e7737b56dda95e6feefa5b50' 'c0a3873b9938bfaa77bd337cad33266a50a6583f' '559aebe45a054a479fdbd2a3dfba999ffd73cc9d' 'd5449432f794e75cd4f5e46bc33bfe6ce20b657d' '7b95ee0db7e0a7f99077f1b926323c7bf0d2e8f8' 'ea5fee227ff3dae209062ac9544906debe1e9ac1' '4ed0915f5bc4bcc81bca783a5b984f3d81e9764e' '59ffeb15b2f7b44cf934fd778dc0d98a35aa6a84' '1e90a846493c716e3e6b4d901fc0844e9eea6430' '61cafaeab5bca2d3e6a68ee8fa92b5c10b8610ca' '9b163e0d330debbf7dcc14b2c3e2dc19a3b50a1d' 'b340f56a74b62d8ce8617650c8ab4a26c87ba5c5' 'bdeef5dcea6b164f4bd614655821b1ef12ebec9a' '885dd75f41f9fff5b277bc6ab28ad798f98a37b4' '10402419f2d60890525f590b54d0eaec3de0d87a' '9855f05e553637f05494cf47a3154cbf9a5cfc67' '5f39231888c63f0a7708abc86b51b847476379d8' '5edeb7d312628961046eec9b26a7e72f44baf846' 'c14445bdcb98feddf9afaeb05e6193cc1f8eec1a' 'a39111b1cf0864b1782f30f9a1fa65260d057327' 'b5867a5c0d7a6bf36f59f3d472c7aed33ca4d02c' '60c10c678b582d41532fefa12667d8adca75811b' '21fa98f4197bb3365dda1417708b318f403c13c1' 'cee28113db17f0de58df0eaea4e2756c404ee01f' 'aad6b35290f52639d3601063d33d9621c0948a04' 'e6913c6ef83c80aa7569c9e08204542222fbf542' '0c5f77f4eaef8ed9fe752d21f40ac471dd511cfc' 'ab470abe58c09b2fbe2c1478e67a904fd803e84f' # bad: [c0b832517f627ead3388c6f0c74e8ac10ad5774b] Add linux-next specific files for 20240402
git bisect bad c0b832517f627ead3388c6f0c74e8ac10ad5774b
# bad: [784b758e641c4b36be7ef8ab585bea834099b030] Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/misc/kernel.git
git bisect bad 784b758e641c4b36be7ef8ab585bea834099b030
# good: [8b8b4dca2ddd82d3ae7e2a6a2fc7d49e511ceae7] Merge branch 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git
git bisect good 8b8b4dca2ddd82d3ae7e2a6a2fc7d49e511ceae7
# good: [2c20b30ed316f5cb8773e5f99c02cd997f2374b7] Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
git bisect good 2c20b30ed316f5cb8773e5f99c02cd997f2374b7
# good: [e1191745c053b07a2e7364f8b95cda470f03cbbe] Merge branch 'nand/next' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
git bisect good e1191745c053b07a2e7364f8b95cda470f03cbbe
# good: [6e3fdedcf0bc03c852d9fdbb5443f1e43103195f] drm/edid: Add a function to match EDID with identity
git bisect good 6e3fdedcf0bc03c852d9fdbb5443f1e43103195f
# bad: [4d15125d7fe637f401e64e33c99513adf6586fdd] drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on
git bisect bad 4d15125d7fe637f401e64e33c99513adf6586fdd
# good: [0b45921c2a8831834a5f8a52ddd0b25b5b1c6faf] drm/panthor: Don't use virt_to_pfn()
git bisect good 0b45921c2a8831834a5f8a52ddd0b25b5b1c6faf
# good: [462a7c0f8e3f833e5ca3dd3f427882b60b3f38e9] drm/panthor: Fix wrong kernel-doc format in the uAPI header
git bisect good 462a7c0f8e3f833e5ca3dd3f427882b60b3f38e9
# good: [4d66d841a72557053fa44f9b6ebf09cf78223ed3] drm/display: Make DisplayPort AUX Chardev Kconfig name consistent
git bisect good 4d66d841a72557053fa44f9b6ebf09cf78223ed3
# good: [d674858ff979550a0e97b4ac766f2640f0d9d7e7] drm/display: Make all helpers visible and switch to depends on
git bisect good d674858ff979550a0e97b4ac766f2640f0d9d7e7
# bad: [e075e496f516bf92bc0cbaf94d64e8d4a6b58321] drm: Switch DRM_DISPLAY_HELPER to depends on
git bisect bad e075e496f516bf92bc0cbaf94d64e8d4a6b58321
# bad: [c0e0f139354c01e0213204e4a96e7076e5a3e396] drm: Make drivers depends on DRM_DW_HDMI
git bisect bad c0e0f139354c01e0213204e4a96e7076e5a3e396

# first bad commit: [c0e0f139354c01e0213204e4a96e7076e5a3e396] drm: Make drivers depends on DRM_DW_HDMI

I'm also seeing similar problems on sun50i-h5-libretech-all-h3-cc which bisected to the same commit, and on imx6dl-udoo and imx6q-udoo with multi_v7_defconfig which I didn't run bisects for. I didn't fully check all the boards.

The change introduces a new dependency on DRM_DW_HDMI to the various drivers but I'm not seeing any defconfig updates which turn that option anywhere so it's not clear how this is expected to avoid regressing the defconfig behaviours unless I'm missing something?

#10 lore raw

Re: [PATCH v3 07/13] drm: Make drivers depends on DRM_DW_HDMI

Hi,

Am Dienstag, 2. April 2024, 17:43:41 CEST schrieb Mark Brown:

Quoted 21 lines · Maxime Ripard
Quoted 5 lines

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

Quoted 8 lines

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

This has landed in -next and appears to be causing breakage for several platforms using these devices. For example I'm seeing the HDMI fail to probe on sun50i-a64-pin64-plus with arm64 defconfig, the DT kselftest result isn't terribly informative but it can be seen here:
[snip]

Quoted 4 lines

The change introduces a new dependency on DRM_DW_HDMI to the various drivers but I'm not seeing any defconfig updates which turn that option anywhere so it's not clear how this is expected to avoid regressing the defconfig behaviours unless I'm missing something?

I noticed the same. From what I can tell, several drivers (e.g. imx8mp and imx6q) now depend on DRM_DW_HDMI without anybody actually selecting it. This results in a dependency which can not be enabled manually. Reverting restores a working driver.

Best regards,
Alexander

Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
#11 lore raw

Re: [PATCH v3 07/13] drm: Make drivers depends on DRM_DW_HDMI

In reply to Mark Brown
Quoted 15 lines · Mark Brown
Quoted 4 lines · Maxime Ripard

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

Quoted 8 lines

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

Quoted 4 lines

This has landed in -next and appears to be causing breakage for several platforms using these devices. For example I'm seeing the HDMI fail to probe on sun50i-a64-pin64-plus with arm64 defconfig, the DT kselftest result isn't terribly informative but it can be seen here:

It has now been *three* weeks that this breakage has sat unaddressed in -next, this has been making my CI for -next unusable. Given that getting the defconfig bits of this merged appears somwhow unreasonably difficult can we please drop these changes from the DRM tree until some strategy for getting everything merged is put into place?

maintainer
#12 lore raw

Re: [PATCH v3 07/13] drm: Make drivers depends on DRM_DW_HDMI

Quoted 21 lines · Mark Brown
Quoted 15 lines · Mark Brown
Quoted 4 lines · Maxime Ripard

DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies.

Quoted 8 lines

This could result in Kconfig warnings (and further build breakages) such as:

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_DW_HDMI
Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]:
- DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m]

Quoted 4 lines

This has landed in -next and appears to be causing breakage for several platforms using these devices. For example I'm seeing the HDMI fail to probe on sun50i-a64-pin64-plus with arm64 defconfig, the DT kselftest result isn't terribly informative but it can be seen here:

Quoted 5 lines

It has now been *three* weeks that this breakage has sat unaddressed in -next, this has been making my CI for -next unusable. Given that getting the defconfig bits of this merged appears somwhow unreasonably difficult can we please drop these changes from the DRM tree until some strategy for getting everything merged is put into place?

This is what's being done [1].

BR,
Jani.

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

Signature · 1 line
Jani Nikula, Intel
author maintainer
#13 lore raw

PATCH v3 8/13 drm: Switch DRM_DISPLAY_HELPER to depends on

In reply to Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation, so we can just switch all the drivers that were selecting DRM_DISPLAY_HELPER to depend on it.

---
 drivers/gpu/drm/Kconfig                 |  6 ++++--
 drivers/gpu/drm/amd/amdgpu/Kconfig      |  6 ++++--
 drivers/gpu/drm/bridge/Kconfig          | 10 +++++-----
 drivers/gpu/drm/bridge/analogix/Kconfig |  6 +++---
 drivers/gpu/drm/bridge/cadence/Kconfig  |  4 ++--
 drivers/gpu/drm/bridge/synopsys/Kconfig |  2 +-
 drivers/gpu/drm/display/Kconfig         |  1 +
 drivers/gpu/drm/exynos/Kconfig          |  2 +-
 drivers/gpu/drm/i915/Kconfig            |  2 +-
 drivers/gpu/drm/mediatek/Kconfig        |  2 +-
 drivers/gpu/drm/msm/Kconfig             |  4 ++--
 drivers/gpu/drm/nouveau/Kconfig         |  6 ++++--
 drivers/gpu/drm/panel/Kconfig           | 20 ++++++++++----------
 drivers/gpu/drm/radeon/Kconfig          |  6 ++++--
 drivers/gpu/drm/rockchip/Kconfig        |  4 ++--
 drivers/gpu/drm/tegra/Kconfig           |  2 +-
 drivers/gpu/drm/vc4/Kconfig             |  8 ++++----
 drivers/gpu/drm/xe/Kconfig              |  7 +++++--
 drivers/gpu/drm/xlnx/Kconfig            |  6 ++++--
 19 files changed, 59 insertions(+), 45 deletions(-)
drivers/gpu/drm/Kconfig +4 -2
index 16029435b750..1eb939463c35 100644
@@ -71,14 +71,16 @@ config DRM_KUNIT_TEST_HELPERS
 	help
 	  KUnit Helpers for KMS drivers.
 
 config DRM_KUNIT_TEST
 	tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
-	depends on DRM && KUNIT && MMU
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on KUNIT
+	depends on MMU
 	select DRM_BUDDY
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_EXEC
 	select DRM_EXPORT_FOR_TESTS if m
 	select DRM_GEM_SHMEM_HELPER
 	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS
drivers/gpu/drm/amd/amdgpu/Kconfig +4 -2
index 22d88f8ef527..cf931b94a188 100644
@@ -1,16 +1,18 @@
 # SPDX-License-Identifier: MIT
 
 config DRM_AMDGPU
 	tristate "AMD GPU"
-	depends on DRM && PCI && MMU
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on MMU
+	depends on PCI
 	depends on !UML
 	select FW_LOADER
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select DRM_SCHED
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select POWER_SUPPLY
drivers/gpu/drm/bridge/Kconfig +5 -5
index 703c3e30885b..aa870e68e165 100644
@@ -90,14 +90,14 @@ config DRM_FSL_LDB
 	help
 	  Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
 
 config DRM_ITE_IT6505
 	tristate "ITE IT6505 DisplayPort bridge"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
@@ -224,13 +224,13 @@ config DRM_PARADE_PS8622
 	help
 	  Parade eDP-LVDS bridge chip driver.
 
 config DRM_PARADE_PS8640
 	tristate "Parade PS8640 MIPI DSI to eDP Converter"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
@@ -311,13 +311,13 @@ config DRM_TOSHIBA_TC358764
 	help
 	  Toshiba TC358764 DSI/LVDS bridge driver.
 
 config DRM_TOSHIBA_TC358767
 	tristate "Toshiba TC358767 eDP bridge"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
@@ -334,13 +334,13 @@ config DRM_TOSHIBA_TC358768
 	help
 	  Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver.
 
 config DRM_TOSHIBA_TC358775
 	tristate "Toshiba TC358775 DSI/LVDS bridge"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	help
@@ -379,13 +379,13 @@ config DRM_TI_SN65DSI83
 	help
 	  Texas Instruments SN65DSI83 and SN65DSI84 DSI to LVDS Bridge driver
 
 config DRM_TI_SN65DSI86
 	tristate "TI SN65DSI86 DSI to eDP bridge"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select AUXILIARY_BUS
drivers/gpu/drm/bridge/analogix/Kconfig +3 -3
index 4846b2e9be7c..16d18dde483a 100644
@@ -1,25 +1,25 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ANALOGIX_ANX6345
 	tristate "Analogix ANX6345 bridge"
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_ANALOGIX_DP
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	help
 	  ANX6345 is an ultra-low power Full-HD DisplayPort/eDP
 	  transmitter designed for portable devices. The
 	  ANX6345 transforms the LVTTL RGB output of an
 	  application processor to eDP or DisplayPort.
 
 config DRM_ANALOGIX_ANX78XX
 	tristate "Analogix ANX78XX bridge"
+	depends on DRM_DISPLAY_HELPER
 	select DRM_ANALOGIX_DP
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	help
 	  ANX78XX is an ultra-low power Full-HD SlimPort transmitter
 	  designed for portable devices. The ANX78XX transforms
@@ -31,14 +31,14 @@ config DRM_ANALOGIX_DP
 	depends on DRM
 
 config DRM_ANALOGIX_ANX7625
 	tristate "Analogix Anx7625 MIPI to DP interface support"
 	depends on DRM
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_MIPI_DSI
 	help
 	  ANX7625 is an ultra-low power 4K mobile HD transmitter
 	  designed for portable devices. It converts MIPI/DPI to
drivers/gpu/drm/bridge/cadence/Kconfig +2 -2
index cced81633ddc..20143afded40 100644
@@ -21,16 +21,16 @@ config DRM_CDNS_DSI_J721E
 	  the routing of the DSS DPI signal to the Cadence DSI.
 endif
 
 config DRM_CDNS_MHDP8546
 	tristate "Cadence DPI/DP bridge"
+	depends on DRM_DISPLAY_HELPER
+	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL_BRIDGE
-	depends on OF
 	help
 	  Support Cadence DPI to DP bridge. This is an internal
 	  bridge and is meant to be directly embedded in a SoC.
 	  It takes a DPI stream as input and outputs it encoded
 	  in DP format.
drivers/gpu/drm/bridge/synopsys/Kconfig +1 -1
index 15fc182d05ef..f366ece47146 100644
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_DW_HDMI
 	tristate
+	depends on DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_MMIO
 	select CEC_CORE if CEC_NOTIFIER
 
 config DRM_DW_HDMI_AHB_AUDIO
drivers/gpu/drm/display/Kconfig +1 -0
index c77e7f85bd67..cffa2acdbc6c 100644
@@ -1,10 +1,11 @@
 # SPDX-License-Identifier: MIT
 
 config DRM_DISPLAY_HELPER
 	tristate "DRM Display Helpers"
 	depends on DRM
+	default y
 	help
 	  DRM helpers for display adapters.
 
 config DRM_DISPLAY_DP_AUX_BUS
 	tristate "DRM DisplayPort AUX bus support"
drivers/gpu/drm/exynos/Kconfig +1 -1
index 733b109a5095..4b0183bf221c 100644
@@ -2,11 +2,10 @@
 config DRM_EXYNOS
 	tristate "DRM Support for Samsung SoC Exynos Series"
 	depends on OF && DRM && COMMON_CLK
 	depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	depends on MMU
-	select DRM_DISPLAY_HELPER if DRM_EXYNOS_DP
 	select DRM_KMS_HELPER
 	select VIDEOMODE_HELPERS
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
 	select SND_SOC_HDMI_CODEC if SND_SOC
 	help
@@ -66,10 +65,11 @@ config DRM_EXYNOS_DSI
 	  This enables support for Exynos MIPI-DSI device.
 
 config DRM_EXYNOS_DP
 	bool "Exynos specific extensions for Analogix DP driver"
 	depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON
+	depends on DRM_DISPLAY_HELPER
 	select DRM_ANALOGIX_DP
 	select DRM_DISPLAY_DP_HELPER
 	default DRM_EXYNOS
 	select DRM_PANEL
 	help
drivers/gpu/drm/i915/Kconfig +1 -1
index 5932024f8f95..43183a68a095 100644
@@ -1,9 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_I915
 	tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
 	depends on DRM
+	depends on DRM_DISPLAY_HELPER
 	depends on X86 && PCI
 	depends on !PREEMPT_RT
 	select INTEL_GTT if X86
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
@@ -11,11 +12,10 @@ config DRM_I915
 	select SHMEM
 	select TMPFS
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
 	select RELAY
drivers/gpu/drm/mediatek/Kconfig +1 -1
index 96cbe020f493..50bb28327f65 100644
@@ -20,13 +20,13 @@ config DRM_MEDIATEK
 	  This driver provides kernel mode setting and
 	  buffer management to userspace.
 
 config DRM_MEDIATEK_DP
 	tristate "DRM DPTX Support for MediaTek SoCs"
+	depends on DRM_DISPLAY_HELPER
 	depends on DRM_MEDIATEK
 	select PHY_MTK_DP
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM/KMS Display Port driver for MediaTek SoCs.
 
drivers/gpu/drm/msm/Kconfig +2 -2
index 27d72ed8b389..2055266506e5 100644
@@ -1,12 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 config DRM_MSM
 	tristate "MSM DRM"
-	depends on DRM
 	depends on ARCH_QCOM || SOC_IMX5 || COMPILE_TEST
 	depends on COMMON_CLK
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
 	depends on IOMMU_SUPPORT
 	depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
 	depends on QCOM_OCMEM || QCOM_OCMEM=n
 	depends on QCOM_LLCC || QCOM_LLCC=n
 	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
@@ -14,11 +15,10 @@ config DRM_MSM
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_BRIDGE
 	select DRM_PANEL_BRIDGE
drivers/gpu/drm/nouveau/Kconfig +4 -2
index ceef470c9fbf..5ac852b816db 100644
@@ -1,14 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_NOUVEAU
 	tristate "Nouveau (NVIDIA) cards"
-	depends on DRM && PCI && MMU
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on PCI
+	depends on MMU
 	select IOMMU_API
 	select FW_LOADER
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select DRM_EXEC
 	select DRM_GPUVM
drivers/gpu/drm/panel/Kconfig +10 -10
index 9eefe09c2ecb..c83285811bb3 100644
@@ -531,15 +531,15 @@ config DRM_PANEL_RAYDIUM_RM68200
 	  Say Y here if you want to enable support for Raydium RM68200
 	  720x1280 DSI video mode panel.
 
 config DRM_PANEL_RAYDIUM_RM692E5
 	tristate "Raydium RM692E5-based DSI panel"
-	depends on OF
-	depends on DRM_MIPI_DSI
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_HELPER
+	depends on DRM_MIPI_DSI
+	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	help
 	  Say Y here if you want to enable support for Raydium RM692E5-based
 	  display panels, such as the one found in the Fairphone 5 smartphone.
 
 config DRM_PANEL_RONBO_RB070D30
@@ -557,15 +557,15 @@ config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01
 	select DRM_MIPI_DSI
 	select VIDEOMODE_HELPERS
 
 config DRM_PANEL_SAMSUNG_ATNA33XC20
 	tristate "Samsung ATNA33XC20 eDP panel"
-	depends on OF
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_HELPER
+	depends on OF
 	depends on PM
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
 	  be handled by the DRM_PANEL_SIMPLE driver because its power
 	  sequencing is non-standard.
@@ -797,16 +797,16 @@ config DRM_PANEL_STARTEK_KD070FHFID015
 	  with a resolution of 1024 x 600 pixels. It provides a MIPI DSI interface to
 	  the host, a built-in LED backlight and touch controller.
 
 config DRM_PANEL_EDP
 	tristate "support for simple Embedded DisplayPort panels"
-	depends on OF
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_HELPER
+	depends on OF
 	depends on PM
 	select VIDEOMODE_HELPERS
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	help
 	  DRM panel driver for dumb eDP panels that need at most a regulator and
 	  a GPIO to be powered up. Optionally a backlight can be attached so
@@ -877,15 +877,15 @@ config DRM_PANEL_TRULY_NT35597_WQXGA
 	  Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI
 	  Video Mode panel
 
 config DRM_PANEL_VISIONOX_R66451
 	tristate "Visionox R66451"
-	depends on OF
-	depends on DRM_MIPI_DSI
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_HELPER
+	depends on DRM_MIPI_DSI
+	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	help
 	  Say Y here if you want to enable support for Visionox
 	  R66451 1080x2340 AMOLED DSI panel.
 
 config DRM_PANEL_VISIONOX_RM69299
drivers/gpu/drm/radeon/Kconfig +4 -2
index f98356be0af2..07d330450f05 100644
@@ -1,14 +1,16 @@
 # SPDX-License-Identifier: MIT
 
 config DRM_RADEON
 	tristate "ATI Radeon"
-	depends on DRM && PCI && MMU
 	depends on AGP || !AGP
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on PCI
+	depends on MMU
 	select FW_LOADER
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
         select DRM_KMS_HELPER
 	select DRM_SUBALLOC_HELPER
         select DRM_TTM
 	select DRM_TTM_HELPER
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
drivers/gpu/drm/rockchip/Kconfig +2 -2
index 0d5260e10f27..b72c0bbf346d 100644
@@ -33,22 +33,22 @@ config ROCKCHIP_VOP2
 	  This selects support for the VOP2 driver. The VOP2 hardware is
 	  first found on the RK3568.
 
 config ROCKCHIP_ANALOGIX_DP
 	bool "Rockchip specific extensions for Analogix DP driver"
+	depends on DRM_DISPLAY_HELPER
 	depends on ROCKCHIP_VOP
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the Analogix Core DP driver. If you want to enable DP
 	  on RK3288 or RK3399 based SoC, you should select this option.
 
 config ROCKCHIP_CDN_DP
 	bool "Rockchip cdn DP"
+	depends on DRM_DISPLAY_HELPER
 	depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m)
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the cdn DP driver. If you want to enable Dp on
 	  RK3399 based SoC, you should select this
drivers/gpu/drm/tegra/Kconfig +1 -1
index 782f51d3044a..44381ee6ea9e 100644
@@ -2,14 +2,14 @@
 config DRM_TEGRA
 	tristate "NVIDIA Tegra DRM"
 	depends on ARCH_TEGRA || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
+	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
drivers/gpu/drm/vc4/Kconfig +4 -4
index 91dcf8d174d6..98772a6b5bf0 100644
@@ -1,18 +1,18 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_VC4
 	tristate "Broadcom VC4 Graphics"
 	depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST
+	depends on COMMON_CLK
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on PM
 	# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
 	# happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
 	depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
-	depends on DRM
 	depends on SND && SND_SOC
-	depends on COMMON_CLK
-	depends on PM
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_PANEL_BRIDGE
 	select SND_PCM
 	select SND_PCM_ELD
drivers/gpu/drm/xe/Kconfig +5 -2
index 1a556d087e63..be29e5cd5215 100644
@@ -1,9 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_XE
 	tristate "Intel Xe Graphics"
-	depends on DRM && PCI && MMU && (m || (y && KUNIT=y))
+	depends on (m || (y && KUNIT=y))
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on MMU
+	depends on PCI
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
 	select SHMEM
 	select TMPFS
@@ -14,11 +18,10 @@ config DRM_XE
 	select DRM_PANEL
 	select DRM_SUBALLOC_HELPER
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_MIPI_DSI
 	select RELAY
 	select IRQ_WORK
 	# xe depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
drivers/gpu/drm/xlnx/Kconfig +4 -2
index 68ee897de9d7..7a14a8c2e7be 100644
@@ -1,15 +1,17 @@
 config DRM_ZYNQMP_DPSUB
 	tristate "ZynqMP DisplayPort Controller Driver"
 	depends on ARCH_ZYNQMP || COMPILE_TEST
-	depends on COMMON_CLK && DRM && OF
+	depends on COMMON_CLK
 	depends on DMADEVICES
+	depends on DRM
+	depends on DRM_DISPLAY_HELPER
+	depends on OF
 	depends on PHY_XILINX_ZYNQMP
 	depends on XILINX_ZYNQMP_DPDMA
 	select DMA_ENGINE
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select GENERIC_PHY
 	help
 	  This is a DRM/KMS driver for ZynqMP DisplayPort controller. Choose
Signature · 1 line
2.44.0
author maintainer
#14 lore raw

PATCH v3 9/13 drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on

In reply to Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation, so we can just switch all the drivers that were selecting DRM_DISPLAY_DP_AUX_BUS to depend on it.

---
 drivers/gpu/drm/bridge/Kconfig          | 6 +++---
 drivers/gpu/drm/bridge/analogix/Kconfig | 2 +-
 drivers/gpu/drm/display/Kconfig         | 1 +
 drivers/gpu/drm/mediatek/Kconfig        | 2 +-
 drivers/gpu/drm/msm/Kconfig             | 2 +-
 drivers/gpu/drm/panel/Kconfig           | 4 ++--
 drivers/gpu/drm/tegra/Kconfig           | 2 +-
 7 files changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/Kconfig +3 -3
index aa870e68e165..5d0193a87314 100644
@@ -90,15 +90,15 @@ config DRM_FSL_LDB
 	help
 	  Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
 
 config DRM_ITE_IT6505
 	tristate "ITE IT6505 DisplayPort bridge"
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
 	select CRYPTO_HASH
@@ -224,14 +224,14 @@ config DRM_PARADE_PS8622
 	help
 	  Parade eDP-LVDS bridge chip driver.
 
 config DRM_PARADE_PS8640
 	tristate "Parade PS8640 MIPI DSI to eDP Converter"
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
 	  Choose this option if you have PS8640 for display
@@ -379,19 +379,19 @@ config DRM_TI_SN65DSI83
 	help
 	  Texas Instruments SN65DSI83 and SN65DSI84 DSI to LVDS Bridge driver
 
 config DRM_TI_SN65DSI86
 	tristate "TI SN65DSI86 DSI to eDP bridge"
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select AUXILIARY_BUS
-	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
 config DRM_TI_TPD12S015
 	tristate "TI TPD12S015 HDMI level shifter and ESD protection"
drivers/gpu/drm/bridge/analogix/Kconfig +1 -1
index 16d18dde483a..ec98c9453573 100644
@@ -31,15 +31,15 @@ config DRM_ANALOGIX_DP
 	depends on DRM
 
 config DRM_ANALOGIX_ANX7625
 	tristate "Analogix Anx7625 MIPI to DP interface support"
 	depends on DRM
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_MIPI_DSI
 	help
 	  ANX7625 is an ultra-low power 4K mobile HD transmitter
 	  designed for portable devices. It converts MIPI/DPI to
 	  DisplayPort1.3 4K.
drivers/gpu/drm/display/Kconfig +1 -0
index cffa2acdbc6c..0cd439691422 100644
@@ -9,10 +9,11 @@ config DRM_DISPLAY_HELPER
 
 config DRM_DISPLAY_DP_AUX_BUS
 	tristate "DRM DisplayPort AUX bus support"
 	depends on DRM
 	depends on OF || COMPILE_TEST
+	default y
 
 config DRM_DISPLAY_DP_AUX_CEC
 	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
 	depends on DRM
 	depends on DRM_DISPLAY_HELPER
drivers/gpu/drm/mediatek/Kconfig +1 -1
index 50bb28327f65..2add54486ac4 100644
@@ -20,15 +20,15 @@ config DRM_MEDIATEK
 	  This driver provides kernel mode setting and
 	  buffer management to userspace.
 
 config DRM_MEDIATEK_DP
 	tristate "DRM DPTX Support for MediaTek SoCs"
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on DRM_MEDIATEK
 	select PHY_MTK_DP
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM/KMS Display Port driver for MediaTek SoCs.
 
 config DRM_MEDIATEK_HDMI
 	tristate "DRM HDMI Support for Mediatek SoCs"
drivers/gpu/drm/msm/Kconfig +1 -1
index 2055266506e5..28a898722ace 100644
@@ -3,21 +3,21 @@
 config DRM_MSM
 	tristate "MSM DRM"
 	depends on ARCH_QCOM || SOC_IMX5 || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on IOMMU_SUPPORT
 	depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
 	depends on QCOM_OCMEM || QCOM_OCMEM=n
 	depends on QCOM_LLCC || QCOM_LLCC=n
 	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
 	depends on PM
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_BRIDGE
drivers/gpu/drm/panel/Kconfig +2 -2
index c83285811bb3..01235397c493 100644
@@ -558,15 +558,15 @@ config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01
 	select VIDEOMODE_HELPERS
 
 config DRM_PANEL_SAMSUNG_ATNA33XC20
 	tristate "Samsung ATNA33XC20 eDP panel"
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	depends on PM
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	help
 	  DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
 	  be handled by the DRM_PANEL_SIMPLE driver because its power
 	  sequencing is non-standard.
 
@@ -798,16 +798,16 @@ config DRM_PANEL_STARTEK_KD070FHFID015
 	  the host, a built-in LED backlight and touch controller.
 
 config DRM_PANEL_EDP
 	tristate "support for simple Embedded DisplayPort panels"
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	depends on PM
 	select VIDEOMODE_HELPERS
 	select DRM_DISPLAY_DP_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	help
 	  DRM panel driver for dumb eDP panels that need at most a regulator and
 	  a GPIO to be powered up. Optionally a backlight can be attached so
 	  that it can be automatically turned off when the panel goes into a
drivers/gpu/drm/tegra/Kconfig +1 -1
index 44381ee6ea9e..e0385d175ec6 100644
@@ -2,15 +2,15 @@
 config DRM_TEGRA
 	tristate "NVIDIA Tegra DRM"
 	depends on ARCH_TEGRA || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
+	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_DP_AUX_BUS
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
 	select TEGRA_HOST1X
Signature · 1 line
2.44.0
#15 lore raw

Re: [PATCH v3 09/13] drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on

Hi Maxime,

Thanks for your patch, which is now commit 4d15125d7fe637f4 ("drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on") in drm/drm-next (next-20240402 and later).

Quoted 6 lines · Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation,

(Almost?) Everywhere else we fixed that by also selecting the dependencies, which is more user-friendly.

Quoted 14 lines

so we can just switch all the drivers that were selecting DRM_DISPLAY_DP_AUX_BUS to depend on it.

drivers/gpu/drm/display/Kconfig +0 -0
@@ -9,10 +9,11 @@ config DRM_DISPLAY_HELPER
 

config DRM_DISPLAY_DP_AUX_BUS
tristate "DRM DisplayPort AUX bus support" depends on DRM
depends on OF || COMPILE_TEST

drivers/gpu/drm/display/Kconfig config DRM_DISPLAY_HELPER · line 14

Quoted 1 line
drivers/gpu/drm/display/Kconfig +1 -0
+	default y

(quoting Linus) "What is so special about your driver, that it needs to default to enabled?".

Especially as there is no help available for this option, so the casual user has no idea if this is needed or not.

And a general comment for this series: many defconfigs need to be updated, as drivers are no longer enabled because they need functionality that now needs to be enabled explicitly.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#16 lore raw

PATCH v3 10/13 drm: Switch DRM_DISPLAY_DP_HELPER to depends on

In reply to Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation, so we can just switch all the drivers that were selecting DRM_DISPLAY_DP_HELPER to depend on it.

---
 drivers/gpu/drm/Kconfig                 |  2 +-
 drivers/gpu/drm/amd/amdgpu/Kconfig      |  2 +-
 drivers/gpu/drm/bridge/Kconfig          | 10 +++++-----
 drivers/gpu/drm/bridge/analogix/Kconfig |  6 +++---
 drivers/gpu/drm/bridge/cadence/Kconfig  |  2 +-
 drivers/gpu/drm/display/Kconfig         |  1 +
 drivers/gpu/drm/exynos/Kconfig          |  2 +-
 drivers/gpu/drm/i915/Kconfig            |  2 +-
 drivers/gpu/drm/mediatek/Kconfig        |  2 +-
 drivers/gpu/drm/msm/Kconfig             |  2 +-
 drivers/gpu/drm/nouveau/Kconfig         |  2 +-
 drivers/gpu/drm/panel/Kconfig           |  8 ++++----
 drivers/gpu/drm/radeon/Kconfig          |  2 +-
 drivers/gpu/drm/rockchip/Kconfig        |  4 ++--
 drivers/gpu/drm/tegra/Kconfig           |  2 +-
 drivers/gpu/drm/xe/Kconfig              |  2 +-
 drivers/gpu/drm/xlnx/Kconfig            |  2 +-
 17 files changed, 27 insertions(+), 26 deletions(-)
drivers/gpu/drm/Kconfig +1 -1
index 1eb939463c35..50b809346bf9 100644
@@ -72,15 +72,15 @@ config DRM_KUNIT_TEST_HELPERS
 	  KUnit Helpers for KMS drivers.
 
 config DRM_KUNIT_TEST
 	tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on KUNIT
 	depends on MMU
 	select DRM_BUDDY
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_EXEC
 	select DRM_EXPORT_FOR_TESTS if m
 	select DRM_GEM_SHMEM_HELPER
 	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -1
index cf931b94a188..ba09121e7deb 100644
@@ -1,16 +1,16 @@
 # SPDX-License-Identifier: MIT
 
 config DRM_AMDGPU
 	tristate "AMD GPU"
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	depends on !UML
 	select FW_LOADER
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_SCHED
 	select DRM_TTM
drivers/gpu/drm/bridge/Kconfig +5 -5
index 5d0193a87314..54d45dd31b7f 100644
@@ -91,13 +91,13 @@ config DRM_FSL_LDB
 	  Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
 
 config DRM_ITE_IT6505
 	tristate "ITE IT6505 DisplayPort bridge"
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
@@ -225,13 +225,13 @@ config DRM_PARADE_PS8622
 	  Parade eDP-LVDS bridge chip driver.
 
 config DRM_PARADE_PS8640
 	tristate "Parade PS8640 MIPI DSI to eDP Converter"
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
 	  Choose this option if you have PS8640 for display
@@ -311,13 +311,13 @@ config DRM_TOSHIBA_TC358764
 	help
 	  Toshiba TC358764 DSI/LVDS bridge driver.
 
 config DRM_TOSHIBA_TC358767
 	tristate "Toshiba TC358767 eDP bridge"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	help
@@ -334,13 +334,13 @@ config DRM_TOSHIBA_TC358768
 	help
 	  Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver.
 
 config DRM_TOSHIBA_TC358775
 	tristate "Toshiba TC358775 DSI/LVDS bridge"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	help
@@ -380,13 +380,13 @@ config DRM_TI_SN65DSI83
 	  Texas Instruments SN65DSI83 and SN65DSI84 DSI to LVDS Bridge driver
 
 config DRM_TI_SN65DSI86
 	tristate "TI SN65DSI86 DSI to eDP bridge"
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select AUXILIARY_BUS
drivers/gpu/drm/bridge/analogix/Kconfig +3 -3
index ec98c9453573..9659df6718de 100644
@@ -1,25 +1,25 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ANALOGIX_ANX6345
 	tristate "Analogix ANX6345 bridge"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_ANALOGIX_DP
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	help
 	  ANX6345 is an ultra-low power Full-HD DisplayPort/eDP
 	  transmitter designed for portable devices. The
 	  ANX6345 transforms the LVTTL RGB output of an
 	  application processor to eDP or DisplayPort.
 
 config DRM_ANALOGIX_ANX78XX
 	tristate "Analogix ANX78XX bridge"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	select DRM_ANALOGIX_DP
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	help
 	  ANX78XX is an ultra-low power Full-HD SlimPort transmitter
 	  designed for portable devices. The ANX78XX transforms
@@ -32,13 +32,13 @@ config DRM_ANALOGIX_DP
 
 config DRM_ANALOGIX_ANX7625
 	tristate "Analogix Anx7625 MIPI to DP interface support"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_MIPI_DSI
 	help
 	  ANX7625 is an ultra-low power 4K mobile HD transmitter
 	  designed for portable devices. It converts MIPI/DPI to
drivers/gpu/drm/bridge/cadence/Kconfig +1 -1
index 20143afded40..3480fd4d0a5f 100644
@@ -21,13 +21,13 @@ config DRM_CDNS_DSI_J721E
 	  the routing of the DSS DPI signal to the Cadence DSI.
 endif
 
 config DRM_CDNS_MHDP8546
 	tristate "Cadence DPI/DP bridge"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL_BRIDGE
 	help
 	  Support Cadence DPI to DP bridge. This is an internal
drivers/gpu/drm/display/Kconfig +1 -0
index 0cd439691422..9801f47a3704 100644
@@ -37,10 +37,11 @@ config DRM_DISPLAY_DP_AUX_CHARDEV
 	  channel.
 
 config DRM_DISPLAY_DP_HELPER
 	bool "DRM DisplayPort Helpers"
 	depends on DRM_DISPLAY_HELPER
+	default y
 	help
 	  DRM display helpers for DisplayPort.
 
 config DRM_DISPLAY_DP_TUNNEL
 	bool "DRM DisplayPort tunnels support"
drivers/gpu/drm/exynos/Kconfig +1 -1
index 4b0183bf221c..6a26a0b8eff2 100644
@@ -65,13 +65,13 @@ config DRM_EXYNOS_DSI
 	  This enables support for Exynos MIPI-DSI device.
 
 config DRM_EXYNOS_DP
 	bool "Exynos specific extensions for Analogix DP driver"
 	depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	select DRM_ANALOGIX_DP
-	select DRM_DISPLAY_DP_HELPER
 	default DRM_EXYNOS
 	select DRM_PANEL
 	help
 	  This enables support for DP device.
 
drivers/gpu/drm/i915/Kconfig +1 -1
index 43183a68a095..dbde4e29d93a 100644
@@ -1,19 +1,19 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_I915
 	tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on X86 && PCI
 	depends on !PREEMPT_RT
 	select INTEL_GTT if X86
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
 	select SHMEM
 	select TMPFS
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_MIPI_DSI
drivers/gpu/drm/mediatek/Kconfig +1 -1
index 2add54486ac4..6caab8d4d4e0 100644
@@ -21,14 +21,14 @@ config DRM_MEDIATEK
 	  buffer management to userspace.
 
 config DRM_MEDIATEK_DP
 	tristate "DRM DPTX Support for MediaTek SoCs"
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on DRM_MEDIATEK
 	select PHY_MTK_DP
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  DRM/KMS Display Port driver for MediaTek SoCs.
 
 config DRM_MEDIATEK_HDMI
 	tristate "DRM HDMI Support for Mediatek SoCs"
drivers/gpu/drm/msm/Kconfig +1 -1
index 28a898722ace..f7708590583e 100644
@@ -4,21 +4,21 @@ config DRM_MSM
 	tristate "MSM DRM"
 	depends on ARCH_QCOM || SOC_IMX5 || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on IOMMU_SUPPORT
 	depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
 	depends on QCOM_OCMEM || QCOM_OCMEM=n
 	depends on QCOM_LLCC || QCOM_LLCC=n
 	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
 	depends on PM
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_BRIDGE
 	select DRM_PANEL_BRIDGE
drivers/gpu/drm/nouveau/Kconfig +1 -1
index 5ac852b816db..7cc305b2826d 100644
@@ -1,15 +1,15 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_NOUVEAU
 	tristate "Nouveau (NVIDIA) cards"
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on PCI
 	depends on MMU
 	select IOMMU_API
 	select FW_LOADER
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select DRM_EXEC
drivers/gpu/drm/panel/Kconfig +4 -4
index 01235397c493..154f5bf82980 100644
@@ -532,14 +532,14 @@ config DRM_PANEL_RAYDIUM_RM68200
 	  720x1280 DSI video mode panel.
 
 config DRM_PANEL_RAYDIUM_RM692E5
 	tristate "Raydium RM692E5-based DSI panel"
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on DRM_MIPI_DSI
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  Say Y here if you want to enable support for Raydium RM692E5-based
 	  display panels, such as the one found in the Fairphone 5 smartphone.
 
 config DRM_PANEL_RONBO_RB070D30
@@ -559,14 +559,14 @@ config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01
 
 config DRM_PANEL_SAMSUNG_ATNA33XC20
 	tristate "Samsung ATNA33XC20 eDP panel"
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	depends on PM
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  DRM panel driver for the Samsung ATNA33XC20 panel. This panel can't
 	  be handled by the DRM_PANEL_SIMPLE driver because its power
 	  sequencing is non-standard.
 
@@ -799,15 +799,15 @@ config DRM_PANEL_STARTEK_KD070FHFID015
 
 config DRM_PANEL_EDP
 	tristate "support for simple Embedded DisplayPort panels"
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	depends on PM
 	select VIDEOMODE_HELPERS
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_KMS_HELPER
 	help
 	  DRM panel driver for dumb eDP panels that need at most a regulator and
 	  a GPIO to be powered up. Optionally a backlight can be attached so
 	  that it can be automatically turned off when the panel goes into a
@@ -878,14 +878,14 @@ config DRM_PANEL_TRULY_NT35597_WQXGA
 	  Video Mode panel
 
 config DRM_PANEL_VISIONOX_R66451
 	tristate "Visionox R66451"
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on DRM_MIPI_DSI
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  Say Y here if you want to enable support for Visionox
 	  R66451 1080x2340 AMOLED DSI panel.
 
 config DRM_PANEL_VISIONOX_RM69299
drivers/gpu/drm/radeon/Kconfig +1 -1
index 07d330450f05..18c867219a70 100644
@@ -2,15 +2,15 @@
 
 config DRM_RADEON
 	tristate "ATI Radeon"
 	depends on AGP || !AGP
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on PCI
 	depends on MMU
 	select FW_LOADER
-	select DRM_DISPLAY_DP_HELPER
         select DRM_KMS_HELPER
 	select DRM_SUBALLOC_HELPER
         select DRM_TTM
 	select DRM_TTM_HELPER
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
drivers/gpu/drm/rockchip/Kconfig +2 -2
index b72c0bbf346d..4b49a14758fe 100644
@@ -33,23 +33,23 @@ config ROCKCHIP_VOP2
 	  This selects support for the VOP2 driver. The VOP2 hardware is
 	  first found on the RK3568.
 
 config ROCKCHIP_ANALOGIX_DP
 	bool "Rockchip specific extensions for Analogix DP driver"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on ROCKCHIP_VOP
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the Analogix Core DP driver. If you want to enable DP
 	  on RK3288 or RK3399 based SoC, you should select this option.
 
 config ROCKCHIP_CDN_DP
 	bool "Rockchip cdn DP"
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m)
-	select DRM_DISPLAY_DP_HELPER
 	help
 	  This selects support for Rockchip SoC specific extensions
 	  for the cdn DP driver. If you want to enable Dp on
 	  RK3399 based SoC, you should select this
 	  option.
drivers/gpu/drm/tegra/Kconfig +1 -1
index e0385d175ec6..bb6e35261f11 100644
@@ -3,13 +3,13 @@ config DRM_TEGRA
 	tristate "NVIDIA Tegra DRM"
 	depends on ARCH_TEGRA || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
 	depends on DRM_DISPLAY_DP_AUX_BUS
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
drivers/gpu/drm/xe/Kconfig +1 -1
index be29e5cd5215..02da2faf5ae3 100644
@@ -1,10 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_XE
 	tristate "Intel Xe Graphics"
 	depends on (m || (y && KUNIT=y))
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
@@ -15,11 +16,10 @@ config DRM_XE
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS if DRM_XE_KUNIT_TEST != n
 	select DRM_PANEL
 	select DRM_SUBALLOC_HELPER
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_MIPI_DSI
 	select RELAY
 	select IRQ_WORK
drivers/gpu/drm/xlnx/Kconfig +1 -1
index 7a14a8c2e7be..41d753b14ccd 100644
@@ -2,16 +2,16 @@ config DRM_ZYNQMP_DPSUB
 	tristate "ZynqMP DisplayPort Controller Driver"
 	depends on ARCH_ZYNQMP || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DMADEVICES
 	depends on DRM
+	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	depends on PHY_XILINX_ZYNQMP
 	depends on XILINX_ZYNQMP_DPDMA
 	select DMA_ENGINE
-	select DRM_DISPLAY_DP_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select GENERIC_PHY
 	help
 	  This is a DRM/KMS driver for ZynqMP DisplayPort controller. Choose
Signature · 1 line
2.44.0
author maintainer
#17 lore raw

PATCH v3 11/13 drm: Switch DRM_DISPLAY_HDCP_HELPER to depends on

In reply to Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation, so we can just switch all the drivers that were selecting DRM_DISPLAY_HDCP_HELPER to depend on it.

---
 drivers/gpu/drm/amd/amdgpu/Kconfig      | 2 +-
 drivers/gpu/drm/bridge/Kconfig          | 2 +-
 drivers/gpu/drm/bridge/analogix/Kconfig | 2 +-
 drivers/gpu/drm/bridge/cadence/Kconfig  | 2 +-
 drivers/gpu/drm/display/Kconfig         | 1 +
 drivers/gpu/drm/i915/Kconfig            | 2 +-
 drivers/gpu/drm/xe/Kconfig              | 2 +-
 7 files changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -1
index ba09121e7deb..1662dc49f18e 100644
@@ -2,17 +2,17 @@
 
 config DRM_AMDGPU
 	tristate "AMD GPU"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	depends on !UML
 	select FW_LOADER
 	select DRM_DISPLAY_HDMI_HELPER
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_SCHED
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select POWER_SUPPLY
drivers/gpu/drm/bridge/Kconfig +1 -1
index 54d45dd31b7f..6e6ec300ab16 100644
@@ -92,13 +92,13 @@ config DRM_FSL_LDB
 
 config DRM_ITE_IT6505
 	tristate "ITE IT6505 DisplayPort bridge"
 	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
 	select CRYPTO_HASH
drivers/gpu/drm/bridge/analogix/Kconfig +1 -1
index 9659df6718de..12bfea53bf24 100644
@@ -33,13 +33,13 @@ config DRM_ANALOGIX_DP
 config DRM_ANALOGIX_ANX7625
 	tristate "Analogix Anx7625 MIPI to DP interface support"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_MIPI_DSI
 	help
 	  ANX7625 is an ultra-low power 4K mobile HD transmitter
 	  designed for portable devices. It converts MIPI/DPI to
 	  DisplayPort1.3 4K.
drivers/gpu/drm/bridge/cadence/Kconfig +1 -1
index 3480fd4d0a5f..7817f6f56607 100644
@@ -22,13 +22,13 @@ config DRM_CDNS_DSI_J721E
 endif
 
 config DRM_CDNS_MHDP8546
 	tristate "Cadence DPI/DP bridge"
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL_BRIDGE
 	help
 	  Support Cadence DPI to DP bridge. This is an internal
 	  bridge and is meant to be directly embedded in a SoC.
drivers/gpu/drm/display/Kconfig +1 -0
index 9801f47a3704..d65f1a37c08c 100644
@@ -65,10 +65,11 @@ config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
 	  If in doubt, say "N".
 
 config DRM_DISPLAY_HDCP_HELPER
 	bool "DRM HDCD Helpers"
 	depends on DRM_DISPLAY_HELPER
+	default y
 	help
 	  DRM display helpers for HDCP.
 
 config DRM_DISPLAY_HDMI_HELPER
 	bool "DRM HDMI Helpers"
drivers/gpu/drm/i915/Kconfig +1 -1
index dbde4e29d93a..87ef8c4d72a5 100644
@@ -1,20 +1,20 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_I915
 	tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on X86 && PCI
 	depends on !PREEMPT_RT
 	select INTEL_GTT if X86
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
 	select SHMEM
 	select TMPFS
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
drivers/gpu/drm/xe/Kconfig +1 -1
index 02da2faf5ae3..1fa8ef75823c 100644
@@ -2,10 +2,11 @@
 config DRM_XE
 	tristate "Intel Xe Graphics"
 	depends on (m || (y && KUNIT=y))
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
@@ -16,11 +17,10 @@ config DRM_XE
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS if DRM_XE_KUNIT_TEST != n
 	select DRM_PANEL
 	select DRM_SUBALLOC_HELPER
-	select DRM_DISPLAY_HDCP_HELPER
 	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_MIPI_DSI
 	select RELAY
 	select IRQ_WORK
 	# xe depends on ACPI_VIDEO when ACPI is enabled
Signature · 1 line
2.44.0
author maintainer
#18 lore raw

PATCH v3 12/13 drm: Switch DRM_DISPLAY_HDMI_HELPER to depends on

In reply to Maxime Ripard

Most of our helpers have relied on being selected so far through Kconfig, but that creates issues when we have multiple layers of helpers with some depending on others.

Indeed, select doesn't select a dependency's dependencies, and thus isn't super intuitive. Depends on however doesn't have that limitation, so we can just switch all the drivers that were selecting DRM_DISPLAY_HDMI_HELPER to depend on it.

---
 drivers/gpu/drm/amd/amdgpu/Kconfig      | 2 +-
 drivers/gpu/drm/bridge/synopsys/Kconfig | 2 +-
 drivers/gpu/drm/display/Kconfig         | 1 +
 drivers/gpu/drm/i915/Kconfig            | 2 +-
 drivers/gpu/drm/nouveau/Kconfig         | 2 +-
 drivers/gpu/drm/tegra/Kconfig           | 2 +-
 drivers/gpu/drm/vc4/Kconfig             | 2 +-
 drivers/gpu/drm/xe/Kconfig              | 2 +-
 8 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -1
index 1662dc49f18e..b0365cc1374e 100644
@@ -3,16 +3,16 @@
 config DRM_AMDGPU
 	tristate "AMD GPU"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HDCP_HELPER
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	depends on !UML
 	select FW_LOADER
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_SCHED
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select POWER_SUPPLY
drivers/gpu/drm/bridge/synopsys/Kconfig +1 -1
index f366ece47146..387f5bd86089 100644
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_DW_HDMI
 	tristate
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select REGMAP_MMIO
 	select CEC_CORE if CEC_NOTIFIER
 
 config DRM_DW_HDMI_AHB_AUDIO
drivers/gpu/drm/display/Kconfig +1 -0
index d65f1a37c08c..01f2a231aa5f 100644
@@ -72,7 +72,8 @@ config DRM_DISPLAY_HDCP_HELPER
 	  DRM display helpers for HDCP.
 
 config DRM_DISPLAY_HDMI_HELPER
 	bool "DRM HDMI Helpers"
 	depends on DRM_DISPLAY_HELPER
+	default y
 	help
 	  DRM display helpers for HDMI.
drivers/gpu/drm/i915/Kconfig +1 -1
index 87ef8c4d72a5..4f0d18a16b0f 100644
@@ -2,20 +2,20 @@
 config DRM_I915
 	tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HDCP_HELPER
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on X86 && PCI
 	depends on !PREEMPT_RT
 	select INTEL_GTT if X86
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
 	select SHMEM
 	select TMPFS
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select DRM_MIPI_DSI
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
 	select RELAY
drivers/gpu/drm/nouveau/Kconfig +1 -1
index 7cc305b2826d..4c10b400658c 100644
@@ -1,16 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_NOUVEAU
 	tristate "Nouveau (NVIDIA) cards"
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on PCI
 	depends on MMU
 	select IOMMU_API
 	select FW_LOADER
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_TTM
 	select DRM_TTM_HELPER
 	select DRM_EXEC
 	select DRM_GPUVM
drivers/gpu/drm/tegra/Kconfig +1 -1
index bb6e35261f11..6974caa99ece 100644
@@ -4,13 +4,13 @@ config DRM_TEGRA
 	depends on ARCH_TEGRA || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
 	depends on DRM_DISPLAY_DP_AUX_BUS
 	depends on DRM_DISPLAY_DP_HELPER
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
 	select FB_DMAMEM_HELPERS if DRM_FBDEV_EMULATION
 	select TEGRA_HOST1X
drivers/gpu/drm/vc4/Kconfig +1 -1
index 98772a6b5bf0..4801f8b64d3d 100644
@@ -2,17 +2,17 @@
 config DRM_VC4
 	tristate "Broadcom VC4 Graphics"
 	depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST
 	depends on COMMON_CLK
 	depends on DRM
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on PM
 	# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
 	# happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
 	depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
 	depends on SND && SND_SOC
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_PANEL_BRIDGE
 	select SND_PCM
 	select SND_PCM_ELD
drivers/gpu/drm/xe/Kconfig +1 -1
index 1fa8ef75823c..bfa0e9d4bd64 100644
@@ -3,10 +3,11 @@ config DRM_XE
 	tristate "Intel Xe Graphics"
 	depends on (m || (y && KUNIT=y))
 	depends on DRM
 	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HDCP_HELPER
+	depends on DRM_DISPLAY_HDMI_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on MMU
 	depends on PCI
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
@@ -17,11 +18,10 @@ config DRM_XE
 	select DRM_EXEC
 	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS if DRM_XE_KUNIT_TEST != n
 	select DRM_PANEL
 	select DRM_SUBALLOC_HELPER
-	select DRM_DISPLAY_HDMI_HELPER
 	select DRM_MIPI_DSI
 	select RELAY
 	select IRQ_WORK
 	# xe depends on ACPI_VIDEO when ACPI is enabled
 	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
Signature · 1 line
2.44.0
author maintainer
#19 lore raw

PATCH v3 13/13 drm/bridge: it6505: Remove useless select

In reply to Maxime Ripard

The IT6505 bridge Kconfig symbol selects a Kconfig symbol that doesn't exist. Remove it.

---
 drivers/gpu/drm/bridge/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/bridge/Kconfig +0 -1
index 6e6ec300ab16..d1fbf8796fea 100644
@@ -96,11 +96,10 @@ config DRM_ITE_IT6505
 	depends on DRM_DISPLAY_DP_HELPER
 	depends on DRM_DISPLAY_HDCP_HELPER
 	depends on DRM_DISPLAY_HELPER
 	depends on OF
 	select DRM_KMS_HELPER
-	select DRM_DP_HELPER
 	select EXTCON
 	select CRYPTO
 	select CRYPTO_HASH
 	help
 	  ITE IT6505 DisplayPort bridge chip driver.
Signature · 1 line
2.44.0
author maintainer Applied
#20 lore raw
In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard

Jani recently pointed out that the Kconfig symbols are a bit difficult to work with at the moment when they depend on each other, and that using depends on would be a better idea, but no one really did the work so far.

So here it goes :)

[...]

Applied to misc/kernel.git (drm-misc-next).

Thanks!
Maxime

#21 lore raw
In reply to Maxime Ripard

Hi Maxime,

Quoted 11 lines · Maxime Ripard

Jani recently pointed out that the Kconfig symbols are a bit difficult to work with at the moment when they depend on each other, and that using depends on would be a better idea, but no one really did the work so far.

So here it goes :)

It's been tested by comparing the riscv defconfig, arm multi_v7_defconfig, arm64 defconfig, drm-misc-arm, drm-misc-arm64 and drm-misc-x86 before and after this series and making sure they are identical.

That is not true: comparing drm-misc/for-linux-next to v6.9-rc2, arm/multi_v7_defconfig, arm64/defconfig, and riscv/defconfig lost several of:
- CONFIG_DRM_DW_HDMI,
- CONFIG_DRM_DW_HDMI_AHB_AUDIO,
- CONFIG_DRM_DW_HDMI_CEC,
- CONFIG_DRM_DW_HDMI_I2S_AUDIO,
- CONFIG_DRM_IMX_HDMI.
- CONFIG_DRM_MESON_DW_HDMI,
- CONFIG_DRM_RCAR_DW_HDMI,
- CONFIG_DRM_SUN8I_DW_HDMI,
- CONFIG_ROCKCHIP_DW_HDMI,
- CONFIG_SND_MESON_G12A_TOHDMITX,

Quoted 1 line

Let me know what you think,

IMHO this series looks like a big usuability issue for anyone configuring the kernel, and you try to work around this by sprinkling "default y" around.

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

Thanks for reverting ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#22 lore raw
Quoted 3 lines · Geert Uytterhoeven

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

It's really not "just make sure". This leads to perpetual illegal configurations, and duct tape fixes. Select should not be used for visible symbols or symbols with dependencies [1].

What we'd need for usability is not more abuse of select, but rather 1) warnings for selecting symbols with dependencies, and 2) a way to enable a kconfig option with all its dependencies, recursively. This is what we lack.

BR,
Jani.

[1] Documentation/kbuild/kconfig-language.rst "reverse dependencies"

Signature · 1 line
Jani Nikula, Intel
#23 lore raw

Hi Jani,

Quoted 8 lines · Jani Nikula
Quoted 3 lines · Geert Uytterhoeven

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

It's really not "just make sure". This leads to perpetual illegal configurations, and duct tape fixes. Select should not be used for visible symbols or symbols with dependencies [1].

In other words: none of these helpers should be visible...

Quoted 2 lines

What we'd need for usability is not more abuse of select, but rather 1) warnings for selecting symbols with dependencies, and 2) a way to enable

Kconfig already warns if dependencies of selected symbols are not met.

Quoted 2 lines

a kconfig option with all its dependencies, recursively. This is what we lack.

You cannot force-enable all dependencies of the target symbol, as some of these dependencies may be impossible to meet on the system you are configuring a kernel for.

The current proper way is to add these dependencies to the source symbol, which is what we have been doing everywhere else. Another solution may be to teach Kconfig to ignore any symbols that select a symbol with unmet dependencies.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#24 lore raw
Quoted 8 lines · Geert Uytterhoeven

Hi Jani,

Quoted 5 lines · Jani Nikula
Quoted 3 lines · Geert Uytterhoeven

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

Quoted 5 lines
Quoted 3 lines

It's really not "just make sure". This leads to perpetual illegal configurations, and duct tape fixes. Select should not be used for visible symbols or symbols with dependencies [1].

In other words: none of these helpers should be visible...

...and should have no dependencies? :p

Quoted 5 lines
Quoted 3 lines

What we'd need for usability is not more abuse of select, but rather 1) warnings for selecting symbols with dependencies, and 2) a way to enable

Kconfig already warns if dependencies of selected symbols are not met.

But it does lead to cases where a builtin tries to use a symbol from a module, failing at link time, not config time. Then I regularly see patches trying to fix this with IS_REACHABLE(), making it a silent runtime failure instead, when it should've been a config issue.

Quoted 6 lines
Quoted 2 lines

a kconfig option with all its dependencies, recursively. This is what we lack.

You cannot force-enable all dependencies of the target symbol, as some of these dependencies may be impossible to meet on the system you are configuring a kernel for.

Surely kconfig should be able to figure out if they're possible or not.

Quoted 4 lines

The current proper way is to add these dependencies to the source symbol, which is what we have been doing everywhere else. Another solution may be to teach Kconfig to ignore any symbols that select a symbol with unmet dependencies.

...

It seems like your main argument in favour of using select is that it's more convenient for people who configure the kernel. Because the user should be able to just enable a driver, and that would select everything that's needed. But where do we draw the line? Then what qualifies for "depends on"?

Look at config DRM_I915 and where select abuse has lead us. Like, why don't we just select DRM, PCI and X86 as well instead of depend. :p

A lot of things we have to select because it appears to generally be the case that if some places select and some places depends on a symbol, it'll lead to circular dependencies.

Sure there may be a usability issue with using depends on. But the proper fix isn't hacking in kconfig files, it's to fix the usability in kconfig the tool UI. But nobody steps up, because at least I find the kconfig source to be inpenetrable. I've tried many times, and given up.

I mean, if you want to enable a driver D, it could, at a minimum, show you a tree of (possibly alternative) things you also need to enable. But if the dependencies aren't there, you won't even see the config for D. That's not something that should be "fixed" by abusing select in kconfig files.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel
#25 lore raw

Hi Jani,

Quoted 7 lines · Jani Nikula
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Jani Nikula
Quoted 3 lines · Geert Uytterhoeven

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It's really not "just make sure". This leads to perpetual illegal configurations, and duct tape fixes. Select should not be used for visible symbols or symbols with dependencies [1].

In other words: none of these helpers should be visible...

...and should have no dependencies? :p

Unless they do have dependencies.

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

What we'd need for usability is not more abuse of select, but rather 1) warnings for selecting symbols with dependencies, and 2) a way to enable

Kconfig already warns if dependencies of selected symbols are not met.

But it does lead to cases where a builtin tries to use a symbol from a module, failing at link time, not config time. Then I regularly see patches trying to fix this with IS_REACHABLE(), making it a silent runtime failure instead, when it should've been a config issue.

If a symbol for a builtin selects a symbol for a module, the latter becomes builtin, too, so that does not cause such issues? You can get such issues when a boolean symbol depends on a tristate symbol...

Quoted 14 lines
Quoted 6 lines
Quoted 2 lines

a kconfig option with all its dependencies, recursively. This is what we lack.

You cannot force-enable all dependencies of the target symbol, as some of these dependencies may be impossible to meet on the system you are configuring a kernel for.

Surely kconfig should be able to figure out if they're possible or not.

Quoted 4 lines

The current proper way is to add these dependencies to the source symbol, which is what we have been doing everywhere else. Another solution may be to teach Kconfig to ignore any symbols that select a symbol with unmet dependencies.

Quoted 7 lines

...

It seems like your main argument in favour of using select is that it's more convenient for people who configure the kernel. Because the user should be able to just enable a driver, and that would select everything that's needed. But where do we draw the line? Then what qualifies for "depends on"?

Hard (platform and subsystem) dependencies.

Quoted 2 lines

Look at config DRM_I915 and where select abuse has lead us. Like, why don't we just select DRM, PCI and X86 as well instead of depend. :p

X86 and PCI are hard platform dependencies.
DRM is a subsystem dependency.

Quoted 3 lines

A lot of things we have to select because it appears to generally be the case that if some places select and some places depends on a symbol, it'll lead to circular dependencies.

True. So all library code (incl. helpers) should be selected, and not be used as a dependency.
The user shouldn't be aware that the driver uses library code (or not).

Quoted 4 lines

Sure there may be a usability issue with using depends on. But the proper fix isn't hacking in kconfig files, it's to fix the usability in kconfig the tool UI. But nobody steps up, because at least I find the kconfig source to be inpenetrable. I've tried many times, and given up.

As long as Kconfig does not handle dependencies of selected symbols automatically, adding explicit dependencies to the origin symbols is the only workable solution.

Quoted 2 lines

I mean, if you want to enable a driver D, it could, at a minimum, show you a tree of (possibly alternative) things you also need to enable. But

And this series is actually making that harder, by turning all these selects of helpers into dependencies...

Quoted 3 lines

if the dependencies aren't there, you won't even see the config for D. That's not something that should be "fixed" by abusing select in kconfig files.

I consider not seeing symbols when a hard dependency is not met as a good thing. If everything was visible all the time, you would have a very hard (well, harder than the current already-hard ;-) time configuring your kernel.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#26 lore raw
In reply to Geert Uytterhoeven
Quoted 35 lines · On Tuesday, 9 April 2024 11:26:25 CEST Geert Uytterhoeven wrote:

Hi Maxime,

Quoted 11 lines · Maxime Ripard

Jani recently pointed out that the Kconfig symbols are a bit difficult to work with at the moment when they depend on each other, and that using depends on would be a better idea, but no one really did the work so far.

So here it goes :)

It's been tested by comparing the riscv defconfig, arm multi_v7_defconfig, arm64 defconfig, drm-misc-arm, drm-misc-arm64 and drm-misc-x86 before and after this series and making sure they are identical.

That is not true: comparing drm-misc/for-linux-next to v6.9-rc2, arm/multi_v7_defconfig, arm64/defconfig, and riscv/defconfig lost several of:
- CONFIG_DRM_DW_HDMI,
- CONFIG_DRM_DW_HDMI_AHB_AUDIO,
- CONFIG_DRM_DW_HDMI_CEC,
- CONFIG_DRM_DW_HDMI_I2S_AUDIO,
- CONFIG_DRM_IMX_HDMI.
- CONFIG_DRM_MESON_DW_HDMI,
- CONFIG_DRM_RCAR_DW_HDMI,
- CONFIG_DRM_SUN8I_DW_HDMI,
- CONFIG_ROCKCHIP_DW_HDMI,
- CONFIG_SND_MESON_G12A_TOHDMITX,

Quoted 1 line

Let me know what you think,

IMHO this series looks like a big usuability issue for anyone configuring the kernel, and you try to work around this by sprinkling "default y" around.

Quoted 5 lines

The user should not need to know which helpers are needed for the driver he is interested in. When a symbol selects another symbol, it should just make sure the dependencies of the target symbol are met.

Thanks for reverting ;-)

I *think* that I ran into this issue (but it may also be KEBKAC). I tried to build a Debian arm64 kernel from 6.9-rc3 with a number of drm-misc- next patches, including this patch set.

debian/config/arm64/config: CONFIG_DRM_SUN8I_DW_HDMI=m

In my 6.7.9 kernel the sun8i-drm-hdmi module got build.
(as well as meson_dw_hdmi, although it does not have an explicit configuration for it, but there appears a similarity with it in the drm: Make drivers depends on DRM_DW_HDMI commit)

But in my newly build kernel both are NOT build.
While I can't complain about meson_dw_hdmi, I would have expected the sun8i- drm-hdmi module to be build.

Cheers,
Diederik

PS: The Kconfig says that the module will be called sun8i_dw_hdmi, but that seems to be incorrect