On 3/6/26 5:47 PM, Dmitry Baryshkov wrote: > Sort out the remaining UBWC swizzle values, using flags to control > whether level 2 and level 3 swizzling are enabled or not. > > Signed-off-by: Dmitry Baryshkov <[email protected]> > ---
[...] > @@ -101,11 +96,16 @@ static inline u32 qcom_ubwc_swizzle(const struct > qcom_ubwc_cfg_data *cfg) > UBWC_SWIZZLE_ENABLE_LVL2 | > UBWC_SWIZZLE_ENABLE_LVL3; > > - if (cfg->ubwc_enc_version < UBWC_4_0) > - return UBWC_SWIZZLE_ENABLE_LVL2 | > - UBWC_SWIZZLE_ENABLE_LVL3; > + u32 ubwc_swizzle = UBWC_SWIZZLE_ENABLE_LVL2 | > + UBWC_SWIZZLE_ENABLE_LVL3; > + > + if (cfg->flags & UBWC_FLAG_DISABLE_SWIZZLE_LVL2) > + ubwc_swizzle &= ~UBWC_SWIZZLE_ENABLE_LVL2; > + > + if (cfg->flags & UBWC_FLAG_DISABLE_SWIZZLE_LVL3) > + ubwc_swizzle &= ~UBWC_SWIZZLE_ENABLE_LVL3; > > - return cfg->ubwc_swizzle; > + return ubwc_swizzle; This is a little messy, but so is the valid configuration matrix.. Reviewed-by: Konrad Dybcio <[email protected]> Konrad
