Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
From: Konrad Dybcio
Date: Mon Jan 12 2026 - 06:08:19 EST
On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> MDSS and GPU drivers use different approaches to get min_acc length.
> Add helper function that can be used by all the drivers.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> include/linux/soc/qcom/ubwc.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index f052e241736c..50d891493ac8 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> return ret;
> }
>
> +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);
Are you sure this is a correct heuristic?
Konrad