summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Andersson <andersson@kernel.org>2026-03-30 12:45:07 -0500
committerBjorn Andersson <andersson@kernel.org>2026-03-30 12:46:14 -0500
commitd6e766e391ef0b2be62682e007223fc72ba7764f (patch)
tree78a2de057dca7b67b5e46c3f1a16b556c4127f70 /include/linux
parent07b9712339e3ce1d183adef996c0f317adc9848d (diff)
parentb2571ef8d4ec9bb636889a9132090bcc3449792e (diff)
Merge branch '20260125-iris-ubwc-v4-1-1ff30644ac81@oss.qualcomm.com' into drivers-for-7.1
Merge the new helpers in UBWC driver through a topic branch, to allow them to be shared with display and video branches as well.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/soc/qcom/ubwc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index f052e241736c..f5d0e2341261 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -74,4 +74,29 @@ 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);
+}
+
+static inline bool qcom_ubwc_macrotile_mode(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->macrotile_mode;
+}
+
+static inline bool qcom_ubwc_bank_spread(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->ubwc_bank_spread;
+}
+
+static inline u32 qcom_ubwc_swizzle(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->ubwc_swizzle;
+}
+
#endif /* __QCOM_UBWC_H__ */