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 <javierm@redhat.com> Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230307215039.346863-1-javierm@redhat.com |
||
|---|---|---|
| .. | ||
| .kunitconfig | ||
| Makefile | ||
| drm_buddy_test.c | ||
| drm_client_modeset_test.c | ||
| drm_cmdline_parser_test.c | ||
| drm_connector_test.c | ||
| drm_damage_helper_test.c | ||
| drm_dp_mst_helper_test.c | ||
| drm_format_helper_test.c | ||
| drm_format_test.c | ||
| drm_framebuffer_test.c | ||
| drm_kunit_helpers.c | ||
| drm_managed_test.c | ||
| drm_mm_test.c | ||
| drm_modes_test.c | ||
| drm_plane_helper_test.c | ||
| drm_probe_helper_test.c | ||
| drm_rect_test.c | ||