Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-27 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, Thanks a lot for the feedback! > Hi Javier, > > this patch is completely broken. It's easy to fix though. > > Am 21.07.23 um 09:09 schrieb Javier Martinez Canillas: [...] >> +struct ssd130x_plane_state { >> +struct drm_plane_state base; > > You need

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-27 Thread Thomas Zimmermann
Hi Javier, this patch is completely broken. It's easy to fix though. Am 21.07.23 um 09:09 schrieb Javier Martinez Canillas: Geert reports that the following NULL pointer dereference happens for him after commit 49d7d581ceaf ("drm/ssd130x: Don't allocate buffers on each plane update"): [dr

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Javier Martinez Canillas
Geert Uytterhoeven writes: Hello Geert, > Hi Maxime, > > On Wed, Jul 26, 2023 at 3:54 PM Maxime Ripard wrote: >> On Wed, Jul 26, 2023 at 02:33:06PM +0200, Geert Uytterhoeven wrote: >> > > >> Also, Javier pointed me to a discussion you had on IRC about using >> > > >> devm >> > > >> allocation

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Javier Martinez Canillas
Maxime Ripard writes: Hello Maxime, > Hi, > > On Wed, Jul 26, 2023 at 01:52:37PM +0200, Geert Uytterhoeven wrote: >> On Wed, Jul 26, 2023 at 12:00 PM Maxime Ripard wrote: >> > On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: [...] >> The second buffer (containing the hardwa

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Geert Uytterhoeven
Hi Maxime, On Wed, Jul 26, 2023 at 3:54 PM Maxime Ripard wrote: > On Wed, Jul 26, 2023 at 02:33:06PM +0200, Geert Uytterhoeven wrote: > > > >> Also, Javier pointed me to a discussion you had on IRC about using devm > > > >> allocation here. We can't really do that. KMS devices are only freed > >

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Maxime Ripard
On Wed, Jul 26, 2023 at 02:33:06PM +0200, Geert Uytterhoeven wrote: > > >> Also, Javier pointed me to a discussion you had on IRC about using devm > > >> allocation here. We can't really do that. KMS devices are only freed > > >> once the last userspace application closes its fd to the device file,

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Maxime Ripard
Hi, On Wed, Jul 26, 2023 at 01:52:37PM +0200, Geert Uytterhoeven wrote: > On Wed, Jul 26, 2023 at 12:00 PM Maxime Ripard wrote: > > On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: > > > > --- a/drivers/gpu/drm/solomon/ssd130x.c > > > > +++ b/drivers/gpu/drm/solomon/ssd130x.c >

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Geert Uytterhoeven
Hi Javier, On Wed, Jul 26, 2023 at 2:22 PM Javier Martinez Canillas wrote: > Geert Uytterhoeven writes: > > On Wed, Jul 26, 2023 at 12:00 PM Maxime Ripard wrote: > >> On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: > >> > > --- a/drivers/gpu/drm/solomon/ssd130x.c > >> > > ++

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Javier Martinez Canillas
Geert Uytterhoeven writes: Hello Geert, > Hi Maxime, > > On Wed, Jul 26, 2023 at 12:00 PM Maxime Ripard wrote: >> On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: >> > > --- a/drivers/gpu/drm/solomon/ssd130x.c >> > > +++ b/drivers/gpu/drm/solomon/ssd130x.c >> > > @@ -141,12 +

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Geert Uytterhoeven
Hi Maxime, On Wed, Jul 26, 2023 at 12:00 PM Maxime Ripard wrote: > On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: > > > --- a/drivers/gpu/drm/solomon/ssd130x.c > > > +++ b/drivers/gpu/drm/solomon/ssd130x.c > > > @@ -141,12 +141,26 @@ const struct ssd130x_deviceinfo ssd130x_va

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Javier Martinez Canillas
Maxime Ripard writes: Hello Maxime, > On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: >> > --- a/drivers/gpu/drm/solomon/ssd130x.c >> > +++ b/drivers/gpu/drm/solomon/ssd130x.c >> > @@ -141,12 +141,26 @@ const struct ssd130x_deviceinfo ssd130x_variants[] = >> > { >> > }; >>

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-26 Thread Maxime Ripard
On Tue, Jul 25, 2023 at 09:21:52PM +0200, Geert Uytterhoeven wrote: > > --- a/drivers/gpu/drm/solomon/ssd130x.c > > +++ b/drivers/gpu/drm/solomon/ssd130x.c > > @@ -141,12 +141,26 @@ const struct ssd130x_deviceinfo ssd130x_variants[] = { > > }; > > EXPORT_SYMBOL_NS_GPL(ssd130x_variants, DRM_SSD130

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-25 Thread Javier Martinez Canillas
Geert Uytterhoeven writes: Hello Geert, > Hi Javier, > > Thanks for your patch! > Thanks a lot for your feedabck. > On Fri, Jul 21, 2023 at 9:10 AM Javier Martinez Canillas > wrote: >> Geert reports that the following NULL pointer dereference happens for him [...] > >> Since the primary pla

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-25 Thread Geert Uytterhoeven
Hi Javier, Thanks for your patch! On Fri, Jul 21, 2023 at 9:10 AM Javier Martinez Canillas wrote: > Geert reports that the following NULL pointer dereference happens for him > after commit 49d7d581ceaf ("drm/ssd130x: Don't allocate buffers on each > plane update"): > > [drm] Initialized ssd1

Re: [PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-21 Thread Maxime Ripard
On Fri, 21 Jul 2023 09:09:50 +0200, Javier Martinez Canillas wrote: > Geert reports that the following NULL pointer dereference happens for him > after commit 49d7d581ceaf ("drm/ssd130x: Don't allocate buffers on each > plane update"): > > [drm] Initialized ssd130x 1.0.0 20220131 for 0-003c on

[PATCH v4] drm/ssd130x: Allocate buffers in the plane's .atomic_check callback

2023-07-21 Thread Javier Martinez Canillas
Geert reports that the following NULL pointer dereference happens for him after commit 49d7d581ceaf ("drm/ssd130x: Don't allocate buffers on each plane update"): [drm] Initialized ssd130x 1.0.0 20220131 for 0-003c on minor 0 ssd130x-i2c 0-003c: [drm] surface width(128), height(32), bpp(1)