drm/format-helper: Move destination-buffer handling into internal helper
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 8 Aug 2022 12:54:05 +0000 (14:54 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 10 Aug 2022 07:18:56 +0000 (09:18 +0200)
commitf241b064426943a1591c9e9121a175d5ed1edb42
treec8d2c489aab569edbdec1e786b00788e56f373dd
parentb3aca563d69bcbb49343196b4265a8cb7db91bfa
drm/format-helper: Move destination-buffer handling into internal helper

The format-convertion helpers handle several cases for different
values of destination buffer and pitch. Move that code into the
internal helper drm_fb_xfrm() and avoid quite a bit of duplication.

v2:
* remove a duplicated blank line (Jose)
* use drm_format_info_bpp() (Sam)
  * fix vaddr_cached_hint bug (Sam)
* add TODO on vaddr location (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-14-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c