drm/format-helper: Rework format-helper conversion functions
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 10 Nov 2021 10:36:57 +0000 (11:36 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 11 Nov 2021 11:06:57 +0000 (12:06 +0100)
commit53bc2098d2b6ccff25fe13f9345cbb5c0ef34a99
tree6668ca8103f12c475c26a4fba1ad5c5b564078ab
parent3e3543c8a19cade02cefde83ee97233d5d90e7e5
drm/format-helper: Rework format-helper conversion functions

Move destination-buffer clipping from all format-helper conversion
functions into callers. Support destination-buffer pitch. Only
distinguish between system and I/O memory, but use same logic
everywhere.

Simply harmonize the interface and semantics of the existing code.
Not all conversion helpers support all combinations of parameters.
We have to add additional features when we need them.

v2:
* fix default destination pitch in drm_fb_xrgb8888_to_gray8()
  (Noralf)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211110103702.374-5-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/drm_mipi_dbi.c
drivers/gpu/drm/gud/gud_pipe.c
drivers/gpu/drm/tiny/cirrus.c
drivers/gpu/drm/tiny/repaper.c
drivers/gpu/drm/tiny/st7586.c
include/drm/drm_format_helper.h