diff options
author | Javier Martinez Canillas <javierm@redhat.com> | 2023-03-07 22:50:39 +0100 |
---|---|---|
committer | Javier Martinez Canillas <javierm@redhat.com> | 2023-03-10 12:40:56 +0100 |
commit | 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9 (patch) | |
tree | dc3cc12dbe01d9e1a71a91942cb1d86ec793537f /include/linux/platform_data/pcf857x.h | |
parent | 96c25b03145aaa0d2900cebf0349f13a689b01ce (diff) | |
download | lwn-3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9.tar.gz lwn-3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9.zip |
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 <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
Diffstat (limited to 'include/linux/platform_data/pcf857x.h')
0 files changed, 0 insertions, 0 deletions