Hey, thanks for the feedback.
On 14.08.25 11:57, Daniel Stone wrote:
Hi Rob,
On Wed, 13 Aug 2025 at 18:06, Robert Mader <robert.ma...@collabora.com> wrote:
+ switch (format) {
+ case DRM_FORMAT_YVU420:
+ case DRM_FORMAT_YVU422:
+ case DRM_FORMAT_YVU444:
+ case DRM_FORMAT_NV21:
+ case DRM_FORMAT_NV61:
+ case DRM_FORMAT_NV42:
I wonder if this could use a drm_format_info field for chroma order,
instead of open-coding a list here?
Generally agree, however note that this is directly copied from
`get_conversion_matrix_to_argb_u16()`. So this is not a new pattern in
this file - and there are several other drivers with comparable ones,
see e.g. `has_uv_swapped()` in rockchip_drm_vop.c. So while a new field
drm_format_info would make for a nice cleanup, I'd argue that would be
better suited in a dedicated series.
What IMO would make sense here is introduce a `has_uv_swapped()` helper,
so we at least don't repeat ourselves. Will do that in v2 - does that
work for you?
Cheers,
Daniel
--
Robert Mader
Consultant Software Developer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718