Hi
Am 23.03.26 um 04:57 schrieb Dmitry Baryshkov:
On Thu, Mar 19, 2026 at 04:59:40PM +0100, Thomas Zimmermann wrote:
Replace simple-display helpers with regular atomic helpers. Store the
pipeline elements in struct hx8357d_device and initialize them as part
of probing the device. Use mipi-dbi's existing helpers and initializer
macros where possible.
Effectively open-codes the modesetting code in the initializer helpers
of mipi-dbi and simple-display. Hx8357d requires a custom helper for
CRTC enablement, and non-freeing cleanup of the pipeline.
v2:
- fix connector initialization
Signed-off-by: Thomas Zimmermann <[email protected]>
Acked-by: David Lechner <[email protected]>
---
drivers/gpu/drm/tiny/hx8357d.c | 135 +++++++++++++++++++++++++++++----
1 file changed, 122 insertions(+), 13 deletions(-)
@@ -183,8 +215,35 @@ static void yx240qv29_enable(struct
drm_simple_display_pipe *pipe,
drm_dev_exit(idx);
}
-static const struct drm_simple_display_pipe_funcs hx8357d_pipe_funcs = {
- DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS(yx240qv29_enable),
+static const struct drm_crtc_helper_funcs hx8357d_crtc_helper_funcs = {
+ DRM_MIPI_DBI_CRTC_HELPER_FUNCS,
+ .atomic_enable = hx8357d_crtc_helper_atomic_enable,
+};
+
+static const struct drm_crtc_funcs hx8357d_crtc_funcs = {
+ DRM_MIPI_DBI_CRTC_FUNCS,
+ .destroy = drm_crtc_cleanup,
Nit: would it make sense to use drmm_FOO_init for all allocated
objects? I think we have all corresponding functions except for
drmm_universal_planes_init()
I know that some prefer that style. But for these simple drivers with a
fixed pipeline, it seems like a waste of resources to me.
Best regards
Thomas
+};
+
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)