@@ -414,7 +414,17 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
414
414
a6xx_set_hwcg (gpu , true);
415
415
416
416
/* VBIF/GBIF start*/
417
- gpu_write (gpu , REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL , 0x3 );
417
+ if (adreno_is_a640 (adreno_gpu ) || adreno_is_a650 (adreno_gpu )) {
418
+ gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE0 , 0x00071620 );
419
+ gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE1 , 0x00071620 );
420
+ gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE2 , 0x00071620 );
421
+ gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE3 , 0x00071620 );
422
+ gpu_write (gpu , REG_A6XX_GBIF_QSB_SIDE3 , 0x00071620 );
423
+ gpu_write (gpu , REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL , 0x3 );
424
+ } else {
425
+ gpu_write (gpu , REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL , 0x3 );
426
+ }
427
+
418
428
if (adreno_is_a630 (adreno_gpu ))
419
429
gpu_write (gpu , REG_A6XX_VBIF_GATE_OFF_WRREQ_EN , 0x00000009 );
420
430
@@ -429,25 +439,35 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
429
439
gpu_write (gpu , REG_A6XX_UCHE_WRITE_THRU_BASE_LO , 0xfffff000 );
430
440
gpu_write (gpu , REG_A6XX_UCHE_WRITE_THRU_BASE_HI , 0x0001ffff );
431
441
432
- /* Set the GMEM VA range [0x100000:0x100000 + gpu->gmem - 1] */
433
- gpu_write64 (gpu , REG_A6XX_UCHE_GMEM_RANGE_MIN_LO ,
434
- REG_A6XX_UCHE_GMEM_RANGE_MIN_HI , 0x00100000 );
442
+ if (!adreno_is_a650 (adreno_gpu )) {
443
+ /* Set the GMEM VA range [0x100000:0x100000 + gpu->gmem - 1] */
444
+ gpu_write64 (gpu , REG_A6XX_UCHE_GMEM_RANGE_MIN_LO ,
445
+ REG_A6XX_UCHE_GMEM_RANGE_MIN_HI , 0x00100000 );
435
446
436
- gpu_write64 (gpu , REG_A6XX_UCHE_GMEM_RANGE_MAX_LO ,
437
- REG_A6XX_UCHE_GMEM_RANGE_MAX_HI ,
438
- 0x00100000 + adreno_gpu -> gmem - 1 );
447
+ gpu_write64 (gpu , REG_A6XX_UCHE_GMEM_RANGE_MAX_LO ,
448
+ REG_A6XX_UCHE_GMEM_RANGE_MAX_HI ,
449
+ 0x00100000 + adreno_gpu -> gmem - 1 );
450
+ }
439
451
440
452
gpu_write (gpu , REG_A6XX_UCHE_FILTER_CNTL , 0x804 );
441
453
gpu_write (gpu , REG_A6XX_UCHE_CACHE_WAYS , 0x4 );
442
454
443
- gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x010000c0 );
455
+ if (adreno_is_a640 (adreno_gpu ) || adreno_is_a650 (adreno_gpu ))
456
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x02000140 );
457
+ else
458
+ gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_2 , 0x010000c0 );
444
459
gpu_write (gpu , REG_A6XX_CP_ROQ_THRESHOLDS_1 , 0x8040362c );
445
460
446
461
/* Setting the mem pool size */
447
462
gpu_write (gpu , REG_A6XX_CP_MEM_POOL_SIZE , 128 );
448
463
449
464
/* Setting the primFifo thresholds default values */
450
- gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , (0x300 << 11 ));
465
+ if (adreno_is_a650 (adreno_gpu ))
466
+ gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00300000 );
467
+ else if (adreno_is_a640 (adreno_gpu ))
468
+ gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , 0x00200000 );
469
+ else
470
+ gpu_write (gpu , REG_A6XX_PC_DBG_ECO_CNTL , (0x300 << 11 ));
451
471
452
472
/* Set the AHB default slave response to "ERROR" */
453
473
gpu_write (gpu , REG_A6XX_CP_AHB_CNTL , 0x1 );
@@ -471,6 +491,19 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
471
491
472
492
gpu_write (gpu , REG_A6XX_UCHE_CLIENT_PF , 1 );
473
493
494
+ /* Set weights for bicubic filtering */
495
+ if (adreno_is_a650 (adreno_gpu )) {
496
+ gpu_write (gpu , REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_0 , 0 );
497
+ gpu_write (gpu , REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_1 ,
498
+ 0x3fe05ff4 );
499
+ gpu_write (gpu , REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_2 ,
500
+ 0x3fa0ebee );
501
+ gpu_write (gpu , REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_3 ,
502
+ 0x3f5193ed );
503
+ gpu_write (gpu , REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_4 ,
504
+ 0x3f0243f0 );
505
+ }
506
+
474
507
/* Protect registers from the CP */
475
508
gpu_write (gpu , REG_A6XX_CP_PROTECT_CNTL , 0x00000003 );
476
509
@@ -508,6 +541,11 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
508
541
A6XX_PROTECT_RDONLY (0x980 , 0x4 ));
509
542
gpu_write (gpu , REG_A6XX_CP_PROTECT (25 ), A6XX_PROTECT_RW (0xa630 , 0x0 ));
510
543
544
+ if (adreno_is_a650 (adreno_gpu )) {
545
+ gpu_write (gpu , REG_A6XX_CP_APRIV_CNTL ,
546
+ (1 << 6 ) | (1 << 5 ) | (1 << 3 ) | (1 << 2 ) | (1 << 1 ));
547
+ }
548
+
511
549
/* Enable interrupts */
512
550
gpu_write (gpu , REG_A6XX_RBBM_INT_0_MASK , A6XX_INT_MASK );
513
551
0 commit comments