Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-14 Thread Anusha Srivatsa
On Fri, Mar 14, 2025 at 8:27 AM Luca Ceresoli wrote: > Hello Anusha, > > On Thu, 13 Mar 2025 16:34:45 -0400 > Anusha Srivatsa wrote: > > > > > +void *__devm_drm_panel_alloc(struct device *dev, size_t size, > size_t > > > offset, > > > > + const struct drm_panel_funcs *fu

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-14 Thread Luca Ceresoli
Hello Anusha, On Thu, 13 Mar 2025 16:34:45 -0400 Anusha Srivatsa wrote: > > > +void *__devm_drm_panel_alloc(struct device *dev, size_t size, size_t > > offset, > > > + const struct drm_panel_funcs *funcs) > > > +{ > > > + void *container; > > > + struct drm_p

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-13 Thread Anusha Srivatsa
On Thu, Mar 13, 2025 at 6:10 AM Luca Ceresoli wrote: > Hello Anusha, > > On Wed, 12 Mar 2025 20:54:42 -0400 > Anusha Srivatsa wrote: > > > Introduce reference counted allocations for panels to avoid > > use-after-free. The patch adds the macro devm_drm_bridge_alloc() > > to allocate a new refcou

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-13 Thread Anusha Srivatsa
On Thu, Mar 13, 2025 at 10:42 AM Maxime Ripard wrote: > Hi Anusha, > > In addition to the feedback Luca already provided, I have a few comments > > On Wed, Mar 12, 2025 at 08:54:42PM -0400, Anusha Srivatsa wrote: > > Introduce reference counted allocations for panels to avoid > > use-after-free.

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-13 Thread Maxime Ripard
Hi Anusha, In addition to the feedback Luca already provided, I have a few comments On Wed, Mar 12, 2025 at 08:54:42PM -0400, Anusha Srivatsa wrote: > Introduce reference counted allocations for panels to avoid > use-after-free. The patch adds the macro devm_drm_bridge_alloc() > to allocate a new

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-13 Thread Maxime Ripard
On Thu, Mar 13, 2025 at 11:09:44AM +0100, Luca Ceresoli wrote: > Hello Anusha, > > On Wed, 12 Mar 2025 20:54:42 -0400 > Anusha Srivatsa wrote: > > > Introduce reference counted allocations for panels to avoid > > use-after-free. The patch adds the macro devm_drm_bridge_alloc() > > to allocate a

Re: [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-13 Thread Luca Ceresoli
Hello Anusha, On Wed, 12 Mar 2025 20:54:42 -0400 Anusha Srivatsa wrote: > Introduce reference counted allocations for panels to avoid > use-after-free. The patch adds the macro devm_drm_bridge_alloc() > to allocate a new refcounted panel. Followed the documentation for > drmm_encoder_alloc() and

[PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons

2025-03-12 Thread Anusha Srivatsa
Introduce reference counted allocations for panels to avoid use-after-free. The patch adds the macro devm_drm_bridge_alloc() to allocate a new refcounted panel. Followed the documentation for drmm_encoder_alloc() and devm_drm_dev_alloc and other similar implementations for this purpose. Also addin