Re: [PATCH 1/3] drm/dsi: use stack buffer in mipi_dsi_dcs_write()

2020-06-29 Thread Sam Ravnborg
On Tue, May 05, 2020 at 05:03:27PM +0100, Emil Velikov wrote: > Currently the function heap allocates when we have any payload. Where in > many case the payload is 1 byte - ouch. > > >From casual observation, vast majority of the payloads are smaller than > 8 bytes - so use a stack array tx[8] to

Re: [PATCH 1/3] drm/dsi: use stack buffer in mipi_dsi_dcs_write()

2020-06-05 Thread Thierry Reding
On Thu, May 28, 2020 at 05:47:41PM +0100, Emil Velikov wrote: > On Tue, 5 May 2020 at 17:05, Emil Velikov wrote: > > > > Currently the function heap allocates when we have any payload. Where in > > many case the payload is 1 byte - ouch. > > > > From casual observation, vast majority of the

Re: [PATCH 1/3] drm/dsi: use stack buffer in mipi_dsi_dcs_write()

2020-06-05 Thread Thierry Reding
On Tue, May 05, 2020 at 05:03:27PM +0100, Emil Velikov wrote: > Currently the function heap allocates when we have any payload. Where in > many case the payload is 1 byte - ouch. > > From casual observation, vast majority of the payloads are smaller than > 8 bytes - so use a stack array tx[8] to

Re: [PATCH 1/3] drm/dsi: use stack buffer in mipi_dsi_dcs_write()

2020-05-28 Thread Emil Velikov
On Tue, 5 May 2020 at 17:05, Emil Velikov wrote: > > Currently the function heap allocates when we have any payload. Where in > many case the payload is 1 byte - ouch. > > From casual observation, vast majority of the payloads are smaller than > 8 bytes - so use a stack array tx[8] to avoid the

[PATCH 1/3] drm/dsi: use stack buffer in mipi_dsi_dcs_write()

2020-05-05 Thread Emil Velikov
Currently the function heap allocates when we have any payload. Where in many case the payload is 1 byte - ouch. >From casual observation, vast majority of the payloads are smaller than 8 bytes - so use a stack array tx[8] to avoid the senseless kmalloc and kfree dance. Cc: Jani Nikula Cc: