[PATCH v3 04/27] soc: qcom: ubwc: add helper controlling AMSBC enablement

Dmitry Baryshkov
2026-03-12T13:29:40Z

Adreno and MDSS drivers need to know whether to enable AMSBC. Add
separate helper, describing that feature.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
include/linux/soc/qcom/ubwc.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index 8355ffe40f88..83d2c2a7116c 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -116,4 +116,9 @@ static inline u32 qcom_ubwc_version_tag(const struct qcom_ubwc_cfg_data *cfg)
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__ */

--
2.47.3