Hi Rob,

Le jeudi 05 novembre 2026 à 13:07 -0800, Rob Clark a écrit :
> On the v4l2 side, I'm not sure.  But it is also not clear to me if the
> viddec hw (iris) supports all four combinations of P010/TP10 vs
> linear/UBWC.  I guess there is already some fourcc translation needed
> between v4l2 and drm, so maybe it is ok to stick with QC10C on the
> v4l2 side?

Commenting on this aspect specially, and Dmitry is really going in the right
direction, V4L2_PIX_FMT_QC08C and 4L2_PIX_FMT_QC10C was under specified, and so
the implementation didn't have anything to be verified against. Just describing
what the format is and what kind of alignment is needed is a great start. The
stride is not being used in practice by the importers (gpu and display), and I
think we can turn that to our advantage.

What I lately ask, is to just directly document for V4L2 users which
fourcc+modifier should this v4l2 format map to. How many planes are expected to
be exposed, etc. When I naively asked, I thought the answer would have been
unique and well known, but we uncovered issues. This comes from a simple task,
that we must do for every V4L2 format in GStreamer, which is to map the
format/modifier pair to its DRM format, as GStreamer negotiate DMABuf with DRM
formats these days. Whatever we tried, either failed to import in the GPU, or
failed in the display controller, due to interoperability issue, miss-
interpretation.

On your proposal, I'd like to highlight that NV12/TP10 usage is quite broken
(though its fine if we have to live with that for backward compat, we'll code
the exception).

We commonly deduce the number of planes (or I should say the number of strides
and offsets needed) from the base format. These two have 2 planes, but the new
doc states QC compressed has one plane. Same discussion happened with Arm and
Amlogic Frame Buffer Compression. They both are single plane, and for that
reason DRM_FORMAT_YUV420_8BIT and DRM_FORMAT_YUV420_10BIT got introduced. These
don't have a linear representation, they reflect the depth, the subsampling and
are specified as single plane (single stride). The stride in AFBC is still
allowed, to avoid forcing the width to be a padded width. The importers should
walk backward the stride to find the padded width. QC compressed importer
currently ignores the stride completely, so you have to have the padded width.

hope this helps,
Nicolas

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to