From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
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>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-media@vger.kernel.org,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: [PATCH v2 02/11] soc: qcom: ubwc: add helper to get min_acc length
Date: Tue, 13 Jan 2026 18:57:17 +0200 [thread overview]
Message-ID: <20260113-iris-ubwc-v2-2-4346a6ef07a9@oss.qualcomm.com> (raw)
In-Reply-To: <20260113-iris-ubwc-v2-0-4346a6ef07a9@oss.qualcomm.com>
MDSS and GPU drivers use different approaches to get min_acc length.
Add helper function that can be used by all the drivers.
The helper reflects our current best guess, it blindly copies the
approach adopted by the MDSS drivers and it matches current values
selected by the GPU driver.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
include/linux/soc/qcom/ubwc.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index f052e241736c..5bdeca18d54d 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -74,4 +74,14 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
return ret;
}
+/*
+ * This is the best guess, based on the MDSS driver, which worked so far.
+ */
+static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->ubwc_enc_version == UBWC_1_0 &&
+ (cfg->ubwc_dec_version == UBWC_2_0 ||
+ cfg->ubwc_dec_version == UBWC_3_0);
+}
+
#endif /* __QCOM_UBWC_H__ */
--
2.47.3
next prev parent reply other threads:[~2026-01-13 16:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 16:57 [PATCH v2 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
2026-01-13 16:57 ` [PATCH v2 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
2026-01-13 16:57 ` Dmitry Baryshkov [this message]
2026-01-14 7:21 ` [PATCH v2 02/11] soc: qcom: ubwc: add helper to get min_acc length Dikshita Agarwal
2026-01-14 9:37 ` Konrad Dybcio
2026-01-13 16:57 ` [PATCH v2 03/11] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
2026-01-14 7:12 ` Dikshita Agarwal
2026-01-14 9:38 ` Konrad Dybcio
2026-01-13 16:57 ` [PATCH v2 04/11] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
2026-01-14 7:25 ` Dikshita Agarwal
2026-01-14 9:39 ` Konrad Dybcio
2026-01-13 16:57 ` [PATCH v2 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
2026-01-14 7:26 ` Dikshita Agarwal
2026-01-13 16:57 ` [PATCH v2 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
2026-01-14 7:27 ` Dikshita Agarwal
2026-01-13 16:57 ` [PATCH v2 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
2026-01-14 7:28 ` Dikshita Agarwal
2026-01-13 16:57 ` [PATCH v2 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
2026-01-14 7:28 ` Dikshita Agarwal
2026-01-13 16:57 ` [PATCH v2 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
2026-01-14 7:35 ` Dikshita Agarwal
2026-01-13 16:57 ` [PATCH v2 10/11] drm/msm/mdss: use new helper to set min_acc length Dmitry Baryshkov
2026-01-13 16:57 ` [PATCH v2 11/11] drm/msm/a6xx: " 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=20260113-iris-ubwc-v2-2-4346a6ef07a9@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=mchehab@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--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®