@@ -252,6 +252,56 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
252
252
a6xx_flush (gpu , ring );
253
253
}
254
254
255
+ const struct adreno_reglist a612_hwcg [] = {
256
+ {REG_A6XX_RBBM_CLOCK_CNTL_SP0 , 0x22222222 },
257
+ {REG_A6XX_RBBM_CLOCK_CNTL2_SP0 , 0x02222220 },
258
+ {REG_A6XX_RBBM_CLOCK_DELAY_SP0 , 0x00000081 },
259
+ {REG_A6XX_RBBM_CLOCK_HYST_SP0 , 0x0000f3cf },
260
+ {REG_A6XX_RBBM_CLOCK_CNTL_TP0 , 0x22222222 },
261
+ {REG_A6XX_RBBM_CLOCK_CNTL2_TP0 , 0x22222222 },
262
+ {REG_A6XX_RBBM_CLOCK_CNTL3_TP0 , 0x22222222 },
263
+ {REG_A6XX_RBBM_CLOCK_CNTL4_TP0 , 0x00022222 },
264
+ {REG_A6XX_RBBM_CLOCK_DELAY_TP0 , 0x11111111 },
265
+ {REG_A6XX_RBBM_CLOCK_DELAY2_TP0 , 0x11111111 },
266
+ {REG_A6XX_RBBM_CLOCK_DELAY3_TP0 , 0x11111111 },
267
+ {REG_A6XX_RBBM_CLOCK_DELAY4_TP0 , 0x00011111 },
268
+ {REG_A6XX_RBBM_CLOCK_HYST_TP0 , 0x77777777 },
269
+ {REG_A6XX_RBBM_CLOCK_HYST2_TP0 , 0x77777777 },
270
+ {REG_A6XX_RBBM_CLOCK_HYST3_TP0 , 0x77777777 },
271
+ {REG_A6XX_RBBM_CLOCK_HYST4_TP0 , 0x00077777 },
272
+ {REG_A6XX_RBBM_CLOCK_CNTL_RB0 , 0x22222222 },
273
+ {REG_A6XX_RBBM_CLOCK_CNTL2_RB0 , 0x01202222 },
274
+ {REG_A6XX_RBBM_CLOCK_CNTL_CCU0 , 0x00002220 },
275
+ {REG_A6XX_RBBM_CLOCK_HYST_RB_CCU0 , 0x00040f00 },
276
+ {REG_A6XX_RBBM_CLOCK_CNTL_RAC , 0x05522022 },
277
+ {REG_A6XX_RBBM_CLOCK_CNTL2_RAC , 0x00005555 },
278
+ {REG_A6XX_RBBM_CLOCK_DELAY_RAC , 0x00000011 },
279
+ {REG_A6XX_RBBM_CLOCK_HYST_RAC , 0x00445044 },
280
+ {REG_A6XX_RBBM_CLOCK_CNTL_TSE_RAS_RBBM , 0x04222222 },
281
+ {REG_A6XX_RBBM_CLOCK_MODE_VFD , 0x00002222 },
282
+ {REG_A6XX_RBBM_CLOCK_MODE_GPC , 0x02222222 },
283
+ {REG_A6XX_RBBM_CLOCK_DELAY_HLSQ_2 , 0x00000002 },
284
+ {REG_A6XX_RBBM_CLOCK_MODE_HLSQ , 0x00002222 },
285
+ {REG_A6XX_RBBM_CLOCK_DELAY_TSE_RAS_RBBM , 0x00004000 },
286
+ {REG_A6XX_RBBM_CLOCK_DELAY_VFD , 0x00002222 },
287
+ {REG_A6XX_RBBM_CLOCK_DELAY_GPC , 0x00000200 },
288
+ {REG_A6XX_RBBM_CLOCK_DELAY_HLSQ , 0x00000000 },
289
+ {REG_A6XX_RBBM_CLOCK_HYST_TSE_RAS_RBBM , 0x00000000 },
290
+ {REG_A6XX_RBBM_CLOCK_HYST_VFD , 0x00000000 },
291
+ {REG_A6XX_RBBM_CLOCK_HYST_GPC , 0x04104004 },
292
+ {REG_A6XX_RBBM_CLOCK_HYST_HLSQ , 0x00000000 },
293
+ {REG_A6XX_RBBM_CLOCK_CNTL_UCHE , 0x22222222 },
294
+ {REG_A6XX_RBBM_CLOCK_HYST_UCHE , 0x00000004 },
295
+ {REG_A6XX_RBBM_CLOCK_DELAY_UCHE , 0x00000002 },
296
+ {REG_A6XX_RBBM_ISDB_CNT , 0x00000182 },
297
+ {REG_A6XX_RBBM_RAC_THRESHOLD_CNT , 0x00000000 },
298
+ {REG_A6XX_RBBM_SP_HYST_CNT , 0x00000000 },
299
+ {REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX , 0x00000222 },
300
+ {REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX , 0x00000111 },
301
+ {REG_A6XX_RBBM_CLOCK_HYST_GMU_GX , 0x00000555 },
302
+ {},
303
+ };
304
+
255
305
/* For a615 family (a615, a616, a618 and a619) */
256
306
const struct adreno_reglist a615_hwcg [] = {
257
307
{REG_A6XX_RBBM_CLOCK_CNTL_SP0 , 0x02222222 },
@@ -659,6 +709,8 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
659
709
660
710
if (adreno_is_a630 (adreno_gpu ))
661
711
clock_cntl_on = 0x8aa8aa02 ;
712
+ else if (adreno_is_a610 (adreno_gpu ))
713
+ clock_cntl_on = 0xaaa8aa82 ;
662
714
else
663
715
clock_cntl_on = 0x8aa8aa82 ;
664
716
@@ -669,13 +721,15 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
669
721
return ;
670
722
671
723
/* Disable SP clock before programming HWCG registers */
672
- gmu_rmw (gmu , REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL , 1 , 0 );
724
+ if (!adreno_is_a610 (adreno_gpu ))
725
+ gmu_rmw (gmu , REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL , 1 , 0 );
673
726
674
727
for (i = 0 ; (reg = & adreno_gpu -> info -> hwcg [i ], reg -> offset ); i ++ )
675
728
gpu_write (gpu , reg -> offset , state ? reg -> value : 0 );
676
729
677
730
/* Enable SP clock */
678
- gmu_rmw (gmu , REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL , 0 , 1 );
731
+ if (!adreno_is_a610 (adreno_gpu ))
732
+ gmu_rmw (gmu , REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL , 0 , 1 );
679
733
680
734
gpu_write (gpu , REG_A6XX_RBBM_CLOCK_CNTL , state ? clock_cntl_on : 0 );
681
735
}
@@ -907,6 +961,13 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
907
961
/* Unknown, introduced with A640/680 */
908
962
u32 amsbc = 0 ;
909
963
964
+ if (adreno_is_a610 (adreno_gpu )) {
965
+ /* HBB = 14 */
966
+ hbb_lo = 1 ;
967
+ min_acc_len = 1 ;
968
+ ubwc_mode = 1 ;
969
+ }
970
+
910
971
/* a618 is using the hw default values */
911
972
if (adreno_is_a618 (adreno_gpu ))
912
973
return ;
@@ -1181,13 +1242,13 @@ static int hw_init(struct msm_gpu *gpu)
1181
1242
a6xx_set_hwcg (gpu , true);
1182
1243
1183
1244
/* VBIF/GBIF start*/
1184
- if (adreno_is_a640_family (adreno_gpu ) ||
1245
+ if (adreno_is_a610 (adreno_gpu ) ||
1246
+ adreno_is_a640_family (adreno_gpu ) ||
1185
1247
adreno_is_a650_family (adreno_gpu )) {
1186
1248
gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE0 , 0x00071620 );
1187
1249
gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE1 , 0x00071620 );
1188
1250
gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE2 , 0x00071620 );
1189
1251
gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE3 , 0x00071620 );
1190
- gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE3 , 0x00071620 );
1191
1252
gpu_write (gpu , REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL , 0x3 );
1192
1253
} else {
1193
1254
gpu_write (gpu , REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL , 0x3 );
@@ -1215,18 +1276,26 @@ static int hw_init(struct msm_gpu *gpu)
1215
1276
gpu_write (gpu , REG_A6XX_UCHE_FILTER_CNTL , 0x804 );
1216
1277
gpu_write (gpu , REG_A6XX_UCHE_CACHE_WAYS , 0x4 );
1217
1278
1218
- if (adreno_is_a640_family (adreno_gpu ) ||
1219
- adreno_is_a650_family (adreno_gpu ))
1279
+ if (adreno_is_a640_family (adreno_gpu ) || adreno_is_a650_family (adreno_gpu )) {
1220
1280
gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x02000140 );
1221
- else
1281
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_1 , 0x8040362c );
1282
+ } else if (adreno_is_a610 (adreno_gpu )) {
1283
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x00800060 );
1284
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_1 , 0x40201b16 );
1285
+ } else {
1222
1286
gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x010000c0 );
1223
- gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_1 , 0x8040362c );
1287
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_1 , 0x8040362c );
1288
+ }
1224
1289
1225
1290
if (adreno_is_a660_family (adreno_gpu ))
1226
1291
gpu_write (gpu , REG_A6XX_CP_LPAC_PROG_FIFO_SIZE , 0x00000020 );
1227
1292
1228
1293
/* Setting the mem pool size */
1229
- gpu_write (gpu , REG_A6XX_CP_MEM_POOL_SIZE , 128 );
1294
+ if (adreno_is_a610 (adreno_gpu )) {
1295
+ gpu_write (gpu , REG_A6XX_CP_MEM_POOL_SIZE , 48 );
1296
+ gpu_write (gpu , REG_A6XX_CP_MEM_POOL_DBG_ADDR , 47 );
1297
+ } else
1298
+ gpu_write (gpu , REG_A6XX_CP_MEM_POOL_SIZE , 128 );
1230
1299
1231
1300
/* Setting the primFifo thresholds default values,
1232
1301
* and vccCacheSkipDis=1 bit (0x200) for A640 and newer
@@ -1237,6 +1306,8 @@ static int hw_init(struct msm_gpu *gpu)
1237
1306
gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00200200 );
1238
1307
else if (adreno_is_a650 (adreno_gpu ) || adreno_is_a660 (adreno_gpu ))
1239
1308
gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00300200 );
1309
+ else if (adreno_is_a610 (adreno_gpu ))
1310
+ gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00080000 );
1240
1311
else
1241
1312
gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00180000 );
1242
1313
@@ -1252,8 +1323,10 @@ static int hw_init(struct msm_gpu *gpu)
1252
1323
a6xx_set_ubwc_config (gpu );
1253
1324
1254
1325
/* Enable fault detection */
1255
- gpu_write (gpu , REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL ,
1256
- (1 << 30 ) | 0x1fffff );
1326
+ if (adreno_is_a610 (adreno_gpu ))
1327
+ gpu_write (gpu , REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL , (1 << 30 ) | 0x3ffff );
1328
+ else
1329
+ gpu_write (gpu , REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL , (1 << 30 ) | 0x1fffff );
1257
1330
1258
1331
gpu_write (gpu , REG_A6XX_UCHE_CLIENT_PF , 1 );
1259
1332
@@ -1813,6 +1886,10 @@ void a6xx_bus_clear_pending_transactions(struct adreno_gpu *adreno_gpu, bool gx_
1813
1886
1814
1887
void a6xx_gpu_sw_reset (struct msm_gpu * gpu , bool assert )
1815
1888
{
1889
+ /* 11nm chips (e.g. ones with A610) have hw issues with the reset line! */
1890
+ if (adreno_is_a610 (to_adreno_gpu (gpu )))
1891
+ return ;
1892
+
1816
1893
gpu_write (gpu , REG_A6XX_RBBM_SW_RESET_CMD , assert );
1817
1894
/* Perform a bogus read and add a brief delay to ensure ordering. */
1818
1895
gpu_read (gpu , REG_A6XX_RBBM_SW_RESET_CMD );
0 commit comments