Thread (46 messages) 46 messages, 5 authors, 2026-01-06

Re: [PATCH v2 14/20] drm/tilcdc: Modernize driver initialization and cleanup paths

From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
Date: 2025-12-17 14:26:05
Also in: dri-devel, linux-devicetree, linux-omap, lkml

On Thu Dec 11, 2025 at 5:38 PM CET, Kory Maincent (TI.com) wrote:
Refactor the driver initialization to use modern DRM managed resource
APIs, simplifying the code.

The tilcdc_init and tilcdc_fini wrapper functions are removed since they
served no purpose after the component framework was eliminated. Their
logic is integrated directly into probe and remove.

Key changes:
- Use devm_drm_dev_alloc() instead of drm_dev_alloc().
- Use drmm_mode_config_init() instead of drm_mode_config_init().
- Align the remove path with the probe error path to ensure consistent
  cleanup ordering in both success and failure cases.
- Adjust platform_set_drvdata() to store the private structure instead
  of the drm_device, matching the new allocation pattern.

These changes reduce error-prone code while maintaining the same
functional behavior.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Overall looks good:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

However the diff is not very readable dues to the code moved around. I
suspect this could have been split in multiple patches: some just moving
code around and no functional changes, others doing the actual work but
without moving around code so the diff is more readable.

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help