drm: Remove simple-display pipe
Subsystems (17)
Thomas Zimmermann
maintainerv2 cover drm: Remove simple-display pipe
There are no drivers using struct drm_simple_display_pipe left. Remove the related helpers from DRM and clear any TODO items. Hyperv-drm needs a minor fix to include some additional headers.
Since we're at it, also remove include statements for the simple-kms header that are no longer needed. Most of them are likely left over from earlier usage of the simple-display pipe.
Thomas Zimmermann (7):
drm/hyperv: Add missing include statements drm/kms-helper: Remove struct drm_simple_display_pipe and helpers drm/bridge: Do not include <drm/drm_simple_kms_helper.h> drm/hisilicon/hibmc: Do not include <drm/drm_simple_kms_helper.h> drm/tegra: Do not include <drm/drm_simple_kms_helper.h> drm/verisilicon: Do not include <drm/drm_simple_kms_helper.h> drm/vc4: Do not include <drm/drm_simple_kms_helper.h>
Documentation/gpu/todo.rst | 17 - drivers/gpu/drm/bridge/inno-hdmi.c | 1 - drivers/gpu/drm/bridge/microchip-lvds.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-dp.c | 1 - drivers/gpu/drm/bridge/tda998x_drv.c | 1 - drivers/gpu/drm/drm_gem_atomic_helper.c | 92 ----- drivers/gpu/drm/drm_simple_kms_helper.c | 328 ------------------ .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 1 - .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - drivers/gpu/drm/hyperv/hyperv_drm.h | 5 + drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 1 - drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 1 - drivers/gpu/drm/tegra/output.c | 1 - drivers/gpu/drm/vc4/vc4_dpi.c | 1 - drivers/gpu/drm/vc4/vc4_dsi.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - drivers/gpu/drm/verisilicon/vs_bridge.c | 1 - drivers/staging/fbtft/TODO | 4 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +-- 21 files changed, 9 insertions(+), 535 deletions(-)
base-commit: 9ecc25f4cc83ac280099d6c39e044d911774018d
Signature · 1 line
2.55.0
Thomas Zimmermann
maintainerPATCH v2 1/7 drm/hyperv: Add missing include statements
Hyperv-drm gets a number of headers via <drm/drm_simple_kms_helper.h>. Include the files directly so that the simple-kms header doesn't have to.
v2:
- remove simple-kms include statements (Javier)
--- drivers/gpu/drm/hyperv/hyperv_drm.h | 5 +++++ drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 1 - drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 1 - 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/hyperv/hyperv_drm.h +5 -0
@@ -6,6 +6,11 @@#ifndef _HYPERV_DRM_H_#define _HYPERV_DRM_H_ +#include <drm/drm_connector.h> +#include <drm/drm_crtc.h> +#include <drm/drm_encoder.h> +#include <drm/drm_plane.h> +#define VMBUS_MAX_PACKET_SIZE 0x4000 struct hv_drm_device {
drivers/gpu/drm/hyperv/hyperv_drm_drv.c +0 -1
@@ -15,7 +15,6 @@#include <drm/drm_fbdev_shmem.h> #include <drm/drm_gem_shmem_helper.h> #include <drm/drm_print.h> -#include <drm/drm_simple_kms_helper.h> #include "hyperv_drm.h"
drivers/gpu/drm/hyperv/hyperv_drm_proto.c +0 -1
@@ -6,7 +6,6 @@#include <linux/hyperv.h> #include <drm/drm_print.h> -#include <drm/drm_simple_kms_helper.h> #include "hyperv_drm.h"
Signature · 1 line
2.55.0
Re: [PATCH v2 1/7] drm/hyperv: Add missing include statements
Thomas Zimmermann <[email protected]> writes:
Hello Thomas,
Quoted 10 lines
Hyperv-drm gets a number of headers via <
drm/drm_simple_kms_helper.h>. Include the files directly so that the simple-kms header doesn't have to.v2:
- remove simple-kms include statements (Javier)Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerPATCH v2 2/7 drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
In reply to Thomas ZimmermannThere are no drivers using struct drm_simple_display_pipe. Remove the data type and all related helpers.
The idea behind struct drm_simple_display_pipe was to provide an easier way for writing DRM drivers besides regular atomic helpers. It turned out to be more complicated. With all drivers being updated to use atomic helpers, it's time to remove simple-pipe. Also clean up the related TODO items.
v2:
- fix typo in fbtft TODO (Andy)
--- Documentation/gpu/todo.rst | 17 -- drivers/gpu/drm/drm_gem_atomic_helper.c | 92 ------- drivers/gpu/drm/drm_simple_kms_helper.c | 328 ------------------------ drivers/staging/fbtft/TODO | 4 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +--- 6 files changed, 4 insertions(+), 521 deletions(-)
Documentation/gpu/todo.rst +0 -17
@@ -29,23 +29,6 @@ refactorings already and are an expert in the specific area Subsystem-wide refactorings =========================== -Replace struct drm_simple_display_pipe with regular atomic helpers ------------------------------------------------------------------- - -The data type struct drm_simple_display_pipe and its helpers were supposed -to simplify driver development. Instead they only added an intermediate layer -between atomic modesetting and the DRM driver. - -There are still drivers that use drm_simple_display_pipe. The task here is to -convert them to use regular atomic helpers. Search for a driver that calls -drm_simple_display_pipe_init() and inline all helpers from drm_simple_kms_helper.c -into the driver, such that no simple-KMS interfaces are required. Please also -rename all inlined functions according to driver conventions. - -Contact: Thomas Zimmermann, respective driver maintainer - -Level: Easy - Remove custom dumb_map_offset implementations ---------------------------------------------
drivers/gpu/drm/drm_gem_atomic_helper.c +0 -92
101 lines not on this page · raw message
drivers/gpu/drm/drm_simple_kms_helper.c +0 -328
339 lines not on this page · raw message
drivers/staging/fbtft/TODO +2 -2
@@ -1,3 +1,3 @@ -* convert all these over to drm_simple_display_pipe and submit for inclusion - into the DRM subsystem under drivers/gpu/drm - fbdev doesn't take any new +* convert all drivers over to DRM and submit them for inclusion into + the DRM subsystem under drivers/gpu/drm - fbdev doesn't take new drivers anymore.
include/drm/drm_gem_atomic_helper.h +0 -28
@@ -9,8 +9,6 @@#include <drm/drm_fourcc.h> #include <drm/drm_plane.h> -struct drm_simple_display_pipe ; -/* * Plane Helpers */
@@ -126,30 +124,4 @@ void drm_gem_end_shadow_fb_access(struct drm_plane *plane, struct drm_plane_stat .begin_fb_access = drm_gem_begin_shadow_fb_access, \ .end_fb_access = drm_gem_end_shadow_fb_access -int drm_gem_simple_kms_begin_shadow_fb_access (struct drm_simple_display_pipe *pipe, -struct drm_plane_state *plane_state); -void drm_gem_simple_kms_end_shadow_fb_access (struct drm_simple_display_pipe *pipe, -struct drm_plane_state *plane_state); -struct drm_plane_state * -drm_gem_simple_kms_create_shadow_plane_state (struct drm_simple_display_pipe *pipe); -struct drm_plane_state * -drm_gem_simple_kms_duplicate_shadow_plane_state (struct drm_simple_display_pipe *pipe); -void drm_gem_simple_kms_destroy_shadow_plane_state (struct drm_simple_display_pipe *pipe, -struct drm_plane_state *plane_state); - -/** -* DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS - -* Initializes struct drm_simple_display_pipe_funcs for shadow-buffered planes -* -* Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This -* macro initializes struct drm_simple_display_pipe_funcs to use the rsp helper -* functions. -*/ -#define DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS \ - .begin_fb_access = drm_gem_simple_kms_begin_shadow_fb_access, \ - .end_fb_access = drm_gem_simple_kms_end_shadow_fb_access, \ - .create_plane_state = drm_gem_simple_kms_create_shadow_plane_state, \ - .duplicate_plane_state = drm_gem_simple_kms_duplicate_shadow_plane_state, \ - .destroy_plane_state = drm_gem_simple_kms_destroy_shadow_plane_state -#endif /* __DRM_GEM_ATOMIC_HELPER_H__ */
include/drm/drm_simple_kms_helper.h +2 -54
63 lines not on this page · raw message
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 2/7] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] build: imx-lcdc broken due to removed drm_simple_display_pipe --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] build: imx-lcdc broken due to removed drm_simple_display_pipe
--
commit 34fb6e586b77e29b94177632c0a641cf060ef4ce
Author: Thomas Zimmermann <[email protected]>
drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
This commit removes struct drm_simple_display_pipe and its related helpers, stating that they are no longer used by any drivers. It also updates the TODO list to reflect this cleanup.
Quoted 2 lines
There are no drivers using struct
drm_simple_display_pipe. Remove the data type and all related helpers.
[Severity: Low]
Is this statement fully accurate? It appears the imx-lcdc driver still relies on these structs and functions. Building with CONFIG_DRM_IMX_LCDC=y currently fails due to incomplete types and implicit function declarations caused by this removal.
For example, in drivers/gpu/drm/imx/lcdc/imx-lcdc.c, the struct is still embedded:
struct imx_lcdc {
...
struct drm_device *drm;
struct drm_simple_display_pipe pipe;
...And initialized in imx_lcdc_probe():
ret = drm_simple_display_pipe_init(drm, &lcdc->pipe, &imx_lcdc_pipe_funcs, imx_lcdc_formats, ARRAY_SIZE(imx_lcdc_formats), NULL, NULL);
Does this driver need to be converted to regular atomic helpers before removing the simple-pipe infrastructure?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Thomas Zimmermann
maintainerPATCH v2 3/7 drm/bridge: Do not include <drm/drm_simple_kms_helper.h>
In reply to Thomas ZimmermannThe bridge code does not require anything from the simple-kms header. Do not include it.
--- drivers/gpu/drm/bridge/inno-hdmi.c | 1 - drivers/gpu/drm/bridge/microchip-lvds.c | 1 - drivers/gpu/drm/bridge/synopsys/dw-dp.c | 1 - drivers/gpu/drm/bridge/tda998x_drv.c | 1 - 4 files changed, 4 deletions(-)
drivers/gpu/drm/bridge/inno-hdmi.c +0 -1
@@ -25,7 +25,6 @@#include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <drm/display/drm_hdmi_helper.h> #include <drm/display/drm_hdmi_state_helper.h>
drivers/gpu/drm/bridge/microchip-lvds.c +0 -1
@@ -26,7 +26,6 @@#include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #define LVDS_POLL_TIMEOUT_MS 1000
drivers/gpu/drm/bridge/synopsys/dw-dp.c +0 -1
@@ -27,7 +27,6 @@#include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #define DW_DP_VERSION_NUMBER 0x0000#define DW_DP_VERSION_TYPE 0x0004
drivers/gpu/drm/bridge/tda998x_drv.c +0 -1
@@ -19,7 +19,6 @@#include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <media/cec-notifier.h>
Signature · 1 line
2.55.0
Re: [PATCH v2 3/7] drm/bridge: Do not include <drm/drm_simple_kms_helper.h>
Quoted 6 lines · Thomas Zimmermann
The bridge code does not require anything from the simple-kms header. Do not include it.
Suggested-by Javier Martinez Canillas <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerPATCH v2 4/7 drm/hisilicon/hibmc: Do not include <drm/drm_simple_kms_helper.h>
In reply to Thomas ZimmermannThe hibmc driver does not require anything from the simple-kms header. Do not include it.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c +0 -1
@@ -4,7 +4,6 @@#include <linux/io.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_modes.h> #include <drm/drm_drv.h>
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +0 -1
@@ -17,7 +17,6 @@#include <drm/drm_edid.h> #include <drm/drm_probe_helper.h> #include <drm/drm_print.h> -#include <drm/drm_simple_kms_helper.h> #include "hibmc_drm_drv.h" #include "hibmc_drm_regs.h"
Signature · 1 line
2.55.0
Re: [PATCH v2 4/7] drm/hisilicon/hibmc: Do not include <drm/drm_simple_kms_helper.h>
Quoted 6 lines · Thomas Zimmermann
The hibmc driver does not require anything from the simple-kms header. Do not include it.
Suggested-by Javier Martinez Canillas <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerPATCH v2 5/7 drm/tegra: Do not include <drm/drm_simple_kms_helper.h>
In reply to Thomas ZimmermannThe tegra driver does not require anything from the simple-kms header. Do not include it.
--- drivers/gpu/drm/tegra/output.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/tegra/output.c +0 -1
@@ -11,7 +11,6 @@#include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> -#include <drm/drm_simple_kms_helper.h> #include "drm.h" #include "dc.h"
Signature · 1 line
2.55.0
Re: [PATCH v2 5/7] drm/tegra: Do not include <drm/drm_simple_kms_helper.h>
Quoted 6 lines · Thomas Zimmermann
The tegra driver does not require anything from the simple-kms header. Do not include it.
Suggested-by Javier Martinez Canillas <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerPATCH v2 6/7 drm/verisilicon: Do not include <drm/drm_simple_kms_helper.h>
In reply to Thomas ZimmermannThe verisilicon driver does not require anything from the simple-kms header. Do not include it.
--- drivers/gpu/drm/verisilicon/vs_bridge.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/verisilicon/vs_bridge.c +0 -1
@@ -16,7 +16,6 @@#include <drm/drm_encoder.h> #include <drm/drm_of.h> #include <drm/drm_print.h> -#include <drm/drm_simple_kms_helper.h> #include "vs_bridge.h" #include "vs_bridge_regs.h"
Signature · 1 line
2.55.0
Re: [PATCH v2 6/7] drm/verisilicon: Do not include <drm/drm_simple_kms_helper.h>
Quoted 6 lines · Thomas Zimmermann
The verisilicon driver does not require anything from the simple-kms header. Do not include it.
Suggested-by Javier Martinez Canillas <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerPATCH v2 7/7 drm/vc4: Do not include <drm/drm_simple_kms_helper.h>
In reply to Thomas ZimmermannThe vc4 driver does not require anything from the simple-kms header. Do not include it.
--- drivers/gpu/drm/vc4/vc4_dpi.c | 1 - drivers/gpu/drm/vc4/vc4_dsi.c | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - drivers/gpu/drm/vc4/vc4_vec.c | 1 - 4 files changed, 4 deletions(-)
drivers/gpu/drm/vc4/vc4_dpi.c +0 -1
@@ -19,7 +19,6 @@#include <drm/drm_panel.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <linux/clk.h> #include <linux/component.h> #include <linux/media-bus-format.h>
drivers/gpu/drm/vc4/vc4_dsi.c +0 -1
@@ -38,7 +38,6 @@#include <drm/drm_panel.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include "vc4_drv.h" #include "vc4_regs.h"
drivers/gpu/drm/vc4/vc4_hdmi.c +0 -1
@@ -41,7 +41,6 @@#include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <linux/clk.h> #include <linux/component.h> #include <linux/gpio/consumer.h>
drivers/gpu/drm/vc4/vc4_vec.c +0 -1
@@ -19,7 +19,6 @@#include <drm/drm_panel.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <linux/clk.h> #include <linux/component.h> #include <linux/of.h>
Signature · 1 line
2.55.0
Re: [PATCH v2 7/7] drm/vc4: Do not include <drm/drm_simple_kms_helper.h>
Quoted 6 lines · Thomas Zimmermann
The vc4 driver does not require anything from the simple-kms header. Do not include it.
Suggested-by Javier Martinez Canillas <[email protected]>Signed-off-by Thomas Zimmermann <[email protected]>
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Quoted 7 lines · Thomas Zimmermann
There are no drivers using struct
drm_simple_display_pipeleft. Remove the related helpers from DRM and clear any TODO items. Hyperv-drm needs a minor fix to include some additional headers.Since we're at it, also remove include statements for the simple-kms header that are no longer needed. Most of them are likely left over from earlier usage of the simple-display pipe.
for the patches 3-7.
Signature · 2 lines
With Best Regards, Andy Shevchenko