diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2019-07-19 18:59:15 +0300 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2019-07-23 16:49:39 +0300 |
commit | cc431212710860143b13877a0aa9d11a42598f49 (patch) | |
tree | 7cbf6a32656c1411c3f9ec59ebc972d2896abe74 /include/drm/tinydrm/mipi-dbi.h | |
parent | 1321db837549a0ff9dc2c95ff76c46770f7f02a1 (diff) | |
download | linux-cc431212710860143b13877a0aa9d11a42598f49.tar.xz |
drm/tinydrm/mipi-dbi: Add mipi_dbi_init_with_formats()
The MIPI DBI standard support more pixel formats than what this helper
supports. Add an init function that lets the driver use different
format(s). This avoids open coding mipi_dbi_init() in st7586.
st7586 sets preferred_depth but this is not necessary since it only
supports one format.
v2: Forgot to remove the mipi->rotation assignment in st7586,
mipi_dbi_init_with_formats() handles it.
Cc: David Lechner <david@lechnology.com>
Acked-by: David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190719155916.62465-11-noralf@tronnes.org
Diffstat (limited to 'include/drm/tinydrm/mipi-dbi.h')
-rw-r--r-- | include/drm/tinydrm/mipi-dbi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h index 35a1413f2122..c4b04789bf84 100644 --- a/include/drm/tinydrm/mipi-dbi.h +++ b/include/drm/tinydrm/mipi-dbi.h @@ -69,6 +69,11 @@ static inline struct mipi_dbi *drm_to_mipi_dbi(struct drm_device *drm) int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi, struct gpio_desc *dc); +int mipi_dbi_init_with_formats(struct mipi_dbi *mipi, + const struct drm_simple_display_pipe_funcs *funcs, + const uint32_t *formats, unsigned int format_count, + const struct drm_display_mode *mode, + unsigned int rotation, size_t tx_buf_size); int mipi_dbi_init(struct mipi_dbi *mipi, const struct drm_simple_display_pipe_funcs *funcs, const struct drm_display_mode *mode, unsigned int rotation); |