mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
soc: qcom: ubwc: define helper for MDSS and Adreno drivers
Define special helper returning version setting for MDSS and A8xx drivers. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260507-ubwc-rework-v4-3-c19593d20c1d@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
ab7e4d7cf6
commit
b5f7365c44
|
|
@ -100,4 +100,20 @@ 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;
|
||||
}
|
||||
|
||||
#endif /* __QCOM_UBWC_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user