OSDN Git Service

drm/ssd130x: Make default width and height to be controller dependent
authorJavier Martinez Canillas <javierm@redhat.com>
Fri, 9 Jun 2023 17:09:36 +0000 (19:09 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 15 Jun 2023 21:50:41 +0000 (23:50 +0200)
commitf1f288d07afb46517e377deb8d20f187f51b00b2
tree251def94341a2ad97f35acfc759859ef5221f12f
parentc2807ecb529004ea6f2c2be823c495dc8491e205
drm/ssd130x: Make default width and height to be controller dependent

Currently the driver hardcodes the default values to 96x16 pixels but this
default resolution depends on the controller. The datasheets for the chips
describes the following display controller resolutions:

 - SH1106:  132 x 64 Dot Matrix OLED/PLED
 - SSD1305: 132 x 64 Dot Matrix OLED/PLED
 - SSD1306: 128 x 64 Dot Matrix OLED/PLED
 - SSD1307: 128 x 39 Dot Matrix OLED/PLED
 - SSD1309: 128 x 64 Dot Matrix OLED/PLED

Add this information to the devices' info structures, and use it set as a
default if not defined in DT rather than hardcoding to an arbitrary value.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230609170941.1150941-2-javierm@redhat.com
drivers/gpu/drm/solomon/ssd130x.c
drivers/gpu/drm/solomon/ssd130x.h