Messages in this thread | | | From | Javier Martinez Canillas <> | Subject | Re: [PATCH v2] drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts | Date | Thu, 16 Mar 2023 23:29:59 +0100 |
| |
Geert Uytterhoeven <geert@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
| |