13
13
*/
14
14
#pragma GCC diagnostic push
15
15
#pragma GCC diagnostic ignored "-Wunused-variable"
16
+ #pragma GCC diagnostic ignored "-Wunused-const-variable"
16
17
17
18
#include "adreno_gen7_0_0_snapshot.h"
18
19
#include "adreno_gen7_2_0_snapshot.h"
20
+ #include "adreno_gen7_9_0_snapshot.h"
19
21
20
22
#pragma GCC diagnostic pop
21
23
@@ -384,21 +386,29 @@ static void a7xx_get_debugbus_blocks(struct msm_gpu *gpu,
384
386
struct a6xx_gpu_state * a6xx_state )
385
387
{
386
388
struct adreno_gpu * adreno_gpu = to_adreno_gpu (gpu );
387
- int debugbus_blocks_count , total_debugbus_blocks ;
388
- const u32 * debugbus_blocks ;
389
+ int debugbus_blocks_count , gbif_debugbus_blocks_count , total_debugbus_blocks ;
390
+ const u32 * debugbus_blocks , * gbif_debugbus_blocks ;
389
391
int i ;
390
392
391
393
if (adreno_is_a730 (adreno_gpu )) {
392
394
debugbus_blocks = gen7_0_0_debugbus_blocks ;
393
395
debugbus_blocks_count = ARRAY_SIZE (gen7_0_0_debugbus_blocks );
394
- } else {
395
- BUG_ON (!adreno_is_a740_family (adreno_gpu ));
396
+ gbif_debugbus_blocks = a7xx_gbif_debugbus_blocks ;
397
+ gbif_debugbus_blocks_count = ARRAY_SIZE (a7xx_gbif_debugbus_blocks );
398
+ } else if (adreno_is_a740_family (adreno_gpu )) {
396
399
debugbus_blocks = gen7_2_0_debugbus_blocks ;
397
400
debugbus_blocks_count = ARRAY_SIZE (gen7_2_0_debugbus_blocks );
401
+ gbif_debugbus_blocks = a7xx_gbif_debugbus_blocks ;
402
+ gbif_debugbus_blocks_count = ARRAY_SIZE (a7xx_gbif_debugbus_blocks );
403
+ } else {
404
+ BUG_ON (!adreno_is_a750 (adreno_gpu ));
405
+ debugbus_blocks = gen7_9_0_debugbus_blocks ;
406
+ debugbus_blocks_count = ARRAY_SIZE (gen7_9_0_debugbus_blocks );
407
+ gbif_debugbus_blocks = gen7_9_0_gbif_debugbus_blocks ;
408
+ gbif_debugbus_blocks_count = ARRAY_SIZE (gen7_9_0_gbif_debugbus_blocks );
398
409
}
399
410
400
- total_debugbus_blocks = debugbus_blocks_count +
401
- ARRAY_SIZE (a7xx_gbif_debugbus_blocks );
411
+ total_debugbus_blocks = debugbus_blocks_count + gbif_debugbus_blocks_count ;
402
412
403
413
a6xx_state -> debugbus = state_kcalloc (a6xx_state , total_debugbus_blocks ,
404
414
sizeof (* a6xx_state -> debugbus ));
@@ -410,9 +420,9 @@ static void a7xx_get_debugbus_blocks(struct msm_gpu *gpu,
410
420
& a6xx_state -> debugbus [i ]);
411
421
}
412
422
413
- for (i = 0 ; i < ARRAY_SIZE ( a7xx_gbif_debugbus_blocks ) ; i ++ ) {
423
+ for (i = 0 ; i < gbif_debugbus_blocks_count ; i ++ ) {
414
424
a6xx_get_debugbus_block (gpu ,
415
- a6xx_state , & a7xx_debugbus_blocks [a7xx_gbif_debugbus_blocks [i ]],
425
+ a6xx_state , & a7xx_debugbus_blocks [gbif_debugbus_blocks [i ]],
416
426
& a6xx_state -> debugbus [i + debugbus_blocks_count ]);
417
427
}
418
428
}
@@ -813,10 +823,13 @@ static void a7xx_get_clusters(struct msm_gpu *gpu,
813
823
if (adreno_is_a730 (adreno_gpu )) {
814
824
clusters = gen7_0_0_clusters ;
815
825
clusters_size = ARRAY_SIZE (gen7_0_0_clusters );
816
- } else {
817
- BUG_ON (!adreno_is_a740_family (adreno_gpu ));
826
+ } else if (adreno_is_a740_family (adreno_gpu )) {
818
827
clusters = gen7_2_0_clusters ;
819
828
clusters_size = ARRAY_SIZE (gen7_2_0_clusters );
829
+ } else {
830
+ BUG_ON (!adreno_is_a750 (adreno_gpu ));
831
+ clusters = gen7_9_0_clusters ;
832
+ clusters_size = ARRAY_SIZE (gen7_9_0_clusters );
820
833
}
821
834
822
835
a6xx_state -> clusters = state_kcalloc (a6xx_state ,
@@ -948,10 +961,13 @@ static void a7xx_get_shaders(struct msm_gpu *gpu,
948
961
if (adreno_is_a730 (adreno_gpu )) {
949
962
shader_blocks = gen7_0_0_shader_blocks ;
950
963
num_shader_blocks = ARRAY_SIZE (gen7_0_0_shader_blocks );
951
- } else {
952
- BUG_ON (!adreno_is_a740_family (adreno_gpu ));
964
+ } else if (adreno_is_a740_family (adreno_gpu )) {
953
965
shader_blocks = gen7_2_0_shader_blocks ;
954
966
num_shader_blocks = ARRAY_SIZE (gen7_2_0_shader_blocks );
967
+ } else {
968
+ BUG_ON (!adreno_is_a750 (adreno_gpu ));
969
+ shader_blocks = gen7_9_0_shader_blocks ;
970
+ num_shader_blocks = ARRAY_SIZE (gen7_9_0_shader_blocks );
955
971
}
956
972
957
973
a6xx_state -> shaders = state_kcalloc (a6xx_state ,
@@ -1337,10 +1353,13 @@ static void a7xx_get_registers(struct msm_gpu *gpu,
1337
1353
if (adreno_is_a730 (adreno_gpu )) {
1338
1354
reglist = gen7_0_0_reg_list ;
1339
1355
pre_crashdumper_regs = gen7_0_0_pre_crashdumper_gpu_registers ;
1340
- } else {
1341
- BUG_ON (!adreno_is_a740_family (adreno_gpu ));
1356
+ } else if (adreno_is_a740_family (adreno_gpu )) {
1342
1357
reglist = gen7_2_0_reg_list ;
1343
1358
pre_crashdumper_regs = gen7_0_0_pre_crashdumper_gpu_registers ;
1359
+ } else {
1360
+ BUG_ON (!adreno_is_a750 (adreno_gpu ));
1361
+ reglist = gen7_9_0_reg_list ;
1362
+ pre_crashdumper_regs = gen7_9_0_pre_crashdumper_gpu_registers ;
1344
1363
}
1345
1364
1346
1365
count = A7XX_PRE_CRASHDUMPER_SIZE + A7XX_POST_CRASHDUMPER_SIZE ;
@@ -1388,7 +1407,8 @@ static void a7xx_get_post_crashdumper_registers(struct msm_gpu *gpu,
1388
1407
struct adreno_gpu * adreno_gpu = to_adreno_gpu (gpu );
1389
1408
const u32 * regs ;
1390
1409
1391
- BUG_ON (!(adreno_is_a730 (adreno_gpu ) || adreno_is_a740_family (adreno_gpu )));
1410
+ BUG_ON (!(adreno_is_a730 (adreno_gpu ) || adreno_is_a740_family (adreno_gpu ) ||
1411
+ adreno_is_a750 (adreno_gpu )));
1392
1412
regs = gen7_0_0_post_crashdumper_registers ;
1393
1413
1394
1414
a7xx_get_ahb_gpu_registers (gpu ,
@@ -1491,10 +1511,18 @@ static void a7xx_get_indexed_registers(struct msm_gpu *gpu,
1491
1511
struct a6xx_gpu_state * a6xx_state )
1492
1512
{
1493
1513
struct adreno_gpu * adreno_gpu = to_adreno_gpu (gpu );
1514
+ const struct a6xx_indexed_registers * indexed_regs ;
1494
1515
int i , indexed_count , mempool_count ;
1495
1516
1496
- BUG_ON (!(adreno_is_a730 (adreno_gpu ) || adreno_is_a740_family (adreno_gpu )));
1497
- indexed_count = ARRAY_SIZE (a7xx_indexed_reglist );
1517
+ if (adreno_is_a730 (adreno_gpu ) || adreno_is_a740_family (adreno_gpu )) {
1518
+ indexed_regs = a7xx_indexed_reglist ;
1519
+ indexed_count = ARRAY_SIZE (a7xx_indexed_reglist );
1520
+ } else {
1521
+ BUG_ON (!adreno_is_a750 (adreno_gpu ));
1522
+ indexed_regs = gen7_9_0_cp_indexed_reg_list ;
1523
+ indexed_count = ARRAY_SIZE (gen7_9_0_cp_indexed_reg_list );
1524
+ }
1525
+
1498
1526
mempool_count = ARRAY_SIZE (a7xx_cp_bv_mempool_indexed );
1499
1527
1500
1528
a6xx_state -> indexed_regs = state_kcalloc (a6xx_state ,
@@ -1507,7 +1535,7 @@ static void a7xx_get_indexed_registers(struct msm_gpu *gpu,
1507
1535
1508
1536
/* First read the common regs */
1509
1537
for (i = 0 ; i < indexed_count ; i ++ )
1510
- a6xx_get_indexed_regs (gpu , a6xx_state , & a7xx_indexed_reglist [i ],
1538
+ a6xx_get_indexed_regs (gpu , a6xx_state , & indexed_regs [i ],
1511
1539
& a6xx_state -> indexed_regs [i ]);
1512
1540
1513
1541
gpu_rmw (gpu , REG_A6XX_CP_CHICKEN_DBG , 0 , BIT (2 ));
0 commit comments