Re: [PATCH v2 00/10] drm/panel: Use refcounted allocation for remaining panel drivers

From: Maxime Ripard

Date: Mon May 11 2026 - 03:18:54 EST


On Fri, 08 May 2026 09:04:40 +0200, Albert Esteve wrote:
> This series converts 9 remaining panel drivers from the deprecated
> devm_kzalloc() + drm_panel_init() pattern to the refcounted
> devm_drm_panel_alloc() API. This follows the work by Anusha Srivatsa
> who introduced the refcounted panel allocation infrastructure [1] and
> converted a first batch of drivers [2] (the last part of a 5 sub-series).
>
> Reasoning:
> ----------
> The old allocation pattern is unsafe: when the panel device is
> unbound, devm frees the context struct immediately, but the DRM
> device may still hold a reference to the embedded drm_panel through
> the panel bridge, leading to a use-after-free. devm_drm_panel_alloc()
> wraps the allocation in a kref scheme, so the memory is only freed
> when the last reference is dropped.
>
> [...]

Applied to misc/kernel.git (drm-misc-next).

Thanks!
Maxime