@@ -612,7 +612,6 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
612612 return PTR_ERR (gpu -> common_ubwc_cfg );
613613
614614 gpu -> ubwc_config .rgb565_predicator = 0 ;
615- gpu -> ubwc_config .uavflagprd_inv = 0 ;
616615 gpu -> ubwc_config .min_acc_len = 0 ;
617616 gpu -> ubwc_config .ubwc_swizzle = 0x6 ;
618617 gpu -> ubwc_config .macrotile_mode = 0 ;
@@ -634,15 +633,12 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
634633 if (adreno_is_a619_holi (gpu ))
635634 gpu -> ubwc_config .highest_bank_bit = 13 ;
636635
637- if (adreno_is_a621 (gpu )) {
636+ if (adreno_is_a621 (gpu ))
638637 gpu -> ubwc_config .highest_bank_bit = 13 ;
639- gpu -> ubwc_config .uavflagprd_inv = 2 ;
640- }
641638
642639 if (adreno_is_a623 (gpu )) {
643640 gpu -> ubwc_config .highest_bank_bit = 16 ;
644641 gpu -> ubwc_config .rgb565_predicator = 1 ;
645- gpu -> ubwc_config .uavflagprd_inv = 2 ;
646642 gpu -> ubwc_config .macrotile_mode = 1 ;
647643 }
648644
@@ -657,21 +653,18 @@ static int a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
657653 /* TODO: get ddr type from bootloader and use 2 for LPDDR4 */
658654 gpu -> ubwc_config .highest_bank_bit = 16 ;
659655 gpu -> ubwc_config .rgb565_predicator = 1 ;
660- gpu -> ubwc_config .uavflagprd_inv = 2 ;
661656 gpu -> ubwc_config .macrotile_mode = 1 ;
662657 }
663658
664659 if (adreno_is_a663 (gpu )) {
665660 gpu -> ubwc_config .highest_bank_bit = 13 ;
666661 gpu -> ubwc_config .rgb565_predicator = 1 ;
667- gpu -> ubwc_config .uavflagprd_inv = 2 ;
668662 gpu -> ubwc_config .macrotile_mode = 1 ;
669663 gpu -> ubwc_config .ubwc_swizzle = 0x4 ;
670664 }
671665
672666 if (adreno_is_7c3 (gpu )) {
673667 gpu -> ubwc_config .highest_bank_bit = 14 ;
674- gpu -> ubwc_config .uavflagprd_inv = 2 ;
675668 gpu -> ubwc_config .macrotile_mode = 1 ;
676669 }
677670
@@ -695,11 +688,15 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
695688 BUG_ON (adreno_gpu -> ubwc_config .highest_bank_bit < 13 );
696689 u32 hbb = adreno_gpu -> ubwc_config .highest_bank_bit - 13 ;
697690 bool amsbc = cfg -> ubwc_enc_version >= UBWC_3_0 ;
691+ u8 uavflagprd_inv = 0 ;
698692 u32 hbb_hi = hbb >> 2 ;
699693 u32 hbb_lo = hbb & 3 ;
700694 u32 ubwc_mode = adreno_gpu -> ubwc_config .ubwc_swizzle & 1 ;
701695 u32 level2_swizzling_dis = !(adreno_gpu -> ubwc_config .ubwc_swizzle & 2 );
702696
697+ if (adreno_is_a650_family (adreno_gpu ) || adreno_is_a7xx (adreno_gpu ))
698+ uavflagprd_inv = 2 ;
699+
703700 gpu_write (gpu , REG_A6XX_RB_NC_MODE_CNTL ,
704701 level2_swizzling_dis << 12 |
705702 adreno_gpu -> ubwc_config .rgb565_predicator << 11 |
@@ -714,7 +711,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
714711
715712 gpu_write (gpu , REG_A6XX_SP_NC_MODE_CNTL ,
716713 level2_swizzling_dis << 12 | hbb_hi << 10 |
717- adreno_gpu -> ubwc_config . uavflagprd_inv << 4 |
714+ uavflagprd_inv << 4 |
718715 adreno_gpu -> ubwc_config .min_acc_len << 3 |
719716 hbb_lo << 1 | ubwc_mode );
720717
0 commit comments