lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts
Date
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

\
 
 \ /
  Last update: 2023-03-27 01:04    [W:0.171 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site