From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Bryan O'Donoghue <bod@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jordan Crouse <jordan@cosmicpenguin.net>,
linux-media@vger.kernel.org,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Robert Mader <robert.mader@collabora.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: [PATCH v2 0/8] drm/msm, media: define the UBWC buffer layout
Date: Fri, 06 Nov 2026 15:44:06 +0200 [thread overview]
Message-ID: <20261106-ubwc-format-docs-v2-0-82949f88f030@oss.qualcomm.com> (raw)
The layout of UBWC buffers (DRM_FORMAT_MOD_QCOM_COMPRESSED, V4L2 QC08C
and QC10C) has never been written down. The V4L2 formats are documented
as opaque with four or eight planes, the DRM modifier as "macrotiles".
In practice the video decoders, the GPU and the display controller
exchange these buffers, so each side has to reverse-engineer the layout
from the other drivers. Nicolas Dufresne asked for a contract to know
what the V4L2 plugins have to compute when passing decoded frames to
DRM.
Note that patch 2 changes what P010 with DRM_FORMAT_MOD_QCOM_COMPRESSED
means: it used to be set up for P030 (TP10).
Mesa 26.3-rc rounds the NV12 chroma size down for odd sizes; that is
being fixed on the Mesa side, before the layout reaches a release.
Tested by decoding a clip and scanning the frame out with the layout
documented here: QC08C as NV12 on RB5 (Iris), QC10C as P030 on RB3
(Venus) and on RB3 Gen2 (Iris, gen2 firmware). Each frame is identical
to the same frame decoded to linear NV12 or P010. Compressed P010 was
tested on RB3 Gen2 with a frame written by turnip, with P010 support
that is not merged yet.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v2:
- Described the compressed 10-bit format, P030 (TP10), as P030 instead
of P010, compressed only, as the SSPP can't fetch linear P030; gave
P010 a UBWC entry with 16-bit samples (Sashiko, Robert, Rob)
- Documented P030 next to the 16-bit P010 for QCOM_COMPRESSED, mapped
QC10C to P030
- Explained how the meaning of compressed P010 changed and why
- Venus: dropped DRM import as the reason for the stride fix
- Link to v1: https://patch.msgid.link/20261104-ubwc-format-docs-v1-0-389044012b4e@oss.qualcomm.com
---
Dmitry Baryshkov (8):
drm/msm/dpu: fix the comment on the RGB UBWC plane count
drm/msm: separate compressed P010 and P030 (TP10)
drm/msm: move the UBWC plane size calculation out of DPU
drm/msm: check UBWC framebuffers against their layout
drm/fourcc: describe the Qualcomm UBWC layout
media: docs: pixfmt-reserved: describe the QC08C and QC10C layout
media: venus: report the QC10C data stride
media: qcom: iris: describe QC10C as P030 (TP10)
.../userspace-api/media/v4l/pixfmt-reserved.rst | 64 ++++++++++--
drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 84 +--------------
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 +-
drivers/gpu/drm/msm/disp/mdp_format.c | 113 ++++++++++++++++++++-
drivers/gpu/drm/msm/msm_drv.h | 3 +
drivers/gpu/drm/msm/msm_fb.c | 39 ++++++-
drivers/media/platform/qcom/iris/iris_buffer.c | 2 +-
drivers/media/platform/qcom/venus/vdec.c | 5 +-
include/uapi/drm/drm_fourcc.h | 64 ++++++++++--
10 files changed, 271 insertions(+), 108 deletions(-)
---
base-commit: f1ac44c32cba88ad65dcecd4a279661d14e93651
change-id: 20261027-ubwc-format-docs-7942079e1472
Best regards,
--
With best wishes
Dmitry
next reply other threads:[~2026-11-06 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 13:44 Dmitry Baryshkov [this message]
2026-11-06 13:44 ` [PATCH v2 1/8] drm/msm/dpu: fix the comment on the RGB UBWC plane count Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 2/8] drm/msm: separate compressed P010 and P030 (TP10) Dmitry Baryshkov
2026-11-06 14:37 ` Rob Clark
2026-11-06 13:44 ` [PATCH v2 3/8] drm/msm: move the UBWC plane size calculation out of DPU Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 4/8] drm/msm: check UBWC framebuffers against their layout Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 5/8] drm/fourcc: describe the Qualcomm UBWC layout Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 6/8] media: docs: pixfmt-reserved: describe the QC08C and QC10C layout Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 7/8] media: venus: report the QC10C data stride Dmitry Baryshkov
2026-11-06 13:44 ` [PATCH v2 8/8] media: qcom: iris: describe QC10C as P030 (TP10) Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261106-ubwc-format-docs-v2-0-82949f88f030@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=jordan@cosmicpenguin.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.dufresne@collabora.com \
--cc=robert.mader@collabora.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=vikash.garodia@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®