Skip to content

Commit c59e9c9

Browse files
quic-kdybcioRob Clark
authored andcommitted
drm/msm/a6xx: Replace '2' with BIT(1) in level2_swizzling_dis calc
ubwc_swizzle is a bitmask. Check for a bit to make it more obvious. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Konrad Dybcio <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/660973/ Signed-off-by: Rob Clark <[email protected]>
1 parent 87cfc79 commit c59e9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,12 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
687687
*/
688688
BUG_ON(adreno_gpu->ubwc_config.highest_bank_bit < 13);
689689
u32 hbb = adreno_gpu->ubwc_config.highest_bank_bit - 13;
690+
u32 level2_swizzling_dis = !(cfg->ubwc_swizzle & BIT(1));
690691
bool ubwc_mode = qcom_ubwc_get_ubwc_mode(cfg);
691692
bool amsbc = cfg->ubwc_enc_version >= UBWC_3_0;
692693
u8 uavflagprd_inv = 0;
693694
u32 hbb_hi = hbb >> 2;
694695
u32 hbb_lo = hbb & 3;
695-
u32 level2_swizzling_dis = !(adreno_gpu->ubwc_config.ubwc_swizzle & 2);
696696

697697
if (adreno_is_a650_family(adreno_gpu) || adreno_is_a7xx(adreno_gpu))
698698
uavflagprd_inv = 2;

0 commit comments

Comments
 (0)