drm/mipi_dbi: Add support for display offsets

If the resolution of the TFT display is smaller than the maximum
resolution supported by the display controller, the display may be
connected to the driver output arrays with a horizontal and/or vertical
offset, leading to a shifted image.

Add support for specifying these offsets.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200115124548.3951-4-geert+renesas@glider.be
This commit is contained in:
Geert Uytterhoeven
2020-01-15 13:45:46 +01:00
committed by Sam Ravnborg
parent 3a1a6be40b
commit f41a8a6989
2 changed files with 32 additions and 10 deletions

View File

@@ -109,6 +109,18 @@ struct mipi_dbi_dev {
*/
unsigned int rotation;
/**
* @left_offset: Horizontal offset of the display relative to the
* controller's driver array
*/
unsigned int left_offset;
/**
* @top_offset: Vertical offset of the display relative to the
* controller's driver array
*/
unsigned int top_offset;
/**
* @backlight: backlight device (optional)
*/