OSDN Git Service

drm/format-helper: Use drm_format_info_min_pitch() in tests helper
authorJavier Martinez Canillas <javierm@redhat.com>
Thu, 16 Mar 2023 22:34:04 +0000 (23:34 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Fri, 17 Mar 2023 15:59:54 +0000 (16:59 +0100)
commit705c870179ae57815d15a9e783442f22030d3a7d
treef0b92d00904780a8bd17ffca0c17179e18f26f09
parent06bc8c80cba8347c3f459d276cfbd75ea0bbb6d1
drm/format-helper: Use drm_format_info_min_pitch() in tests helper

There's a nice macro to calculate the destination pitch that already takes
into account sub-byte pixel formats. Use that instead of open coding it.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316223404.102806-1-javierm@redhat.com
drivers/gpu/drm/tests/drm_format_helper_test.c