[PATCH 0/5] drm/ssd130x: A few enhancements and cleanups

Javier Martinez Canillas posted 5 patches 2 years, 8 months ago
There is a newer version of this series
.../bindings/display/solomon,ssd1307fb.yaml   |   8 +-
drivers/gpu/drm/solomon/ssd130x.c             | 124 ++++++++++++------
drivers/gpu/drm/solomon/ssd130x.h             |   6 +
3 files changed, 93 insertions(+), 45 deletions(-)
[PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
Posted by Javier Martinez Canillas 2 years, 8 months ago
Hello,

While working on adding support for the SSD132X family of 4-bit grayscale
Solomon OLED panel controllers, I noticed a few things in the driver that
can be improved and make extending to support other chip families easier.

I've split the preparatory patches in this series and will post the actual
SSD132X support as a separate patch-set once this one is merged.

Best regards,
Javier


Javier Martinez Canillas (5):
  drm/ssd130x: Make default width and height to be controller dependent
  dt-bindings: display: ssd1307fb: Remove default width and height
    values
  drm/ssd130x: Set the page height value in the device info data
  drm/ssd130x: Don't allocate buffers on each plane update
  drm/ssd130x: Remove hardcoded bits-per-pixel in ssd130x_buf_alloc()

 .../bindings/display/solomon,ssd1307fb.yaml   |   8 +-
 drivers/gpu/drm/solomon/ssd130x.c             | 124 ++++++++++++------
 drivers/gpu/drm/solomon/ssd130x.h             |   6 +
 3 files changed, 93 insertions(+), 45 deletions(-)

-- 
2.40.1
Re: [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
Posted by Thomas Zimmermann 2 years, 8 months ago
Hi Javierm,

I've read through the patches and they look correct to me.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

But I had one question about the page size. You round up to multiples of 
page_size in several places. That could lead to an out-of-bounds access. 
Do you need to allocate GEM buffers to be multiples of page_size as well?

Best regards
Thomas

Am 05.06.23 um 09:47 schrieb Javier Martinez Canillas:
> Hello,
> 
> While working on adding support for the SSD132X family of 4-bit grayscale
> Solomon OLED panel controllers, I noticed a few things in the driver that
> can be improved and make extending to support other chip families easier.
> 
> I've split the preparatory patches in this series and will post the actual
> SSD132X support as a separate patch-set once this one is merged.
> 
> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (5):
>    drm/ssd130x: Make default width and height to be controller dependent
>    dt-bindings: display: ssd1307fb: Remove default width and height
>      values
>    drm/ssd130x: Set the page height value in the device info data
>    drm/ssd130x: Don't allocate buffers on each plane update
>    drm/ssd130x: Remove hardcoded bits-per-pixel in ssd130x_buf_alloc()
> 
>   .../bindings/display/solomon,ssd1307fb.yaml   |   8 +-
>   drivers/gpu/drm/solomon/ssd130x.c             | 124 ++++++++++++------
>   drivers/gpu/drm/solomon/ssd130x.h             |   6 +
>   3 files changed, 93 insertions(+), 45 deletions(-)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Re: [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
Posted by Javier Martinez Canillas 2 years, 8 months ago
Thomas Zimmermann <tzimmermann@suse.de> writes:

Hello Thomas,

> Hi Javierm,
>
> I've read through the patches and they look correct to me.
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>

Thanks a lot for your review!

> But I had one question about the page size. You round up to multiples of 
> page_size in several places. That could lead to an out-of-bounds access. 
> Do you need to allocate GEM buffers to be multiples of page_size as well?
>

That's a good point and I would need to have a closer look to the driver
to determine if that's needed or not as well. If that's the case though,
the issue is already present in the driver. We could fix it as follow-up.

> Best regards
> Thomas
>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat