summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Andersson <andersson@kernel.org>2026-05-20 05:30:01 +0300
committerBjorn Andersson <andersson@kernel.org>2026-05-20 05:30:01 +0300
commit51c40718887dd8aff8ea146c79577d4d4104a7fe (patch)
treed6cc78109a2246e4a828044457f1bece96d7b3e7 /include/linux
parentb0bc160c311a0e7163c00a7e66116d28ce9771df (diff)
parentc5e3f2a3abcb925f0364df09abfd759ff0590454 (diff)
downloadlinux-51c40718887dd8aff8ea146c79577d4d4104a7fe.tar.xz
Merge branch '20260507-ubwc-rework-v4-4-c19593d20c1d@oss.qualcomm.com' into drivers-for-7.2
Merge the initial set of UBWC rework through a topic branch, to allow it being shared with the DRM/MSM branch for the continuation.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/soc/qcom/ubwc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index f5d0e2341261..83d2c2a7116c 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -50,6 +50,7 @@ struct qcom_ubwc_cfg_data {
#define UBWC_1_0 0x10000000
#define UBWC_2_0 0x20000000
#define UBWC_3_0 0x30000000
+#define UBWC_3_1 0x30010000 /* UBWC 3.0 + Macrotile mode */
#define UBWC_4_0 0x40000000
#define UBWC_4_3 0x40030000
#define UBWC_5_0 0x50000000
@@ -99,4 +100,25 @@ static inline u32 qcom_ubwc_swizzle(const struct qcom_ubwc_cfg_data *cfg)
return cfg->ubwc_swizzle;
}
+static inline u32 qcom_ubwc_version_tag(const struct qcom_ubwc_cfg_data *cfg)
+{
+ if (cfg->ubwc_enc_version >= UBWC_6_0)
+ return 5;
+ if (cfg->ubwc_enc_version >= UBWC_5_0)
+ return 4;
+ if (cfg->ubwc_enc_version >= UBWC_4_3)
+ return 3;
+ if (cfg->ubwc_enc_version >= UBWC_4_0)
+ return 2;
+ if (cfg->ubwc_enc_version >= UBWC_3_0)
+ return 1;
+
+ return 0;
+}
+
+static inline bool qcom_ubwc_enable_amsbc(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->ubwc_enc_version >= UBWC_3_0;
+}
+
#endif /* __QCOM_UBWC_H__ */