drm/fourcc: Add drm_format_info_bpp() helper
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 8 Jul 2022 18:20:46 +0000 (20:20 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 9 Jul 2022 12:59:22 +0000 (14:59 +0200)
commit96dc635d5538055cb6ccd7b6e9290dfcfc385f97
tree3999cbd2b819bbed8bccd2bb5c5e5c024962ea10
parent79abca2b399009eb8d12c652d0f0f7a9c7a06289
drm/fourcc: Add drm_format_info_bpp() helper

Add a helper to retrieve the actual number of bits per pixel for a
plane, taking into account the number of characters and pixels per
block for tiled formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1cae5ebc28513ec1c91c66b00647ce3ca23bfba7.1657294931.git.geert@linux-m68k.org
drivers/gpu/drm/drm_fourcc.c
include/drm/drm_fourcc.h