lkml.org 
[lkml]   [2023]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] drm/ssd130x: Allocate buffer in the CRTC's .atomic_check() callback
On Fri, Sep 01, 2023 at 09:48:09AM +0200, Javier Martinez Canillas wrote:
> Thomas Zimmermann <tzimmermann@suse.de> writes:
>
> > Hi Javier,
> >
> > another idea about this patch: why not just keep the allocation in the
> > plane's atomic check, but store the temporary buffers in a plane struct.
> > You'd only grow the arrays length in atomic_check and later fetch the
> > pointers in atomic_update. It needs some locking, but nothing complicated.
> >
>
> Yes, that would work too. Another option is to just move the buffers to
> struct ssd130x_device as it was before commit 45b58669e532 ("drm/ssd130x:
> Allocate buffer in the plane's .atomic_check() callback") but just make
> them fixed arrays with the size of the biggest format.
>
> That will be some memory wasted but will prevent the problem of trying to
> allocate buffers after drm_atomic_helper_swap_state() has been called.

If we want to go that road, we don't even need an extra allocation, it
can be part of the state or object structure itself.

Maxime
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-09-01 10:25    [W:0.148 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site