Skip to content

RFC drm/panel: Refcounted panel allocation

Anusha Srivatsa dri-devel lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20250311-drm-panel-c327992e932e

Versions newest first

  1. v1 RFC Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/panel: Add new helpers for refcounted panel allocatonsdrivers/gpu/drm/drm_panel.c include/drm/drm_panel.h+108 -07 replies
2/2drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()drivers/gpu/drm/panel/panel-simple.c+1 -32 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/2] drm/panel: Refcounted panel allocation

Primary motivation is to avoid havig a dangling pointer with panels. In a scenario where panel device no longer exists, the DRM driver has no idea of it. It can continue to try and access a panel leading to use-after-free situations.
This is the initial draft more for feedback only. Once the path forward is clear, further drivers will be converted to using the API.

---
Anusha Srivatsa (2):
drm/panel: Add new helpers for refcounted panel allocatons drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()

 drivers/gpu/drm/drm_panel.c          | 50 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c |  4 +--
 include/drm/drm_panel.h              | 58 ++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 3 deletions(-)

---
base-commit: 3282422bf251db541fe07c548ca304130d37d754
change-id: 20250311-drm-panel-c327992e932e

Best regards,

Signature · 1 line
Anusha Srivatsa <[email protected]>