From 98823f379447ad7691d427151e6f9c8761416052 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 15 Jan 2020 13:45:47 +0100 Subject: [PATCH] drm: tiny: st7735r: Prepare for adding support for more displays Currently the st7735r driver supports only a single display panel. Prepare for adding support for other display panels by factoring out the display-specific parameters in struct st7735r_cfg. For now, the following parameters can be configured: - Display resolution, - Horizontal/vertical display offsets, - Read-write versus read-only controllers, - RGB versus BGR color component ordering. Rename jd_t18003_t01_pipe_enable() and jd_t18003_t01_pipe_funcs() to st7735r_pipe_enable() resp. st7735r_pipe_funcs(), as they are not really specific to the Jianda JD-T18003-T01 display anymore. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200115124548.3951-5-geert+renesas@glider.be --- drivers/gpu/drm/tiny/st7735r.c | 67 +++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index 3f4487c..a838f23 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -3,6 +3,7 @@ * DRM driver for Sitronix ST7735R panels * * Copyright 2017 David Lechner + * Copyright (C) 2019 Glider bvba */ #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include #include