Skip to content

Commit 68a66a4

Browse files
lumagandersson
authored andcommitted
soc: qcom: ubwc: add helper to get min_acc length
MDSS and GPU drivers use different approaches to get min_acc length. Add helper function that can be used by all the drivers. The helper reflects our current best guess, it blindly copies the approach adopted by the MDSS drivers and it matches current values selected by the GPU driver. Reviewed-by: Bryan O'Donoghue <[email protected]> Acked-by: Bjorn Andersson <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Reviewed-by: Dikshita Agarwal <[email protected]> Tested-by: Wangao Wang <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 6de23f8 commit 68a66a4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

include/linux/soc/qcom/ubwc.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,14 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
7474
return ret;
7575
}
7676

77+
/*
78+
* This is the best guess, based on the MDSS driver, which worked so far.
79+
*/
80+
static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
81+
{
82+
return cfg->ubwc_enc_version == UBWC_1_0 &&
83+
(cfg->ubwc_dec_version == UBWC_2_0 ||
84+
cfg->ubwc_dec_version == UBWC_3_0);
85+
}
86+
7787
#endif /* __QCOM_UBWC_H__ */

0 commit comments

Comments
 (0)