diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-12-02 13:56:41 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-12-05 13:36:33 +0100 |
commit | b5f636e63b807fdeba5d61260e5f6b24f6834f69 (patch) | |
tree | d3f71b506e0b09c78a36e3f975337880d37b3ec6 /include/drm | |
parent | 63aa5ec6cf2f332ec4ef08a03f4f39895f82b2b9 (diff) | |
download | lwn-b5f636e63b807fdeba5d61260e5f6b24f6834f69.tar.gz lwn-b5f636e63b807fdeba5d61260e5f6b24f6834f69.zip |
drm/mipi-dbi: Prepare framebuffer copy operation in pipe-update helpers
Move the vmap/vunmap blocks from the inner fb_dirty helpers into the
MIPI DBI update helpers. The function calls can result in waiting and/or
processing overhead. Reduce the penalties by executing the functions once
in the outer-most function of the pipe update.
This change also prepares for MIPI DBI for shadow-plane helpers. With
shadow-plane helpers, transfer source buffers are mapped into kernel
address space automatically.
v2:
* keep each driver's existing buffer-mapping patter (Noralf)
* zero-initialize iosys_map arrays (Noralf)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Noralf Trønnes <noralf@tronnes.org> # drm/tiny/mi0283qt
Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-6-tzimmermann@suse.de
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_mipi_dbi.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 8c4ea7956d61..36ac8495566b 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -13,9 +13,10 @@ #include <drm/drm_simple_kms_helper.h> struct drm_rect; -struct spi_device; struct gpio_desc; +struct iosys_map; struct regulator; +struct spi_device; /** * struct mipi_dbi - MIPI DBI interface @@ -176,8 +177,9 @@ int mipi_dbi_command_read(struct mipi_dbi *dbi, u8 cmd, u8 *val); int mipi_dbi_command_buf(struct mipi_dbi *dbi, u8 cmd, u8 *data, size_t len); int mipi_dbi_command_stackbuf(struct mipi_dbi *dbi, u8 cmd, const u8 *data, size_t len); -int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, +int mipi_dbi_buf_copy(void *dst, struct iosys_map *src, struct drm_framebuffer *fb, struct drm_rect *clip, bool swap); + /** * mipi_dbi_command - MIPI DCS command with optional parameter(s) * @dbi: MIPI DBI structure |