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 2/8] drm/msm: separate compressed P010 and P030 (TP10)
Date: Fri, 06 Nov 2026 15:44:08 +0200 [thread overview]
Message-ID: <20261106-ubwc-format-docs-v2-2-82949f88f030@oss.qualcomm.com> (raw)
In-Reply-To: <20261106-ubwc-format-docs-v2-0-82949f88f030@oss.qualcomm.com>
The UBWC entry for DRM_FORMAT_P010 is set up for P030 (TP10), three
10-bit samples in each 32-bit word, the layout the video decoders
produce for QC10C. It doesn't match P010: compressed P010, as the GPU
writes it, keeps 16-bit samples and is scanned out as garbage.
Use DRM_FORMAT_P030 for that entry, compressed only, as the SSPP can't
fetch linear P030, and give P010 its own UBWC entry with 16-bit samples.
This changes what compressed P010 means. Nothing is known to depend on
the old meaning: Mesa and minigbm never allocate it, the vendor stack
uses its own modifier bits, and the only user found is a draft
GStreamer merge request.
Fixes: f07c9946cc1a ("drm/msm/dpu: Add support for P010 format")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
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 | 13 +++++++++----
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 107150a8553f..f755c0d57abe 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -173,6 +173,7 @@ static const uint32_t plane_formats_yuv[] = {
DRM_FORMAT_BGRX4444,
DRM_FORMAT_P010,
+ DRM_FORMAT_P030,
DRM_FORMAT_NV12,
DRM_FORMAT_NV21,
DRM_FORMAT_NV16,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 1a471cdf767b..09146023d13e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -68,6 +68,7 @@ static const uint32_t qcom_compressed_supported_formats[] = {
DRM_FORMAT_NV12,
DRM_FORMAT_P010,
+ DRM_FORMAT_P030,
};
/*
@@ -1779,8 +1780,9 @@ static bool dpu_plane_format_mod_supported(struct drm_plane *plane,
struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane);
bool has_no_ubwc = (dpu_kms->mdss->ubwc_enc_version == 0);
+ /* the SSPP can only fetch P030 compressed */
if (modifier == DRM_FORMAT_MOD_LINEAR)
- return true;
+ return format != DRM_FORMAT_P030;
if (modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED && !has_no_ubwc)
return dpu_find_format(format, qcom_compressed_supported_formats,
diff --git a/drivers/gpu/drm/msm/disp/mdp_format.c b/drivers/gpu/drm/msm/disp/mdp_format.c
index 33da569eae5e..2712a73e5783 100644
--- a/drivers/gpu/drm/msm/disp/mdp_format.c
+++ b/drivers/gpu/drm/msm/disp/mdp_format.c
@@ -298,8 +298,7 @@ static struct csc_cfg csc_convert[CSC_MAX] = {
.unpack_count = 2, \
.bpp = 2, \
.fetch_mode = MDP_FETCH_UBWC, \
- .flags = MSM_FORMAT_FLAG_UNPACK_TIGHT | \
- MSM_FORMAT_FLAG_YUV | \
+ .flags = MSM_FORMAT_FLAG_YUV | \
MSM_FORMAT_FLAG_COMPRESSED | flg, \
.num_planes = 4, \
.tile_height = th \
@@ -606,13 +605,19 @@ static const struct msm_format mdp_formats_ubwc[] = {
PSEUDO_YUV_FMT_TILED(NV12,
BPC8, BPC8, BPC8,
C1_B_Cb, C2_R_Cr,
- CHROMA_420, 0,
+ CHROMA_420, MSM_FORMAT_FLAG_UNPACK_TIGHT,
MDP_TILE_HEIGHT_NV12),
+ PSEUDO_YUV_FMT_TILED(P030,
+ BPC8, BPC8, BPC8,
+ C1_B_Cb, C2_R_Cr,
+ CHROMA_420, MSM_FORMAT_FLAG_UNPACK_TIGHT | MSM_FORMAT_FLAG_DX,
+ MDP_TILE_HEIGHT_UBWC),
+
PSEUDO_YUV_FMT_TILED(P010,
BPC8, BPC8, BPC8,
C1_B_Cb, C2_R_Cr,
- CHROMA_420, MSM_FORMAT_FLAG_DX,
+ CHROMA_420, MSM_FORMAT_FLAG_UNPACK_ALIGN_MSB | MSM_FORMAT_FLAG_DX,
MDP_TILE_HEIGHT_UBWC),
};
--
2.47.3
next prev parent 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 [PATCH v2 0/8] drm/msm, media: define the UBWC buffer layout Dmitry Baryshkov
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 ` Dmitry Baryshkov [this message]
2026-11-06 14:37 ` [PATCH v2 2/8] drm/msm: separate compressed P010 and P030 (TP10) 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-2-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®