From be2d3e9d061552af6c50220ee7b7e76458a3080f Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 25 Apr 2024 12:39:20 +0200 Subject: [PATCH 01/19] drm/panthor: Kill the faulty_slots variable in panthor_sched_suspend() We can use upd_ctx.timedout_mask directly, and the faulty_slots update in the flush_caches_failed situation is never used. Suggested-by: Suggested-by: Steven Price Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240425103920.826458-1-boris.brezillon@collabora.com --- drivers/gpu/drm/panthor/panthor_sched.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index b3a51a6de523..8ec66dd47db3 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2546,8 +2546,8 @@ void panthor_sched_suspend(struct panthor_device *ptdev) { struct panthor_scheduler *sched = ptdev->scheduler; struct panthor_csg_slots_upd_ctx upd_ctx; - u32 suspended_slots, faulty_slots; struct panthor_group *group; + u32 suspended_slots; u32 i; mutex_lock(&sched->lock); @@ -2566,10 +2566,9 @@ void panthor_sched_suspend(struct panthor_device *ptdev) csgs_upd_ctx_apply_locked(ptdev, &upd_ctx); suspended_slots &= ~upd_ctx.timedout_mask; - faulty_slots = upd_ctx.timedout_mask; - if (faulty_slots) { - u32 slot_mask = faulty_slots; + if (upd_ctx.timedout_mask) { + u32 slot_mask = upd_ctx.timedout_mask; drm_err(&ptdev->base, "CSG suspend failed, escalating to termination"); csgs_upd_ctx_init(&upd_ctx); @@ -2620,9 +2619,6 @@ void panthor_sched_suspend(struct panthor_device *ptdev) slot_mask &= ~BIT(csg_id); } - - if (flush_caches_failed) - faulty_slots |= suspended_slots; } for (i = 0; i < sched->csg_slot_count; i++) { From 81f85dbdddcf9a9d647b17658e9448f111d79772 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:29 +0200 Subject: [PATCH 02/19] Revert "drm: fix DRM_DISPLAY_DP_HELPER dependencies, part 2" This reverts commit a57e191ebbaa0363dbf352cc37447c2230573e29, as the commits it fixes will be reverted, too. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/37216404c77b4c677d3b3a80d12d6d4447a3f3a0.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- drivers/gpu/drm/bridge/analogix/Kconfig | 2 +- drivers/gpu/drm/rockchip/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index 5b564fded6d6..12bfea53bf24 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -28,7 +28,7 @@ config DRM_ANALOGIX_ANX78XX config DRM_ANALOGIX_DP tristate - depends on DRM_DISPLAY_HELPER + depends on DRM config DRM_ANALOGIX_ANX7625 tristate "Analogix Anx7625 MIPI to DP interface support" diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 4c7072e6e34e..4b4ad75032fd 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -36,7 +36,7 @@ config ROCKCHIP_VOP2 config ROCKCHIP_ANALOGIX_DP bool "Rockchip specific extensions for Analogix DP driver" depends on DRM_DISPLAY_DP_HELPER - depends on DRM_DISPLAY_HELPER=y || (DRM_DISPLAY_HELPER=m && DRM_ROCKCHIP=m) + depends on DRM_DISPLAY_HELPER depends on ROCKCHIP_VOP help This selects support for Rockchip SoC specific extensions From 9367f430917a12d84f90516489c8b94cab5e6390 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:30 +0200 Subject: [PATCH 03/19] Revert "drm/display: Select DRM_KMS_HELPER for DP helpers" This reverts commit 7fa678cc0a5648b5ea28629a2d21b9d4b6ac8f56, as the commit it fixes will be reverted, too. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/17b6a2c5f3250a7d02ee1b517182ca6fd9baa45a.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- drivers/gpu/drm/display/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index a38962a556c2..01f2a231aa5f 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -39,7 +39,6 @@ config DRM_DISPLAY_DP_AUX_CHARDEV config DRM_DISPLAY_DP_HELPER bool "DRM DisplayPort Helpers" depends on DRM_DISPLAY_HELPER - select DRM_KMS_HELPER default y help DRM display helpers for DisplayPort. From 759d026846f519262e22ab35e0aa96f6b1973d05 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:31 +0200 Subject: [PATCH 04/19] Revert "drm/bridge: dw-hdmi: Make DRM_DW_HDMI selectable" This reverts commit 0209df3b4731516fe77638bfc52ba2e9629c67cd, as the commit it fixes (which is BTW not the commit in the Fixes: tag!) will be reverted, too. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/b2d1a7a765e4af249f4c450383de6e8422647e2e.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- drivers/gpu/drm/bridge/synopsys/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/Kconfig b/drivers/gpu/drm/bridge/synopsys/Kconfig index 1252fd30d4a4..387f5bd86089 100644 --- a/drivers/gpu/drm/bridge/synopsys/Kconfig +++ b/drivers/gpu/drm/bridge/synopsys/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_DW_HDMI - tristate "Synopsys Designware HDMI TX Controller" + tristate depends on DRM_DISPLAY_HDMI_HELPER depends on DRM_DISPLAY_HELPER select DRM_KMS_HELPER From d738adc2d900022418f8d5b58a301b59e68d8372 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:32 +0200 Subject: [PATCH 05/19] Revert "drm: fix DRM_DISPLAY_DP_HELPER dependencies" This reverts commit d1ef8fc18be6adbbffdee06fbb5b33699e2852be, as the commit it fixes will be reverted, too. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/df2876c72e82cbecfe8406fa058e8d3e895e4b93.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- drivers/gpu/drm/exynos/Kconfig | 2 +- drivers/gpu/drm/rockchip/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 58cd77220741..6a26a0b8eff2 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -68,7 +68,7 @@ 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=y || (DRM_DISPLAY_HELPER=m && DRM_EXYNOS=m) + depends on DRM_DISPLAY_HELPER select DRM_ANALOGIX_DP default DRM_EXYNOS select DRM_PANEL diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 4b4ad75032fd..4b49a14758fe 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -46,7 +46,7 @@ config ROCKCHIP_ANALOGIX_DP config ROCKCHIP_CDN_DP bool "Rockchip cdn DP" depends on DRM_DISPLAY_DP_HELPER - depends on DRM_DISPLAY_HELPER=y || (DRM_DISPLAY_HELPER=m && DRM_ROCKCHIP=m) + depends on DRM_DISPLAY_HELPER depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m) help This selects support for Rockchip SoC specific extensions From d7c128cb775ef21c29c3ad7113f5bd4ba886efa9 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:33 +0200 Subject: [PATCH 06/19] Revert "drm: Switch DRM_DISPLAY_HDMI_HELPER to depends on" This reverts commit f6d2dc03fa8546b284dd8c1af027d9fac5725921, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/bd288a5943dab8609f2d1f2bf413595a61df727a.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index b0365cc1374e..1662dc49f18e 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -5,12 +5,12 @@ config DRM_AMDGPU 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 diff --git a/drivers/gpu/drm/bridge/synopsys/Kconfig b/drivers/gpu/drm/bridge/synopsys/Kconfig index 387f5bd86089..f366ece47146 100644 --- a/drivers/gpu/drm/bridge/synopsys/Kconfig +++ b/drivers/gpu/drm/bridge/synopsys/Kconfig @@ -1,8 +1,8 @@ # 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 diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index 01f2a231aa5f..d65f1a37c08c 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -74,6 +74,5 @@ config DRM_DISPLAY_HDCP_HELPER config DRM_DISPLAY_HDMI_HELPER bool "DRM HDMI Helpers" depends on DRM_DISPLAY_HELPER - default y help DRM display helpers for HDMI. diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 4f0d18a16b0f..87ef8c4d72a5 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -4,7 +4,6 @@ config DRM_I915 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 @@ -14,6 +13,7 @@ config DRM_I915 # 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 diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 4c10b400658c..7cc305b2826d 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -3,12 +3,12 @@ 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 diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 6974caa99ece..bb6e35261f11 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -6,9 +6,9 @@ config DRM_TEGRA 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 diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index 4801f8b64d3d..98772a6b5bf0 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -4,13 +4,13 @@ config DRM_VC4 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 diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 782934be0a77..ce2f6635ff74 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -5,7 +5,6 @@ config DRM_XE 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 @@ -20,6 +19,7 @@ config DRM_XE 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 From 95734469533ce6fec8d9677e15e29ea82f26f590 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:34 +0200 Subject: [PATCH 07/19] Revert "drm: Switch DRM_DISPLAY_HDCP_HELPER to depends on" This reverts commit 3166e7e6d935caaef07605a5c90773fbf9ffeaf4, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/a40e70a0abd3d841c23c107d452a43fdd70ef37a.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index 1662dc49f18e..ba09121e7deb 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -4,13 +4,13 @@ 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 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 30a17876ff50..801d5b7d3e5d 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -94,9 +94,9 @@ 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 EXTCON select CRYPTO diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index 12bfea53bf24..9659df6718de 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -35,9 +35,9 @@ config DRM_ANALOGIX_ANX7625 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 diff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig index 7817f6f56607..3480fd4d0a5f 100644 --- a/drivers/gpu/drm/bridge/cadence/Kconfig +++ b/drivers/gpu/drm/bridge/cadence/Kconfig @@ -24,9 +24,9 @@ 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 diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index d65f1a37c08c..9801f47a3704 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -67,7 +67,6 @@ config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG config DRM_DISPLAY_HDCP_HELPER bool "DRM HDCD Helpers" depends on DRM_DISPLAY_HELPER - default y help DRM display helpers for HDCP. diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 87ef8c4d72a5..dbde4e29d93a 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -3,7 +3,6 @@ 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 @@ -13,6 +12,7 @@ config DRM_I915 # 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 diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index ce2f6635ff74..d97b3f4af5ed 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -4,7 +4,6 @@ config DRM_XE 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 @@ -19,6 +18,7 @@ config DRM_XE 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 From 7fe302ae198a35ac071d3a9e78ebd8e14b0958eb Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:35 +0200 Subject: [PATCH 08/19] Revert "drm: Switch DRM_DISPLAY_DP_HELPER to depends on" This reverts commit 0323287de87d7e6e9c22c57d7440aa353a2298d0, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/89ac456805746b6d0c888f10c5120b11aacd3319.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 26 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 959b19a04101..33792ca3eeb7 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -75,11 +75,11 @@ config DRM_KUNIT_TEST_HELPERS 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 diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index ba09121e7deb..cf931b94a188 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -3,12 +3,12 @@ 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 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 801d5b7d3e5d..7d1da1780415 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -93,9 +93,9 @@ 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_HELPER depends on OF + select DRM_DISPLAY_DP_HELPER select DRM_DISPLAY_HDCP_HELPER select DRM_KMS_HELPER select EXTCON @@ -233,9 +233,9 @@ config DRM_PARADE_PS8622 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 @@ -319,9 +319,9 @@ config DRM_TOSHIBA_TC358764 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 @@ -342,9 +342,9 @@ config DRM_TOSHIBA_TC358768 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 @@ -388,9 +388,9 @@ config DRM_TI_SN65DSI83 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 diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index 9659df6718de..ec98c9453573 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -1,10 +1,10 @@ # 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 @@ -15,9 +15,9 @@ config DRM_ANALOGIX_ANX6345 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 @@ -34,9 +34,9 @@ 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 diff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig index 3480fd4d0a5f..20143afded40 100644 --- a/drivers/gpu/drm/bridge/cadence/Kconfig +++ b/drivers/gpu/drm/bridge/cadence/Kconfig @@ -23,9 +23,9 @@ 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 diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index 9801f47a3704..0cd439691422 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -39,7 +39,6 @@ config DRM_DISPLAY_DP_AUX_CHARDEV config DRM_DISPLAY_DP_HELPER bool "DRM DisplayPort Helpers" depends on DRM_DISPLAY_HELPER - default y help DRM display helpers for DisplayPort. diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 6a26a0b8eff2..4b0183bf221c 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -67,9 +67,9 @@ config DRM_EXYNOS_DSI 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 diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index dbde4e29d93a..43183a68a095 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -2,7 +2,6 @@ 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 @@ -12,6 +11,7 @@ config DRM_I915 # 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 diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 6caab8d4d4e0..2add54486ac4 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -23,10 +23,10 @@ config DRM_MEDIATEK 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. diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index f7708590583e..28a898722ace 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -6,7 +6,6 @@ config DRM_MSM 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 @@ -17,6 +16,7 @@ config DRM_MSM 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 diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 7cc305b2826d..5ac852b816db 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -2,12 +2,12 @@ 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 diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index e54f6f5604ed..0a0d97464f02 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -545,10 +545,10 @@ config DRM_PANEL_RAYDIUM_RM68200 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. @@ -584,10 +584,10 @@ 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 @@ -824,11 +824,11 @@ 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 @@ -903,10 +903,10 @@ config DRM_PANEL_TRULY_NT35597_WQXGA 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. diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig index 18c867219a70..07d330450f05 100644 --- a/drivers/gpu/drm/radeon/Kconfig +++ b/drivers/gpu/drm/radeon/Kconfig @@ -4,11 +4,11 @@ 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 diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 4b49a14758fe..b72c0bbf346d 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -35,9 +35,9 @@ config ROCKCHIP_VOP2 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 @@ -45,9 +45,9 @@ config ROCKCHIP_ANALOGIX_DP 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 diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index bb6e35261f11..e0385d175ec6 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -5,9 +5,9 @@ config DRM_TEGRA 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 diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index d97b3f4af5ed..4407e14338fc 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -3,7 +3,6 @@ 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 @@ -18,6 +17,7 @@ config DRM_XE 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 diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig index 41d753b14ccd..7a14a8c2e7be 100644 --- a/drivers/gpu/drm/xlnx/Kconfig +++ b/drivers/gpu/drm/xlnx/Kconfig @@ -4,12 +4,12 @@ config DRM_ZYNQMP_DPSUB 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 From 1e0b9b4466081e24a34092024bb2b485ebae630a Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:36 +0200 Subject: [PATCH 09/19] Revert "drm: Switch DRM_DISPLAY_DP_AUX_BUS to depends on" This reverts commit 4d15125d7fe637f401e64e33c99513adf6586fdd, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/79824fec01eb9ab0673b9409f9b39cc8b5cc338d.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 7d1da1780415..8c0883bc3f2a 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -92,11 +92,11 @@ config DRM_FSL_LDB 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 EXTCON select CRYPTO @@ -232,10 +232,10 @@ config DRM_PARADE_PS8622 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 @@ -387,7 +387,6 @@ config DRM_TI_SN65DSI83 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 @@ -396,6 +395,7 @@ config DRM_TI_SN65DSI86 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 diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index ec98c9453573..16d18dde483a 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -33,11 +33,11 @@ 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_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 diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index 0cd439691422..cffa2acdbc6c 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -11,7 +11,6 @@ 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" diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 2add54486ac4..50bb28327f65 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -22,11 +22,11 @@ config DRM_MEDIATEK 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. diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 28a898722ace..2055266506e5 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -5,7 +5,6 @@ config DRM_MSM 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 @@ -16,6 +15,7 @@ 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_EXEC select DRM_KMS_HELPER diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 0a0d97464f02..108ced2e8794 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -583,11 +583,11 @@ 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_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 @@ -823,12 +823,12 @@ 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_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 diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index e0385d175ec6..44381ee6ea9e 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -4,11 +4,11 @@ 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_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 From 05b8b6dd225d541b16145a0578ed93d91e43f0c1 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:37 +0200 Subject: [PATCH 10/19] Revert "drm: Switch DRM_DISPLAY_HELPER to depends on" This reverts commit e075e496f516bf92bc0cbaf94d64e8d4a6b58321, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/1ba76cc4d96a8afefff5d1bc42fb1e1329c5da68.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 45 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 33792ca3eeb7..bf4020915e29 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -74,12 +74,10 @@ config DRM_KUNIT_TEST_HELPERS config DRM_KUNIT_TEST tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS - depends on DRM - depends on DRM_DISPLAY_HELPER - depends on KUNIT - depends on MMU + depends on DRM && KUNIT && 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 diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index cf931b94a188..22d88f8ef527 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -2,15 +2,13 @@ config DRM_AMDGPU tristate "AMD GPU" - depends on DRM - depends on DRM_DISPLAY_HELPER - depends on MMU - depends on PCI + depends on DRM && PCI && MMU 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 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 8c0883bc3f2a..c621be1a99a8 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -92,10 +92,10 @@ config DRM_FSL_LDB 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 EXTCON @@ -232,9 +232,9 @@ config DRM_PARADE_PS8622 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 @@ -319,9 +319,9 @@ config DRM_TOSHIBA_TC358764 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 @@ -342,9 +342,9 @@ config DRM_TOSHIBA_TC358768 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 @@ -387,9 +387,9 @@ config DRM_TI_SN65DSI83 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 diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index 16d18dde483a..4846b2e9be7c 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -1,10 +1,10 @@ # 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 @@ -15,9 +15,9 @@ config DRM_ANALOGIX_ANX6345 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 @@ -33,10 +33,10 @@ config DRM_ANALOGIX_DP 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 diff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig index 20143afded40..cced81633ddc 100644 --- a/drivers/gpu/drm/bridge/cadence/Kconfig +++ b/drivers/gpu/drm/bridge/cadence/Kconfig @@ -23,12 +23,12 @@ 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. diff --git a/drivers/gpu/drm/bridge/synopsys/Kconfig b/drivers/gpu/drm/bridge/synopsys/Kconfig index f366ece47146..15fc182d05ef 100644 --- a/drivers/gpu/drm/bridge/synopsys/Kconfig +++ b/drivers/gpu/drm/bridge/synopsys/Kconfig @@ -1,8 +1,8 @@ # 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 diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index cffa2acdbc6c..c77e7f85bd67 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -3,7 +3,6 @@ config DRM_DISPLAY_HELPER tristate "DRM Display Helpers" depends on DRM - default y help DRM helpers for display adapters. diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 4b0183bf221c..733b109a5095 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -4,6 +4,7 @@ config DRM_EXYNOS 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 @@ -67,7 +68,6 @@ config DRM_EXYNOS_DSI 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 diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 43183a68a095..5932024f8f95 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -2,7 +2,6 @@ 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 @@ -14,6 +13,7 @@ config DRM_I915 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 diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 50bb28327f65..96cbe020f493 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -22,9 +22,9 @@ config DRM_MEDIATEK 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 diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 2055266506e5..27d72ed8b389 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -2,10 +2,9 @@ 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 @@ -17,6 +16,7 @@ config DRM_MSM 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 diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 5ac852b816db..ceef470c9fbf 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -1,14 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_NOUVEAU tristate "Nouveau (NVIDIA) cards" - depends on DRM - depends on DRM_DISPLAY_HELPER - depends on PCI - depends on MMU + depends on DRM && PCI && 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 diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 108ced2e8794..a979e9bb0905 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -544,11 +544,11 @@ config DRM_PANEL_RAYDIUM_RM68200 config DRM_PANEL_RAYDIUM_RM692E5 tristate "Raydium RM692E5-based DSI panel" - depends on BACKLIGHT_CLASS_DEVICE - depends on DRM_DISPLAY_HELPER - depends on DRM_MIPI_DSI depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE 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. @@ -582,11 +582,11 @@ 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_HELPER depends on OF + depends on BACKLIGHT_CLASS_DEVICE 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 @@ -822,12 +822,12 @@ 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_HELPER depends on OF + depends on BACKLIGHT_CLASS_DEVICE 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 @@ -902,11 +902,11 @@ config DRM_PANEL_TRULY_NT35597_WQXGA config DRM_PANEL_VISIONOX_R66451 tristate "Visionox R66451" - depends on BACKLIGHT_CLASS_DEVICE - depends on DRM_DISPLAY_HELPER - depends on DRM_MIPI_DSI depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE 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. diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig index 07d330450f05..f98356be0af2 100644 --- a/drivers/gpu/drm/radeon/Kconfig +++ b/drivers/gpu/drm/radeon/Kconfig @@ -2,13 +2,11 @@ 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 diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index b72c0bbf346d..0d5260e10f27 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -35,8 +35,8 @@ config ROCKCHIP_VOP2 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 @@ -45,8 +45,8 @@ config ROCKCHIP_ANALOGIX_DP 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 diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 44381ee6ea9e..782f51d3044a 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -4,10 +4,10 @@ config DRM_TEGRA 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 diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index 98772a6b5bf0..91dcf8d174d6 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -2,15 +2,15 @@ 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 diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 4407e14338fc..63f1e2d1649f 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -1,11 +1,7 @@ # 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_HELPER - depends on MMU - depends on PCI + depends on DRM && PCI && MMU && (m || (y && KUNIT=y)) select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particular # the shmem_readpage() which depends upon tmpfs @@ -20,6 +16,7 @@ config DRM_XE 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 diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig index 7a14a8c2e7be..68ee897de9d7 100644 --- a/drivers/gpu/drm/xlnx/Kconfig +++ b/drivers/gpu/drm/xlnx/Kconfig @@ -1,15 +1,13 @@ config DRM_ZYNQMP_DPSUB tristate "ZynqMP DisplayPort Controller Driver" depends on ARCH_ZYNQMP || COMPILE_TEST - depends on COMMON_CLK + depends on COMMON_CLK && DRM && OF 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 From 8f7f115596d3dccedc06f5813e0269734f5cc534 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:38 +0200 Subject: [PATCH 11/19] Revert "drm: Make drivers depends on DRM_DW_HDMI" This reverts commit c0e0f139354c01e0213204e4a96e7076e5a3e396, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/bd93d43b07f8ed6368119f4a5ddac2ee80debe53.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- 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, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 13142a6b8590..8dd89efa8ea7 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -5,9 +5,9 @@ config DRM_IMX_LDB_HELPER config DRM_IMX8MP_DW_HDMI_BRIDGE tristate "Freescale i.MX8MP HDMI-TX bridge support" - depends on COMMON_CLK - depends on DRM_DW_HDMI depends on OF + depends on COMMON_CLK + select DRM_DW_HDMI imply DRM_IMX8MP_HDMI_PVI imply PHY_FSL_SAMSUNG_HDMI_PHY help diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 5d810ac02171..bacf0655ebaf 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -35,8 +35,7 @@ config DRM_IMX_LDB config DRM_IMX_HDMI tristate "Freescale i.MX DRM HDMI" - depends on DRM_DW_HDMI - depends on DRM_IMX - depends on OF + select DRM_DW_HDMI + depends on DRM_IMX && OF help Choose this if you want to use HDMI on i.MX6. diff --git a/drivers/gpu/drm/ingenic/Kconfig b/drivers/gpu/drm/ingenic/Kconfig index 23effeb2ac72..3db117c5edd9 100644 --- a/drivers/gpu/drm/ingenic/Kconfig +++ b/drivers/gpu/drm/ingenic/Kconfig @@ -27,8 +27,8 @@ config DRM_INGENIC_IPU 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 diff --git a/drivers/gpu/drm/meson/Kconfig b/drivers/gpu/drm/meson/Kconfig index 5520b9e3f010..615fdd0ce41b 100644 --- a/drivers/gpu/drm/meson/Kconfig +++ b/drivers/gpu/drm/meson/Kconfig @@ -13,9 +13,9 @@ config DRM_MESON 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 diff --git a/drivers/gpu/drm/renesas/rcar-du/Kconfig b/drivers/gpu/drm/renesas/rcar-du/Kconfig index 2dc739db2ba3..53c356aed5d5 100644 --- a/drivers/gpu/drm/renesas/rcar-du/Kconfig +++ b/drivers/gpu/drm/renesas/rcar-du/Kconfig @@ -25,8 +25,8 @@ config DRM_RCAR_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. diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 0d5260e10f27..1bf3e2829cd0 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -7,6 +7,7 @@ config DRM_ROCKCHIP 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 @@ -56,7 +57,6 @@ config ROCKCHIP_CDN_DP 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 diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig index 5b19c7cb7b7e..4741d9f6544c 100644 --- a/drivers/gpu/drm/sun4i/Kconfig +++ b/drivers/gpu/drm/sun4i/Kconfig @@ -57,8 +57,8 @@ config DRM_SUN6I_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 From edc4e8518ead4546cbb73bbfb7b08fc2e2247243 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 22 Apr 2024 12:30:39 +0200 Subject: [PATCH 12/19] Revert "drm/display: Make all helpers visible and switch to depends on" This reverts commit d674858ff979550a0e97b4ac766f2640f0d9d7e7, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/3db958e3f4002e26cd963596d810c37feb315fb3.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard --- drivers/gpu/drm/display/Kconfig | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index c77e7f85bd67..864a6488bfdf 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -1,21 +1,20 @@ # SPDX-License-Identifier: MIT config DRM_DISPLAY_HELPER - tristate "DRM Display Helpers" + tristate depends on DRM help DRM helpers for display adapters. config DRM_DISPLAY_DP_AUX_BUS - tristate "DRM DisplayPort AUX bus support" + 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 - depends on DRM_DISPLAY_HELPER - depends on DRM_DISPLAY_DP_HELPER + 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 @@ -25,24 +24,23 @@ config DRM_DISPLAY_DP_AUX_CEC that do support this they often do not hook up the CEC pin. config DRM_DISPLAY_DP_AUX_CHARDEV - bool "DRM DisplayPort AUX Interface" - depends on DRM - depends on DRM_DISPLAY_HELPER - depends on DRM_DISPLAY_DP_HELPER + 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 "DRM DisplayPort Helpers" + bool depends on DRM_DISPLAY_HELPER help DRM display helpers for DisplayPort. config DRM_DISPLAY_DP_TUNNEL - bool "DRM DisplayPort tunnels support" - depends on DRM_DISPLAY_DP_HELPER + bool + select 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 @@ -62,13 +60,13 @@ config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG If in doubt, say "N". config DRM_DISPLAY_HDCP_HELPER - bool "DRM HDCD Helpers" + bool depends on DRM_DISPLAY_HELPER help DRM display helpers for HDCP. config DRM_DISPLAY_HDMI_HELPER - bool "DRM HDMI Helpers" + bool depends on DRM_DISPLAY_HELPER help DRM display helpers for HDMI. From 08f441360f760151e742768b379fede54b0cbf6c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 26 Apr 2024 22:56:02 +0900 Subject: [PATCH 13/19] drm: move DRM-related CONFIG options into DRM submenu When you create a submenu using the 'menu' syntax, there is no ambiguity about its end because the code between 'menu' and 'endmenu' becomes the submenu. In contrast, 'menuconfig' does not have the corresponding end marker. Instead, the end of the submenu is inferred from symbol dependencies. This is detailed in Documentation/kbuild/kconfig-language.rst, starting line 348. It outlines two methods to place the code under the submenu: (1) Open an if-block immediately after 'menuconfig', enclosing the submenu content within it (2) Add 'depends on' to every symbol intended for the submenu Many subsystems opt for (1) because it reliably maintains the submenu structure. The DRM subsystem adopts (2). The submenu ends when the sequence of 'depends on DRM' breaks. It can be confirmed by running a GUI frontend such as 'make menuconfig' and visiting the DRM menu: < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---- If you toggle this, you will notice most of the DRM-related options appear below it, not in the submenu. I highly recommend the approach (1). Obviously, (2) is not reliable, as the submenu breaks whenever someone forgets to add 'depends on DRM'. This commit encloses the entire DRM configuration with 'if DRM' and 'endif', except for DRM_PANEL_ORIENTATION_QUIRKS. Note: Now, 'depends on DRM' properties inside the if-block are all redundant. I leave it as follow-up cleanups. Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20240426135602.2500125-1-masahiroy@kernel.org Signed-off-by: Maxime Ripard --- drivers/gpu/drm/Kconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index bf4020915e29..026444eeb5c6 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -29,6 +29,8 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platform. +if DRM + config DRM_MIPI_DBI tristate depends on DRM @@ -437,10 +439,6 @@ config DRM_HYPERV config DRM_EXPORT_FOR_TESTS bool -# Separate option because drm_panel_orientation_quirks.c is shared with fbdev -config DRM_PANEL_ORIENTATION_QUIRKS - tristate - config DRM_LIB_RANDOM bool default n @@ -461,3 +459,9 @@ config DRM_WERROR this config option is disabled by default. If in doubt, say N. + +endif + +# Separate option because drm_panel_orientation_quirks.c is shared with fbdev +config DRM_PANEL_ORIENTATION_QUIRKS + tristate From 8bdbd8b5580b46c8cae365567f5bf6cc956e6512 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 2 May 2024 17:52:48 +0200 Subject: [PATCH 14/19] drm/panthor: Make sure we handle 'unknown group state' case properly When we check for state values returned by the FW, we only cover part of the 0:7 range. Make sure we catch FW inconsistencies by adding a default to the switch statement, and flagging the group state as unknown in that case. When an unknown state is detected, we trigger a reset, and consider the group as unusable after that point, to prevent the potential corruption from creeping in other places if we continue executing stuff on this context. v2: - Add Steve's R-b - Fix commit message Reported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/3b7fd2f2-679e-440c-81cd-42fc2573b515@moroto.mountain/T/#u Suggested-by: Steven Price Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240502155248.1430582-1-boris.brezillon@collabora.com --- drivers/gpu/drm/panthor/panthor_sched.c | 37 +++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 8ec66dd47db3..7f16a4a14e9a 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -490,6 +490,18 @@ enum panthor_group_state { * Can no longer be scheduled. The only allowed action is a destruction. */ PANTHOR_CS_GROUP_TERMINATED, + + /** + * @PANTHOR_CS_GROUP_UNKNOWN_STATE: Group is an unknown state. + * + * The FW returned an inconsistent state. The group is flagged unusable + * and can no longer be scheduled. The only allowed action is a + * destruction. + * + * When that happens, we also schedule a FW reset, to start from a fresh + * state. + */ + PANTHOR_CS_GROUP_UNKNOWN_STATE, }; /** @@ -1127,6 +1139,7 @@ csg_slot_sync_state_locked(struct panthor_device *ptdev, u32 csg_id) struct panthor_fw_csg_iface *csg_iface; struct panthor_group *group; enum panthor_group_state new_state, old_state; + u32 csg_state; lockdep_assert_held(&ptdev->scheduler->lock); @@ -1137,7 +1150,8 @@ csg_slot_sync_state_locked(struct panthor_device *ptdev, u32 csg_id) return; old_state = group->state; - switch (csg_iface->output->ack & CSG_STATE_MASK) { + csg_state = csg_iface->output->ack & CSG_STATE_MASK; + switch (csg_state) { case CSG_STATE_START: case CSG_STATE_RESUME: new_state = PANTHOR_CS_GROUP_ACTIVE; @@ -1148,11 +1162,28 @@ csg_slot_sync_state_locked(struct panthor_device *ptdev, u32 csg_id) case CSG_STATE_SUSPEND: new_state = PANTHOR_CS_GROUP_SUSPENDED; break; + default: + /* The unknown state might be caused by a FW state corruption, + * which means the group metadata can't be trusted anymore, and + * the SUSPEND operation might propagate the corruption to the + * suspend buffers. Flag the group state as unknown to make + * sure it's unusable after that point. + */ + drm_err(&ptdev->base, "Invalid state on CSG %d (state=%d)", + csg_id, csg_state); + new_state = PANTHOR_CS_GROUP_UNKNOWN_STATE; + break; } if (old_state == new_state) return; + /* The unknown state might be caused by a FW issue, reset the FW to + * take a fresh start. + */ + if (new_state == PANTHOR_CS_GROUP_UNKNOWN_STATE) + panthor_device_schedule_reset(ptdev); + if (new_state == PANTHOR_CS_GROUP_SUSPENDED) csg_slot_sync_queues_state_locked(ptdev, csg_id); @@ -1783,6 +1814,7 @@ static bool group_can_run(struct panthor_group *group) { return group->state != PANTHOR_CS_GROUP_TERMINATED && + group->state != PANTHOR_CS_GROUP_UNKNOWN_STATE && !group->destroyed && group->fatal_queues == 0 && !group->timedout; } @@ -2557,7 +2589,8 @@ void panthor_sched_suspend(struct panthor_device *ptdev) if (csg_slot->group) { csgs_upd_ctx_queue_reqs(ptdev, &upd_ctx, i, - CSG_STATE_SUSPEND, + group_can_run(csg_slot->group) ? + CSG_STATE_SUSPEND : CSG_STATE_TERMINATE, CSG_STATE_MASK); } } From 2fa42fd910c4ede1ae9c18d535b425046fa49351 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Tue, 30 Apr 2024 13:37:27 +0200 Subject: [PATCH 15/19] drm/panthor: Fix the FW reset logic In the post_reset function, if the fast reset didn't succeed, we are not clearing the fast_reset flag, which prevents firmware sections from being reloaded. While at it, use panthor_fw_stop() instead of manually writing DISABLE to the MCU_CONTROL register. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20240430113727.493155-1-boris.brezillon@collabora.com --- drivers/gpu/drm/panthor/panthor_fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c index 181395e2859a..fedf9627453f 100644 --- a/drivers/gpu/drm/panthor/panthor_fw.c +++ b/drivers/gpu/drm/panthor/panthor_fw.c @@ -1083,10 +1083,11 @@ int panthor_fw_post_reset(struct panthor_device *ptdev) if (!ret) goto out; - /* Force a disable, so we get a fresh boot on the next - * panthor_fw_start() call. + /* Forcibly reset the MCU and force a slow reset, so we get a + * fresh boot on the next panthor_fw_start() call. */ - gpu_write(ptdev, MCU_CONTROL, MCU_CONTROL_DISABLE); + panthor_fw_stop(ptdev); + ptdev->fw->fast_reset = false; drm_err(&ptdev->base, "FW fast reset failed, trying a slow reset"); } From 87cb4a612a89690b123e68f6602d9f6581b03597 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 19 Apr 2024 10:28:54 +0200 Subject: [PATCH 16/19] drm/fbdev-generic: Do not set physical framebuffer address Framebuffer memory is allocated via vzalloc() from non-contiguous physical pages. The physical framebuffer start address is therefore meaningless. Do not set it. The value is not used within the kernel and only exported to userspace on dedicated ARM configs. No functional change is expected. v2: - refer to vzalloc() in commit message (Javier) Signed-off-by: Thomas Zimmermann Fixes: a5b44c4adb16 ("drm/fbdev-generic: Always use shadow buffering") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: # v6.4+ Reviewed-by: Javier Martinez Canillas Reviewed-by: Zack Rusin Reviewed-by: Sui Jingfeng Tested-by: Sui Jingfeng Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-2-tzimmermann@suse.de (cherry picked from commit 73ef0aecba78aa9ebd309b10b6cd17d94e632892) Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_fbdev_generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c index be357f926fae..97e579c33d84 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_generic.c @@ -113,7 +113,6 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, /* screen */ info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; info->screen_buffer = screen_buffer; - info->fix.smem_start = page_to_phys(vmalloc_to_page(info->screen_buffer)); info->fix.smem_len = screen_size; /* deferred I/O */ From 514ca22a25265e9bef10eab143e6a956b00694aa Mon Sep 17 00:00:00 2001 From: Jocelyn Falempe Date: Fri, 26 Apr 2024 14:10:50 +0200 Subject: [PATCH 17/19] drm/fb_dma: Add checks in drm_fb_dma_get_scanout_buffer() plane->state and plane->state->fb can be NULL, so add a check before dereferencing them. Found by testing with the imx driver. Fixes: 879b3b6511fe ("drm/fb_dma: Add generic get_scanout_buffer() for drm_panic") Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240426121121.241366-1-jfalempe@redhat.com (cherry picked from commit 986c12d8c9a677c094c37bd6aa636b4d4c5ccd46) Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_fb_dma_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_dma_helper.c b/drivers/gpu/drm/drm_fb_dma_helper.c index 96e5ab960f12..e1d61a65210b 100644 --- a/drivers/gpu/drm/drm_fb_dma_helper.c +++ b/drivers/gpu/drm/drm_fb_dma_helper.c @@ -167,6 +167,9 @@ int drm_fb_dma_get_scanout_buffer(struct drm_plane *plane, struct drm_gem_dma_object *dma_obj; struct drm_framebuffer *fb; + if (!plane->state || !plane->state->fb) + return -EINVAL; + fb = plane->state->fb; /* Only support linear modifier */ if (fb->modifier != DRM_FORMAT_MOD_LINEAR) From ad81feb5b6f1f5461641706376dcf7a9914ed2e7 Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Fri, 26 Apr 2024 14:22:59 +0200 Subject: [PATCH 18/19] Revert "drm/bridge: ti-sn65dsi83: Fix enable error path" This reverts commit 8a91b29f1f50ce7742cdbe5cf11d17f128511f3f. The regulator_disable() added by the original commit solves one kind of regulator imbalance but adds another one as it allows the regulator to be disabled one more time than it is enabled in the following scenario: 1. Start video pipeline -> sn65dsi83_atomic_pre_enable -> regulator_enable 2. PLL lock fails -> regulator_disable 3. Stop video pipeline -> sn65dsi83_atomic_disable -> regulator_disable The reason is clear from the code flow, which looks like this (after removing unrelated code): static void sn65dsi83_atomic_pre_enable() { regulator_enable(ctx->vcc); if (PLL failed locking) { regulator_disable(ctx->vcc); <---- added by patch being reverted return; } } static void sn65dsi83_atomic_disable() { regulator_disable(ctx->vcc); } The use case for introducing the additional regulator_disable() was removing the module for debugging (see link below for the discussion). If the module is removed after a .atomic_pre_enable, i.e. with an active pipeline from the DRM point of view, .atomic_disable is not called and thus the regulator would not be disabled. According to the discussion however there is no actual use case for removing the module with an active pipeline, except for debugging/development. On the other hand, the occurrence of a PLL lock failure is possible due to any physical reason (e.g. a temporary hardware failure for electrical reasons) so handling it gracefully should be supported. As there is no way for .atomic[_pre]_enable to report an error to the core, the only clean way to support it is calling regulator_disabled() only in .atomic_disable, unconditionally, as it was before. Link: https://lore.kernel.org/all/15244220.uLZWGnKmhe@steina-w/ Fixes: 8a91b29f1f50 ("drm/bridge: ti-sn65dsi83: Fix enable error path") Reviewed-by: Alexander Stein Signed-off-by: Luca Ceresoli Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240426122259.46808-1-luca.ceresoli@bootlin.com (cherry picked from commit 2940ee03b23281071620dda1d790cd644dabd394) Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 4814b7b6d1fd..57a7ed13f996 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -478,7 +478,6 @@ static void sn65dsi83_atomic_pre_enable(struct drm_bridge *bridge, dev_err(ctx->dev, "failed to lock PLL, ret=%i\n", ret); /* On failure, disable PLL again and exit. */ regmap_write(ctx->regmap, REG_RC_PLL_EN, 0x00); - regulator_disable(ctx->vcc); return; } From be3f3042391d061cfca2bd22630e0d101acea5fc Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Fri, 8 Mar 2024 15:47:41 -0500 Subject: [PATCH 19/19] drm: zynqmp_dpsub: Always register bridge We must always register the DRM bridge, since zynqmp_dp_hpd_work_func calls drm_bridge_hpd_notify, which in turn expects hpd_mutex to be initialized. We do this before zynqmp_dpsub_drm_init since that calls drm_bridge_attach. This fixes the following lockdep warning: [ 19.217084] ------------[ cut here ]------------ [ 19.227530] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 19.227768] WARNING: CPU: 0 PID: 140 at kernel/locking/mutex.c:582 __mutex_lock+0x4bc/0x550 [ 19.241696] Modules linked in: [ 19.244937] CPU: 0 PID: 140 Comm: kworker/0:4 Not tainted 6.6.20+ #96 [ 19.252046] Hardware name: xlnx,zynqmp (DT) [ 19.256421] Workqueue: events zynqmp_dp_hpd_work_func [ 19.261795] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 19.269104] pc : __mutex_lock+0x4bc/0x550 [ 19.273364] lr : __mutex_lock+0x4bc/0x550 [ 19.277592] sp : ffffffc085c5bbe0 [ 19.281066] x29: ffffffc085c5bbe0 x28: 0000000000000000 x27: ffffff88009417f8 [ 19.288624] x26: ffffff8800941788 x25: ffffff8800020008 x24: ffffffc082aa3000 [ 19.296227] x23: ffffffc080d90e3c x22: 0000000000000002 x21: 0000000000000000 [ 19.303744] x20: 0000000000000000 x19: ffffff88002f5210 x18: 0000000000000000 [ 19.311295] x17: 6c707369642e3030 x16: 3030613464662072 x15: 0720072007200720 [ 19.318922] x14: 0000000000000000 x13: 284e4f5f4e524157 x12: 0000000000000001 [ 19.326442] x11: 0001ffc085c5b940 x10: 0001ff88003f388b x9 : 0001ff88003f3888 [ 19.334003] x8 : 0001ff88003f3888 x7 : 0000000000000000 x6 : 0000000000000000 [ 19.341537] x5 : 0000000000000000 x4 : 0000000000001668 x3 : 0000000000000000 [ 19.349054] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff88003f3880 [ 19.356581] Call trace: [ 19.359160] __mutex_lock+0x4bc/0x550 [ 19.363032] mutex_lock_nested+0x24/0x30 [ 19.367187] drm_bridge_hpd_notify+0x2c/0x6c [ 19.371698] zynqmp_dp_hpd_work_func+0x44/0x54 [ 19.376364] process_one_work+0x3ac/0x988 [ 19.380660] worker_thread+0x398/0x694 [ 19.384736] kthread+0x1bc/0x1c0 [ 19.388241] ret_from_fork+0x10/0x20 [ 19.392031] irq event stamp: 183 [ 19.395450] hardirqs last enabled at (183): [] finish_task_switch.isra.0+0xa8/0x2d4 [ 19.405140] hardirqs last disabled at (182): [] __schedule+0x714/0xd04 [ 19.413612] softirqs last enabled at (114): [] srcu_invoke_callbacks+0x158/0x23c [ 19.423128] softirqs last disabled at (110): [] srcu_invoke_callbacks+0x158/0x23c [ 19.432614] ---[ end trace 0000000000000000 ]--- Fixes: eb2d64bfcc17 ("drm: xlnx: zynqmp_dpsub: Report HPD through the bridge") Signed-off-by: Sean Anderson Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240308204741.3631919-1-sean.anderson@linux.dev (cherry picked from commit 61ba791c4a7a09a370c45b70a81b8c7d4cf6b2ae) Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c index 88eb33acd5f0..face8d6b2a6f 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c @@ -256,12 +256,12 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev) if (ret) goto err_dp; + drm_bridge_add(dpsub->bridge); + if (dpsub->dma_enabled) { ret = zynqmp_dpsub_drm_init(dpsub); if (ret) goto err_disp; - } else { - drm_bridge_add(dpsub->bridge); } dev_info(&pdev->dev, "ZynqMP DisplayPort Subsystem driver probed"); @@ -288,9 +288,8 @@ static void zynqmp_dpsub_remove(struct platform_device *pdev) if (dpsub->drm) zynqmp_dpsub_drm_cleanup(dpsub); - else - drm_bridge_remove(dpsub->bridge); + drm_bridge_remove(dpsub->bridge); zynqmp_disp_remove(dpsub); zynqmp_dp_remove(dpsub);