]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/ssd130x: Replace .page_height field in device info with a constant
authorJavier Martinez Canillas <javierm@redhat.com>
Sat, 14 Oct 2023 07:15:03 +0000 (09:15 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 18 Oct 2023 07:53:25 +0000 (09:53 +0200)
commitec5dceb8180f0cb110dc7029d55d6a83d0583015
treed6c5c1979829f39815ab404afab92aeccd64f17f
parentf7749a549b4f4db0c02e6b3d3800ea400dd76c12
drm/ssd130x: Replace .page_height field in device info with a constant

This deemed useful to avoid hardcoding a page height and allow to support
other Solomon controller families, but dividing the screen in pages seems
to be something that is specific to the SSD130x chip family.

For example, SSD132x chip family divides the screen in segments (columns)
and common outputs (rows), so the concept of screen pages does not exist
for the SSD132x family.

Let's drop this field from the device info struct and just use a constant
SSD130X_PAGE_HEIGHT macro to define the page height. While being there,
replace hardcoded 8 values in places where it is used as the page height.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231014071520.1342189-2-javierm@redhat.com
drivers/gpu/drm/solomon/ssd130x.c
drivers/gpu/drm/solomon/ssd130x.h