Files
linux/drivers/gpu/drm/tests
Javier Martinez Canillas 3e853b9f89 drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts
There are DRM fourcc formats that have pixels smaller than a byte, but the
conversion_buf_size() function assumes that pixels are a multiple of bytes
and use the struct drm_format_info .cpp field to calculate the dst_pitch.

Instead, calculate it by using the bits per pixel (bpp) and divide it by 8
to account for formats that have sub-byte pixels.

Signed-off-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Arthur Grillo <[email protected]>
Reviewed-by: Maíra Canal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-03-10 12:40:56 +01:00
..
2023-01-31 12:23:23 +01:00