drm: Remove simple-display pipe
Subsystems (7)
Thomas Zimmermann
maintainerPATCH 1/2 drm/hyperv: Add missing include statements
In reply to Thomas ZimmermannHyperv-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.
--- drivers/gpu/drm/hyperv/hyperv_drm.h | 5 +++++ 1 file changed, 5 insertions(+)
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 {
Signature · 1 line
2.55.0
Thomas Zimmermann
maintainercover 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 additonal headers.
Thomas Zimmermann (2):
drm/hyperv: Add missing include statements drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
Documentation/gpu/todo.rst | 17 -- drivers/gpu/drm/drm_gem_atomic_helper.c | 92 ------- drivers/gpu/drm/drm_simple_kms_helper.c | 328 ------------------------ drivers/gpu/drm/hyperv/hyperv_drm.h | 5 + drivers/staging/fbtft/TODO | 6 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +--- 7 files changed, 10 insertions(+), 522 deletions(-)
base-commit: 9ecc25f4cc83ac280099d6c39e044d911774018d
Signature · 1 line
2.55.0
Thomas Zimmermann
maintainerPATCH 2/2 drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
There 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.
--- 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 | 6 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +--- 6 files changed, 5 insertions(+), 522 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 +3 -3
@@ -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 - drivers anymore. +* convert all these over to DRM and submit thme for inclusion into + the DRM subsystem under drivers/gpu/drm - fbdev doesn't take any + 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 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] drm/kms-helper: build breakage in imx-lcdc due to removed drm_simple_display_pipe - [Low] doc…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] drm/kms-helper: build breakage in imx-lcdc due to removed drm_simple_display_pipe
- [Low] doc: spelling mistake introduced in fbtft/TODO
--
commit d4d7a38057f45dc5b1cce9536154c93423caeae1
Author: Thomas Zimmermann <[email protected]>
Subject: drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
This commit removes the struct drm_simple_display_pipe data type and its associated helper functions from the DRM subsystem. It cleans up the remaining TODO items related to simple-pipe, under the premise that all drivers have been updated to use regular atomic helpers.
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 description accurate?
The imx-lcdc driver appears to still use struct drm_simple_display_pipe and its helper functions. Compiling with CONFIG_DRM_IMX_LCDC enabled will result in a build failure because the driver still relies on this structure in its device setup:
drivers/gpu/drm/imx/lcdc/imx-lcdc.c:imx_lcdc() {
...
struct drm_simple_display_pipe pipe;
...
}As well as during initialization:
drivers/gpu/drm/imx/lcdc/imx-lcdc.c: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);
...
}drivers/staging/fbtft/TODO line 1
Quoted 9 lines
drivers/staging/fbtft/TODO +1
-3@@ -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 - drivers anymore. +* convert all these over to DRM and submit thme for inclusion into
^^^^
[Severity: Low]
This isn't a bug, but there is a typo here (thme instead of them).
Quoted 2 lines
drivers/staging/fbtft/TODO +2
-0+ the DRM subsystem under drivers/gpu/drm - fbdev doesn't take any + new drivers anymore.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Thomas Zimmermann
maintainerRe: [PATCH 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
Am 01.10.26 um 15:47 schrieb [email protected]:
Quoted 2 lines
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] drm/kms-helper: build breakage in imx-lcdc due to removeddrm_simple_display_pipe
drm-misc-next already contains the fix for this problem.
Quoted 55 lines
- [Low] doc: spelling mistake introduced in fbtft/TODO --
commit
d4d7a38057f45dc5b1cce9536154c93423caeae1
Author: Thomas Zimmermann <[email protected]>
Subject: drm/kms-helper: Remove structdrm_simple_display_pipeand helpersThis commit removes the struct
drm_simple_display_pipedata type and its associated helper functions from the DRM subsystem. It cleans up the remaining TODO items related to simple-pipe, under the premise that all drivers have been updated to use regular atomic helpers.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 description accurate?The imx-lcdc driver appears to still use struct
drm_simple_display_pipeand its helper functions. Compiling withCONFIG_DRM_IMX_LCDCenabled will result in a build failure because the driver still relies on this structure in its device setup:drivers/gpu/drm/imx/lcdc/imx-lcdc.c:imx_lcdc() { ... struct drm_simple_display_pipe pipe; ... }As well as during initialization:
drivers/gpu/drm/imx/lcdc/imx-lcdc.c: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); ... }drivers/staging/fbtft/TODO line 1
Quoted 9 lines
drivers/staging/fbtft/TODO +1
-3@@ -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 - drivers anymore. +* convert all these over to DRM and submit thme for inclusion into^^^^[Severity: Low]
This isn't a bug, but there is a typo here (thme instead of them).Quoted 2 lines
drivers/staging/fbtft/TODO +2
-0+ the DRM subsystem under drivers/gpu/drm - fbdev doesn't take any + new drivers anymore.
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
Re: [PATCH 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
In reply to Thomas ZimmermannQuoted 9 lines · Thomas Zimmermann
There are no drivers using struct
drm_simple_display_pipe. Remove the data type and all related helpers.The idea behind struct
drm_simple_display_pipewas 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.
...
drivers/staging/fbtft/TODO line 1
Quoted 6 lines
+++ b/drivers/staging/fbtft/TODO
drivers/staging/fbtft/TODO +1
-3@@ -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 - drivers anymore. +* convert all these over to DRM and submit thme for inclusion into
them
(spell checking?)
Quoted 2 lines
drivers/staging/fbtft/TODO +2
-0+ the DRM subsystem under drivers/gpu/drm - fbdev doesn't take any + new drivers anymore.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 4 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 additonal headers.
additional
...
Makes a lot of sense,
with the spelling fix in the patch 2/2.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
In reply to Thomas ZimmermannQuoted 11 lines · Thomas Zimmermann
There are no drivers using struct
drm_simple_display_pipe. Remove the data type and all related helpers.The idea behind struct
drm_simple_display_pipewas 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.Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Re: [PATCH 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
In reply to Thomas ZimmermannThomas Zimmermann <[email protected]> writes:
Hello Thomas,
Quoted 9 lines
There are no drivers using struct
drm_simple_display_pipe. Remove the data type and all related helpers.The idea behind struct
drm_simple_display_pipewas 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.
Quoted 8 lines
Signed-off-by Thomas Zimmermann <[email protected]>--- 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 | 6 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +---
There are no more users of struct drm_simple_display_pipe but still some drivers include the drm_simple_kms_helper.h header. Latest drm-misc-next:
git grep "drm_simple_kms_helper.h" -- drivers/gpu/drm/*/ | wc -l 21
So it seems you need more preparatory patches. For this patch though:
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Thomas Zimmermann
maintainerRe: [PATCH 2/2] drm/kms-helper: Remove struct drm_simple_display_pipe and helpers
Hi Javier
Am 01.10.26 um 16:46 schrieb Javier Martinez Canillas:
Quoted 21 lines
Thomas Zimmermann <[email protected]> writes:
Hello Thomas,
Quoted 9 lines
There are no drivers using struct
drm_simple_display_pipe. Remove the data type and all related helpers.The idea behind struct
drm_simple_display_pipewas 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.Quoted 8 lines
Signed-off-by Thomas Zimmermann <[email protected]>--- 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 | 6 +- include/drm/drm_gem_atomic_helper.h | 28 -- include/drm/drm_simple_kms_helper.h | 56 +---
Quoted 7 lines
There are no more users of struct
drm_simple_display_pipebut still some drivers include thedrm_simple_kms_helper.hheader. Latest drm-misc-next:git grep "
drm_simple_kms_helper.h" --drivers/gpu/drm/*/| wc -l 21So it seems you need more preparatory patches. For this patch though:
I'll take another look at it, but there's another interface in this header file that is (still) being used by several drivers. The header file still remains in place for now.
Best regards
Thomas
Quoted 3 lines
Reviewed-by Javier Martinez Canillas <[email protected]>
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)