[PATCH v2] drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts
Javier Martinez Canillas
javierm at redhat.com
Thu Mar 16 22:29:59 UTC 2023
Geert Uytterhoeven <geert at linux-m68k.org> writes:
Hello Geert,
[...]
>> + if (!dst_pitch) {
>> + bpp = drm_format_info_bpp(dst_fi, 0);
>> + dst_pitch = DIV_ROUND_UP(drm_rect_width(clip) * bpp, 8);
>
> I know I'm a bit late to the party, but here's actually a helper for that:
>
> dst_pitch = drm_format_info_min_pitch(info, 0, drm_rect_width(clip));
>
Nice, I didn't notice this. I'll send a follow-up patch. Thanks!
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
More information about the dri-devel
mailing list