@@ -458,33 +458,6 @@ int amdgpu_mes_reg_write_reg_wait(struct amdgpu_device *adev,
458
458
return r ;
459
459
}
460
460
461
- int amdgpu_mes_reg_wait (struct amdgpu_device * adev , uint32_t reg ,
462
- uint32_t val , uint32_t mask )
463
- {
464
- struct mes_misc_op_input op_input ;
465
- int r ;
466
-
467
- op_input .op = MES_MISC_OP_WRM_REG_WAIT ;
468
- op_input .wrm_reg .reg0 = reg ;
469
- op_input .wrm_reg .ref = val ;
470
- op_input .wrm_reg .mask = mask ;
471
-
472
- if (!adev -> mes .funcs -> misc_op ) {
473
- dev_err (adev -> dev , "mes reg wait is not supported!\n" );
474
- r = - EINVAL ;
475
- goto error ;
476
- }
477
-
478
- amdgpu_mes_lock (& adev -> mes );
479
- r = adev -> mes .funcs -> misc_op (& adev -> mes , & op_input );
480
- amdgpu_mes_unlock (& adev -> mes );
481
- if (r )
482
- dev_err (adev -> dev , "failed to reg_write_reg_wait\n" );
483
-
484
- error :
485
- return r ;
486
- }
487
-
488
461
int amdgpu_mes_set_shader_debugger (struct amdgpu_device * adev ,
489
462
uint64_t process_context_addr ,
490
463
uint32_t spi_gdbg_per_vmid_cntl ,
@@ -553,42 +526,6 @@ int amdgpu_mes_flush_shader_debugger(struct amdgpu_device *adev,
553
526
return r ;
554
527
}
555
528
556
- #define DEFINE_AMDGPU_MES_CTX_GET_OFFS_ENG (_eng ) \
557
- do { \
558
- if (id_offs < AMDGPU_MES_CTX_MAX_OFFS) \
559
- return offsetof(struct amdgpu_mes_ctx_meta_data, \
560
- _eng[ring->idx].slots[id_offs]); \
561
- else if (id_offs == AMDGPU_MES_CTX_RING_OFFS) \
562
- return offsetof(struct amdgpu_mes_ctx_meta_data, \
563
- _eng[ring->idx].ring); \
564
- else if (id_offs == AMDGPU_MES_CTX_IB_OFFS) \
565
- return offsetof(struct amdgpu_mes_ctx_meta_data, \
566
- _eng[ring->idx].ib); \
567
- else if (id_offs == AMDGPU_MES_CTX_PADDING_OFFS) \
568
- return offsetof(struct amdgpu_mes_ctx_meta_data, \
569
- _eng[ring->idx].padding); \
570
- } while(0)
571
-
572
- int amdgpu_mes_ctx_get_offs (struct amdgpu_ring * ring , unsigned int id_offs )
573
- {
574
- switch (ring -> funcs -> type ) {
575
- case AMDGPU_RING_TYPE_GFX :
576
- DEFINE_AMDGPU_MES_CTX_GET_OFFS_ENG (gfx );
577
- break ;
578
- case AMDGPU_RING_TYPE_COMPUTE :
579
- DEFINE_AMDGPU_MES_CTX_GET_OFFS_ENG (compute );
580
- break ;
581
- case AMDGPU_RING_TYPE_SDMA :
582
- DEFINE_AMDGPU_MES_CTX_GET_OFFS_ENG (sdma );
583
- break ;
584
- default :
585
- break ;
586
- }
587
-
588
- WARN_ON (1 );
589
- return - EINVAL ;
590
- }
591
-
592
529
uint32_t amdgpu_mes_get_aggregated_doorbell_index (struct amdgpu_device * adev ,
593
530
enum amdgpu_mes_priority_level prio )
594
531
{
0 commit comments