Commit d6e766e3 authored by Bjorn Andersson's avatar Bjorn Andersson
Browse files

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.
parents 07b97123 b2571ef8
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -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__ */