@@ -611,14 +611,12 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
611
611
if (IS_ERR (gpu -> common_ubwc_cfg ))
612
612
return PTR_ERR (gpu -> common_ubwc_cfg );
613
613
614
- gpu -> ubwc_config .min_acc_len = 0 ;
615
614
gpu -> ubwc_config .ubwc_swizzle = 0x6 ;
616
615
gpu -> ubwc_config .macrotile_mode = 0 ;
617
616
gpu -> ubwc_config .highest_bank_bit = 15 ;
618
617
619
618
if (adreno_is_a610 (gpu )) {
620
619
gpu -> ubwc_config .highest_bank_bit = 13 ;
621
- gpu -> ubwc_config .min_acc_len = 1 ;
622
620
gpu -> ubwc_config .ubwc_swizzle = 0x7 ;
623
621
}
624
622
@@ -664,10 +662,8 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
664
662
gpu -> ubwc_config .macrotile_mode = 1 ;
665
663
}
666
664
667
- if (adreno_is_a702 (gpu )) {
665
+ if (adreno_is_a702 (gpu ))
668
666
gpu -> ubwc_config .highest_bank_bit = 14 ;
669
- gpu -> ubwc_config .min_acc_len = 1 ;
670
- }
671
667
672
668
return 0 ;
673
669
}
@@ -687,37 +683,41 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
687
683
u32 level2_swizzling_dis = !(cfg -> ubwc_swizzle & BIT (1 ));
688
684
bool ubwc_mode = qcom_ubwc_get_ubwc_mode (cfg );
689
685
bool amsbc = cfg -> ubwc_enc_version >= UBWC_3_0 ;
686
+ bool min_acc_len_64b = false;
690
687
u8 uavflagprd_inv = 0 ;
691
688
u32 hbb_hi = hbb >> 2 ;
692
689
u32 hbb_lo = hbb & 3 ;
693
690
694
691
if (adreno_is_a650_family (adreno_gpu ) || adreno_is_a7xx (adreno_gpu ))
695
692
uavflagprd_inv = 2 ;
696
693
694
+ if (adreno_is_a610 (adreno_gpu ) || adreno_is_a702 (adreno_gpu ))
695
+ min_acc_len_64b = true;
696
+
697
697
gpu_write (gpu , REG_A6XX_RB_NC_MODE_CNTL ,
698
698
level2_swizzling_dis << 12 |
699
699
rgb565_predicator << 11 |
700
700
hbb_hi << 10 | amsbc << 4 |
701
- adreno_gpu -> ubwc_config . min_acc_len << 3 |
701
+ min_acc_len_64b << 3 |
702
702
hbb_lo << 1 | ubwc_mode );
703
703
704
704
gpu_write (gpu , REG_A6XX_TPL1_NC_MODE_CNTL ,
705
705
level2_swizzling_dis << 6 | hbb_hi << 4 |
706
- adreno_gpu -> ubwc_config . min_acc_len << 3 |
706
+ min_acc_len_64b << 3 |
707
707
hbb_lo << 1 | ubwc_mode );
708
708
709
709
gpu_write (gpu , REG_A6XX_SP_NC_MODE_CNTL ,
710
710
level2_swizzling_dis << 12 | hbb_hi << 10 |
711
711
uavflagprd_inv << 4 |
712
- adreno_gpu -> ubwc_config . min_acc_len << 3 |
712
+ min_acc_len_64b << 3 |
713
713
hbb_lo << 1 | ubwc_mode );
714
714
715
715
if (adreno_is_a7xx (adreno_gpu ))
716
716
gpu_write (gpu , REG_A7XX_GRAS_NC_MODE_CNTL ,
717
717
FIELD_PREP (GENMASK (8 , 5 ), hbb_lo ));
718
718
719
719
gpu_write (gpu , REG_A6XX_UCHE_MODE_CNTL ,
720
- adreno_gpu -> ubwc_config . min_acc_len << 23 | hbb_lo << 21 );
720
+ min_acc_len_64b << 23 | hbb_lo << 21 );
721
721
722
722
gpu_write (gpu , REG_A6XX_RBBM_NC_MODE_CNTL ,
723
723
adreno_gpu -> ubwc_config .macrotile_mode );
0 commit comments