drm/amdgpu: add VMHUB to ring association
Subsystems (2)
PATCH 1/8 drm/amdgpu: add VMHUB to ring association
From: Christian König <[email protected]>
Add the info which ring belonging to which VMHUB.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -0
@@ -99,6 +99,7 @@ struct amdgpu_ring_funcs {uint32_t align_mask;u32 nop;bool support_64bit_ptrs; +unsigned vmhub;/* ring read/write ptr handling */ u64 (*get_rptr)(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3 -0
@@ -3456,6 +3456,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_gfx, .get_wptr = gfx_v9_0_ring_get_wptr_gfx, .set_wptr = gfx_v9_0_ring_set_wptr_gfx,
@@ -3500,6 +3501,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute, .set_wptr = gfx_v9_0_ring_set_wptr_compute,
@@ -3529,6 +3531,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute, .set_wptr = gfx_v9_0_ring_set_wptr_compute,
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -0
@@ -1473,6 +1473,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .align_mask = 0xf, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, + .vmhub = AMDGPU_MMHUB, .get_rptr = sdma_v4_0_ring_get_rptr, .get_wptr = sdma_v4_0_ring_get_wptr, .set_wptr = sdma_v4_0_ring_set_wptr,
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +2 -0
@@ -1448,6 +1448,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_ring_vm_funcs = { .align_mask = 0xf, .nop = PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_NO_OP), 0), .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_ring_get_rptr, .get_wptr = uvd_v7_0_ring_get_wptr, .set_wptr = uvd_v7_0_ring_set_wptr,
@@ -1475,6 +1476,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = { .align_mask = 0x3f, .nop = HEVC_ENC_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_enc_ring_get_rptr, .get_wptr = uvd_v7_0_enc_ring_get_wptr, .set_wptr = uvd_v7_0_enc_ring_set_wptr,
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1 -0
@@ -1074,6 +1074,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { .align_mask = 0x3f, .nop = VCE_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = vce_v4_0_ring_get_rptr, .get_wptr = vce_v4_0_ring_get_wptr, .set_wptr = vce_v4_0_ring_set_wptr,
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1491581476-26758-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
PATCH 2/8 drm/amdgpu: drop VMID per ring tracking
From: Christian König <[email protected]>
David suggested this a long time ago, instead of checking each ring just walk over all the VMIDs in reverse LRU order.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 +++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 --- 2 files changed, 3 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3 -14
@@ -463,17 +463,10 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, job->vm_needs_flush = true;/* Check if we can use a VMID already assigned to this VM */ - i = ring->idx; - do { +list_for_each_entry_reverse (id, &adev->vm_manager.ids_lru, list) {struct fence *flushed; - id = vm->ids[i++]; - if (i == AMDGPU_MAX_RINGS) - i = 0; -/* Check all the prerequisites to using this VMID */ - if (!id) - continue;if (amdgpu_vm_had_gpu_reset (adev, id))continue ;
@@ -503,7 +496,6 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, goto error;list_move_tail (&id->list, &adev->vm_manager.ids_lru); - vm->ids[ring->idx] = id; job->vm_id = id - adev->vm_manager.ids; job->vm_needs_flush = false;
@@ -512,7 +504,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,mutex_unlock (&adev->vm_manager.lock);return 0 ; - }while (i != ring->idx); + };/* Still no ID to use? Then use the idle one found earlier */ id = idle;
@@ -532,7 +524,6 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, id->current_gpu_reset_count =atomic_read (&adev->gpu_reset_counter);list_move_tail (&id->list, &adev->vm_manager.ids_lru);atomic64_set (&id->owner, vm->client_id); - vm->ids[ring->idx] = id; job->vm_id = id - adev->vm_manager.ids;trace_amdgpu_vm_grab_id (vm, ring->idx, job);
@@ -2117,10 +2108,8 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm)unsigned ring_instance;struct amdgpu_ring *ring;struct amd_sched_rq *rq; -int i, r; +int r; -for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) - vm->ids[i] =NULL ; vm->va =RB_ROOT ; vm->client_id =atomic64_inc_return (&adev->vm_manager.client_counter);spin_lock_init (&vm->status_lock);
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +0 -3
@@ -114,9 +114,6 @@ struct amdgpu_vm {struct fence *last_dir_update;uint64_t last_eviction_counter; -/* for id and flush management per ring */ -struct amdgpu_vm_id *ids[AMDGPU_MAX_RINGS ]; -/* protecting freed */ spinlock_t freed_lock;
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/8 drm/amdgpu: split VMID management by VMHUB
In reply to a message not in the archiveFrom: Christian König <[email protected]>
This way GFX and MM won't fight for VMIDs any more.
Initially disabled since we need to stop flushing all HUBS at the same time as well.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 82 ++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 15 ++++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +- 10 files changed, 69 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
@@ -1886,7 +1886,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* mutex initialization are all done here so we * can recall function without having locking issues */ -mutex_init (&adev->vm_manager.lock);atomic_set (&adev->irq.ih.lock,0 );mutex_init (&adev->firmware.mutex);mutex_init (&adev->pm.mutex);
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -1
@@ -217,7 +217,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,if (r) {dev_err (adev->dev,"failed to emit fence (%d)\n" , r);if (job && job->vm_id) -amdgpu_vm_reset_id (adev, job->vm_id); +amdgpu_vm_reset_id (adev, ring->funcs->vmhub, + job->vm_id);amdgpu_ring_undo (ring);return r; }
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +50 -32
181 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +10 -5
@@ -146,12 +146,16 @@ struct amdgpu_vm_id {uint32_t oa_size; }; +struct amdgpu_vm_id_manager { +struct mutex lock; +unsigned num_ids; +struct list_head ids_lru; +struct amdgpu_vm_id ids[AMDGPU_NUM_VM ]; +}; +struct amdgpu_vm_manager {/* Handling of VMIDs */ -struct mutex lock; -unsigned num_ids; -struct list_head ids_lru; -struct amdgpu_vm_id ids[AMDGPU_NUM_VM ]; +struct amdgpu_vm_id_manager id_mgr[AMDGPU_MAX_VMHUBS ];/* Handling of VM fences */ u64 fence_context;
@@ -197,7 +201,8 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, struct amdgpu_sync *sync, struct fence *fence, struct amdgpu_job *job);int amdgpu_vm_flush (struct amdgpu_ring *ring,struct amdgpu_job *job); -void amdgpu_vm_reset_id (struct amdgpu_device *adev,unsigned vm_id); +void amdgpu_vm_reset_id (struct amdgpu_device *adev,unsigned vmhub, +unsigned vmid);int amdgpu_vm_update_directories (struct amdgpu_device *adev,struct amdgpu_vm *vm); int amdgpu_vm_clear_freed(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -1935,7 +1935,7 @@ static void gfx_v7_0_gpu_init(struct amdgpu_device *adev) INDEX_STRIDE, 3);mutex_lock (&adev->srbm_mutex); -for (i =0 ; i < adev->vm_manager.num_ids; i++) { +for (i =0 ; i < adev->vm_manager.id_mgr[0 ].num_ids; i++) {if (i ==0 ) sh_mem_base =0 ;else
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
@@ -3890,7 +3890,7 @@ static void gfx_v8_0_gpu_init(struct amdgpu_device *adev) sh_static_mem_cfg =REG_SET_FIELD (sh_static_mem_cfg,SH_STATIC_MEM_CONFIG ,INDEX_STRIDE ,3 );mutex_lock (&adev->srbm_mutex); -for (i =0 ; i < adev->vm_manager.num_ids; i++) { +for (i =0 ; i < adev->vm_manager.id_mgr[0 ].num_ids; i++) {vi_srbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ if (i ==0 ) {
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
@@ -621,7 +621,7 @@ static int gmc_v6_0_vm_init(struct amdgpu_device *adev)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.num_ids =AMDGPU_NUM_OF_VMIDS ; + adev->vm_manager.id_mgr[0 ].num_ids =AMDGPU_NUM_OF_VMIDS ; adev->vm_manager.num_level =1 ;amdgpu_vm_manager_init (adev);
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -1
@@ -746,7 +746,7 @@ static int gmc_v7_0_vm_init(struct amdgpu_device *adev)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.num_ids =AMDGPU_NUM_OF_VMIDS ; + adev->vm_manager.id_mgr[0 ].num_ids =AMDGPU_NUM_OF_VMIDS ; adev->vm_manager.num_level =1 ;amdgpu_vm_manager_init (adev);
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +1 -1
@@ -949,7 +949,7 @@ static int gmc_v8_0_vm_init(struct amdgpu_device *adev)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.num_ids =AMDGPU_NUM_OF_VMIDS ; + adev->vm_manager.id_mgr[0 ].num_ids =AMDGPU_NUM_OF_VMIDS ; adev->vm_manager.num_level =1 ;amdgpu_vm_manager_init (adev);
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -1
@@ -519,7 +519,8 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.num_ids =AMDGPU_NUM_OF_VMIDS ; + adev->vm_manager.id_mgr[AMDGPU_GFXHUB ].num_ids =AMDGPU_NUM_OF_VMIDS ; + adev->vm_manager.id_mgr[AMDGPU_MMHUB ].num_ids =AMDGPU_NUM_OF_VMIDS ;/* TODO: fix num_level for APU when updating vm size and block size */ if (adev->flags &AMD_IS_APU )
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/8 drm/amdgpu: invalidate only the currently needed VMHUB v2
In reply to a message not in the archiveFrom: Christian König <[email protected]>
Drop invalidating both hubs from each engine.
v2: don't use hardcoded values
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 36 +++++------ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 60 +++++++++--------- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 111 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 57 ++++++++--------- 5 files changed, 119 insertions(+), 148 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -2
@@ -406,8 +406,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, struct amdgpu_job *job) {struct amdgpu_device *adev = ring->adev; -/* Temporary use only the first VM manager */ -unsigned vmhub =0 ;/*ring->funcs->vmhub;*/ +unsigned vmhub = ring->funcs->vmhub;struct amdgpu_vm_id_manager *id_mgr = &adev->vm_manager.id_mgr[vmhub];uint64_t fence_context = adev->fence_context + ring->idx;struct fence *updates = sync->last_vm_update;
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +15 -21
@@ -2956,35 +2956,29 @@ static void gfx_v9_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)static void gfx_v9_0_ring_emit_vm_flush (struct amdgpu_ring *ring,unsigned vm_id,uint64_t pd_addr) { +struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];int usepfp = (ring->funcs->type ==AMDGPU_RING_TYPE_GFX );uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id);unsigned eng = ring->idx; -unsigned i; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */ BUG_ON (pd_addr &0xFFFF00000000003EULL ); -for (i =0 ; i <AMDGPU_MAX_VMHUBS ; ++i) { -struct amdgpu_vmhub *hub = &ring->adev->vmhub[i]; - -gfx_v9_0_write_data_to_reg (ring, usepfp, true, - hub->ctx0_ptb_addr_lo32 - + (2 * vm_id), -lower_32_bits (pd_addr)); +gfx_v9_0_write_data_to_reg (ring, usepfp, true, + hub->ctx0_ptb_addr_lo32 + (2 * vm_id), +lower_32_bits (pd_addr)); -gfx_v9_0_write_data_to_reg (ring, usepfp, true, - hub->ctx0_ptb_addr_hi32 - + (2 * vm_id), -upper_32_bits (pd_addr)); +gfx_v9_0_write_data_to_reg (ring, usepfp, true, + hub->ctx0_ptb_addr_hi32 + (2 * vm_id), +upper_32_bits (pd_addr)); -gfx_v9_0_write_data_to_reg (ring, usepfp, true, - hub->vm_inv_eng0_req + eng, req); +gfx_v9_0_write_data_to_reg (ring, usepfp, true, + hub->vm_inv_eng0_req + eng, req); -/* wait for the invalidate to complete */ -gfx_v9_0_wait_reg_mem (ring,0 ,0 ,0 , hub->vm_inv_eng0_ack + - eng,0 ,1 << vm_id,1 << vm_id,0x20 ); - } +/* wait for the invalidate to complete */ +gfx_v9_0_wait_reg_mem (ring,0 ,0 ,0 , hub->vm_inv_eng0_ack + + eng,0 ,1 << vm_id,1 << vm_id,0x20 );/* compute doesn't have PFP */ if (usepfp) {
@@ -3463,7 +3457,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .emit_frame_size = /* totally 242 maximum if 16 IBs */5 +/* COND_EXEC */ 7 +/* PIPELINE_SYNC */ -46 +/* VM_FLUSH */ +24 +/* VM_FLUSH */ 8 +/* FENCE for VM_FLUSH */ 20 +/* GDS switch */ 4 + /* double SWITCH_BUFFER,
@@ -3510,7 +3504,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {7 +/* gfx_v9_0_ring_emit_hdp_flush */ 5 +/* gfx_v9_0_ring_emit_hdp_invalidate */ 7 +/* gfx_v9_0_ring_emit_pipeline_sync */ -64 +/* gfx_v9_0_ring_emit_vm_flush */ +24 +/* gfx_v9_0_ring_emit_vm_flush */ 8 + 8 + 8, /* gfx_v9_0_ring_emit_fence x3 for user fence, vm fence */ .emit_ib_size = 4, /* gfx_v9_0_ring_emit_ib_compute */ .emit_ib = gfx_v9_0_ring_emit_ib_compute,
@@ -3540,7 +3534,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {7 +/* gfx_v9_0_ring_emit_hdp_flush */ 5 +/* gfx_v9_0_ring_emit_hdp_invalidate */ 7 +/* gfx_v9_0_ring_emit_pipeline_sync */ -64 +/* gfx_v9_0_ring_emit_vm_flush */ +24 +/* gfx_v9_0_ring_emit_vm_flush */ 8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */ .emit_ib_size = 4, /* gfx_v9_0_ring_emit_ib_compute */ .emit_ib = gfx_v9_0_ring_emit_ib_compute,
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +28 -32
79 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +50 -61
150 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +25 -32
76 lines not on this page · raw message
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/8 drm/amdgpu: assign VM invalidation engine manually
In reply to a message not in the archiveFrom: Christian König <[email protected]>
For Vega10 we have 18 VM invalidation engines for each VMHUB.
Start to assign them manually to the rings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -0
@@ -179,6 +179,7 @@ struct amdgpu_ring {unsigned cond_exe_offs;u64 cond_exe_gpu_addr;volatile u32 *cond_exe_cpu_addr; +unsigned vm_inv_eng;#if defined(CONFIG_DEBUG_FS )struct dentry *ent;#endif
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -2959,7 +2959,7 @@ static void gfx_v9_0_ring_emit_vm_flush(struct amdgpu_ring *ring,struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];int usepfp = (ring->funcs->type ==AMDGPU_RING_TYPE_GFX );uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +12 -0
@@ -386,6 +386,18 @@ static int gmc_v9_0_early_init(void *handle)static int gmc_v9_0_late_init (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS ] = {0 }; +unsigned i; + +for (i =0 ; i < adev->num_rings; ++i) { +struct amdgpu_ring *ring = adev->rings[i]; +unsigned vmhub = ring->funcs->vmhub; + + ring->vm_inv_eng = vm_inv_eng[vmhub]++; +dev_info (adev->dev,"ring %u uses VM inv eng %u on hub %u\n" , + ring->idx, ring->vm_inv_eng, ring->funcs->vmhub); + } +return amdgpu_irq_get (adev, &adev->mc.vm_fault,0 ); }
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -1041,7 +1041,7 @@ static void sdma_v4_0_ring_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +2 -2
@@ -1037,7 +1037,7 @@ static void uvd_v7_0_ring_emit_vm_flush(struct amdgpu_ring *ring,struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id);uint32_t data0, data1, mask; -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
@@ -1078,7 +1078,7 @@ static void uvd_v7_0_enc_ring_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1 -1
@@ -975,7 +975,7 @@ static void vce_v4_0_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1491581476-26758-5-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Re: [PATCH 5/8] drm/amdgpu: assign VM invalidation engine manually
Quoted 48 lines · Christian König
From: Christian König <[email protected]>
For Vega10 we have 18 VM invalidation engines for each VMHUB.
Start to assign them manually to the rings.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -179,6 +179,7 @@ struct amdgpu_ring {unsigned cond_exe_offs;u64 cond_exe_gpu_addr;volatile u32 *cond_exe_cpu_addr; +unsigned vm_inv_eng;#if defined(CONFIG_DEBUG_FS )struct dentry *ent;#endif drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-1@@ -2959,7 +2959,7 @@ static void gfx_v9_0_ring_emit_vm_flush(struct amdgpu_ring *ring,struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];int usepfp = (ring->funcs->type ==AMDGPU_RING_TYPE_GFX );uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0@@ -386,6 +386,18 @@ static int gmc_v9_0_early_init(void *handle)static int gmc_v9_0_late_init (void *handle)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_early_init(void *handle) · line 396
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +8
-0{struct amdgpu_device *adev = (struct amdgpu_device *)handle; +unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS ] = {0 }; +unsigned i; + +for (i =0 ; i < adev->num_rings; ++i) { +struct amdgpu_ring *ring = adev->rings[i]; +unsigned vmhub = ring->funcs->vmhub; + + ring->vm_inv_eng = vm_inv_eng[vmhub]++;
Should there be a check here to make sure ring->vm_inv_eng does not exceed 18 (GFX9_INV_ENGINE_NUM or similar)?
It holds true that it should never happen for current gfx9 ASICs. But this will be copy pasted into gfxN in the future, and it may not hold true there.
Andres
Quoted 48 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4
-0+dev_info (adev->dev,"ring %u uses VM inv eng %u on hub %u\n" , + ring->idx, ring->vm_inv_eng, ring->funcs->vmhub); + } +return amdgpu_irq_get (adev, &adev->mc.vm_fault,0 ); }drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-1@@ -1041,7 +1041,7 @@ static void sdma_v4_0_ring_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */ drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +2
-2@@ -1037,7 +1037,7 @@ static void uvd_v7_0_ring_emit_vm_flush(struct amdgpu_ring *ring,struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id);uint32_t data0, data1, mask; -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */ @@ -1078,7 +1078,7 @@ static void uvd_v7_0_enc_ring_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c static void vce_v4_0_emit_vm_flush(struct amdgpu_ring *ring, · line 981
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1
-1@@ -975,7 +975,7 @@ static void vce_v4_0_emit_vm_flush(struct amdgpu_ring *ring, {struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];uint32_t req = ring->adev->gart.gart_funcs->get_invalidate_req (vm_id); -unsigned eng = ring->idx; +unsigned eng = ring->vm_inv_eng; pd_addr = pd_addr |0x1 ;/* valid bit */ /* now only use physical base address of PDE and valid */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/8 drm/amdgpu: allow concurrent VM flushes
In reply to a message not in the archiveFrom: Christian König <[email protected]>
Enable concurrent VM flushes for Vega10.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 50 +++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +28 -22
@@ -462,10 +462,11 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, }kfree (fences); - job->vm_needs_flush = true; + job->vm_needs_flush = false;/* Check if we can use a VMID already assigned to this VM */ list_for_each_entry_reverse (id, &id_mgr->ids_lru, list) {struct fence *flushed; +bool needs_flush = false;/* Check all the prerequisites to using this VMID */ if (amdgpu_vm_had_gpu_reset (adev, id))
@@ -477,16 +478,17 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,if (job->vm_pd_addr != id->pd_gpu_addr)continue ; -if (!id->last_flush) -continue ; - -if (id->last_flush->context != fence_context && - !fence_is_signaled (id->last_flush)) -continue ; +if (!id->last_flush || + (id->last_flush->context != fence_context && + !fence_is_signaled (id->last_flush))) + needs_flush = true; flushed = id->flushed_updates; -if (updates && - (!flushed ||fence_is_later (updates, flushed))) +if (updates && (!flushed ||fence_is_later (updates, flushed))) + needs_flush = true; + +/* Concurrent flushes are only possible starting with Vega10 */ +if (adev->asic_type <CHIP_VEGA10 && needs_flush)continue ;/* Good we can use this VMID. Remember this submission as
@@ -496,14 +498,15 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,if (r) goto error; -list_move_tail (&id->list, &id_mgr->ids_lru); - - job->vm_id = id - id_mgr->ids; - job->vm_needs_flush = false; -trace_amdgpu_vm_grab_id (vm, ring->idx, job); +if (updates && (!flushed ||fence_is_later (updates, flushed))) { +fence_put (id->flushed_updates); + id->flushed_updates =fence_get (updates); + } -mutex_unlock (&id_mgr->lock); -return 0 ; +if (needs_flush) + goto needs_flush; +else + goto no_flush_needed; };
@@ -515,17 +518,20 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,if (r) goto error; -fence_put (id->last_flush); - id->last_flush =NULL ; - + id->pd_gpu_addr = job->vm_pd_addr;fence_put (id->flushed_updates); id->flushed_updates =fence_get (updates); - - id->pd_gpu_addr = job->vm_pd_addr; id->current_gpu_reset_count =atomic_read (&adev->gpu_reset_counter); -list_move_tail (&id->list, &id_mgr->ids_lru);atomic64_set (&id->owner, vm->client_id); +needs_flush: + job->vm_needs_flush = true; +fence_put (id->last_flush); + id->last_flush =NULL ; + +no_flush_needed: +list_move_tail (&id->list, &id_mgr->ids_lru); + job->vm_id = id - id_mgr->ids;trace_amdgpu_vm_grab_id (vm, ring->idx, job);
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/8 drm/amdgpu: trace the vmhub in grab_id as well
In reply to a message not in the archiveFrom: Christian König <[email protected]>
Trace on which VMHUB we assigned an VMID.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 17 ++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +10 -7
@@ -190,26 +190,29 @@ TRACE_EVENT(amdgpu_sched_run_job,TRACE_EVENT (amdgpu_vm_grab_id, - TP_PROTO(struct amdgpu_vm *vm, int ring, struct amdgpu_job *job), + TP_PROTO(struct amdgpu_vm *vm, struct amdgpu_ring *ring, + struct amdgpu_job *job),TP_ARGS (vm, ring, job),TP_STRUCT__entry ( __field(struct amdgpu_vm *, vm) __field(u32, ring) - __field(u32, vmid) + __field(u32, vm_id) + __field(u32, vm_hub) __field(u64, pd_addr)__field (u32, needs_flush) ),TP_fast_assign ( __entry->vm = vm; - __entry->ring = ring; - __entry->vmid = job->vm_id; + __entry->ring = ring->idx; + __entry->vm_id = job->vm_id; + __entry->vm_hub = ring->funcs->vmhub, __entry->pd_addr = job->vm_pd_addr; __entry->needs_flush = job->vm_needs_flush; ), -TP_printk ("vm=%p, ring=%u, id=%u, pd_addr=%010Lx needs_flush=%u" , - __entry->vm, __entry->ring, __entry->vmid, - __entry->pd_addr, __entry->needs_flush) +TP_printk ("vm=%p, ring=%u, id=%u, hub=%u, pd_addr=%010Lx needs_flush=%u" , + __entry->vm, __entry->ring, __entry->vm_id, + __entry->vm_hub, __entry->pd_addr, __entry->needs_flush) ); TRACE_EVENT(amdgpu_vm_bo_map,
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -533,7 +533,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,list_move_tail (&id->list, &id_mgr->ids_lru); job->vm_id = id - id_mgr->ids; -trace_amdgpu_vm_grab_id (vm, ring->idx, job); +trace_amdgpu_vm_grab_id (vm, ring, job); error:mutex_unlock (&id_mgr->lock);
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1491581476-26758-7-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Re: [PATCH 7/8] drm/amdgpu: trace the vmhub in grab_id as well
Quoted 39 lines · Christian König
From: Christian König <[email protected]>
Trace on which VMHUB we assigned an VMID.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 17 ++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +7
-4@@ -190,26 +190,29 @@ TRACE_EVENT(amdgpu_sched_run_job, TRACE_EVENT(amdgpu_vm_grab_id, - TP_PROTO(struct amdgpu_vm *vm, int ring, struct amdgpu_job *job), + TP_PROTO(struct amdgpu_vm *vm, struct amdgpu_ring *ring, + struct amdgpu_job *job), TP_ARGS(vm, ring, job), TP_STRUCT__entry( __field(struct amdgpu_vm *, vm) __field(u32, ring) - __field(u32, vmid) + __field(u32, vm_id) + __field(u32, vm_hub) __field(u64, pd_addr) __field(u32, needs_flush) ), TP_fast_assign( __entry->vm = vm; - __entry->ring = ring; - __entry->vmid = job->vm_id; + __entry->ring = ring->idx; + __entry->vm_id = job->vm_id; + __entry->vm_hub = ring->funcs->vmhub,
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h TRACE_EVENT(amdgpu_sched_run_job, · line 216
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +3
-3__entry->pd_addr = job->vm_pd_addr; __entry->needs_flush = job->vm_needs_flush; ), -TP_printk ("vm=%p, ring=%u, id=%u, pd_addr=%010Lx needs_flush=%u" , - __entry->vm, __entry->ring, __entry->vmid, - __entry->pd_addr, __entry->needs_flush) +TP_printk ("vm=%p, ring=%u, id=%u, hub=%u, pd_addr=%010Lx needs_flush=%u" , + __entry->vm, __entry->ring, __entry->vm_id, + __entry->vm_hub, __entry->pd_addr, __entry->needs_flush) );
This is where I meant to request tracing of the job id. This job may have incurred some extra overhead due to a vmid being requested. I think that information would be useful to capture and tie to the job submission traces.
Regards,
Andres
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0
-0TRACE_EVENT(amdgpu_vm_bo_map,drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, · line 539
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-1@@ -533,7 +533,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,list_move_tail (&id->list, &id_mgr->ids_lru); job->vm_id = id - id_mgr->ids; -trace_amdgpu_vm_grab_id (vm, ring->idx, job); +trace_amdgpu_vm_grab_id (vm, ring, job); error:mutex_unlock (&id_mgr->lock);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/8 drm/amdgpu: trace vm hub druing flush as well
In reply to a message not in the archiveFrom: Christian König <[email protected]>
Trace on which hub we are doing the flush.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +12 -8
@@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes, );TRACE_EVENT (amdgpu_vm_flush, - TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), -TP_ARGS (pd_addr, ring, id), + TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id, + uint64_t pd_addr), +TP_ARGS (ring, vm_id, pd_addr),TP_STRUCT__entry ( - __field(u64, pd_addr) __field(u32, ring) -__field (u32, id) + __field(u32, vm_id) + __field(u32, vm_hub) +__field (u64, pd_addr) ),TP_fast_assign ( + __entry->ring = ring->idx; + __entry->vm_id = vm_id; + __entry->vm_hub = ring->funcs->vmhub; __entry->pd_addr = pd_addr; - __entry->ring = ring; - __entry->id = id; ), -TP_printk ("ring=%u, id=%u, pd_addr=%010Lx" , - __entry->ring, __entry->id, __entry->pd_addr) +TP_printk ("ring=%u, id=%u, hub=%u, pd_addr=%010Lx" , + __entry->ring, __entry->vm_id, + __entry->vm_hub,__entry->pd_addr) ); TRACE_EVENT(amdgpu_bo_list_set,
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)u64 pd_addr =amdgpu_vm_adjust_mc_addr (adev, job->vm_pd_addr);struct fence *fence; -trace_amdgpu_vm_flush (pd_addr, ring->idx, job->vm_id); +trace_amdgpu_vm_flush (ring, job->vm_id, pd_addr);amdgpu_ring_emit_vm_flush (ring, job->vm_id, pd_addr); r =amdgpu_fence_emit (ring, &fence);
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1491581476-26758-8-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Re: [PATCH 8/8] drm/amdgpu: trace vm hub druing flush as well
s/druing/during in subject
Quoted 35 lines · Christian König
From: Christian König <[email protected]>
Trace on which hub we are doing the flush.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +8
-4@@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes, ); TRACE_EVENT(amdgpu_vm_flush, - TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), - TP_ARGS(pd_addr, ring, id), + TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id, + uint64_t pd_addr), + TP_ARGS(ring, vm_id, pd_addr), TP_STRUCT__entry( - __field(u64, pd_addr) __field(u32, ring) - __field(u32, id) + __field(u32, vm_id) + __field(u32, vm_hub) + __field(u64, pd_addr) ), TP_fast_assign( + __entry->ring = ring->idx; + __entry->vm_id = vm_id;
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h TRACE_EVENT(amdgpu_vm_copy_ptes, · line 355
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +4
-4+ __entry->vm_hub = ring->funcs->vmhub; __entry->pd_addr = pd_addr; - __entry->ring = ring; - __entry->id = id; ), -TP_printk ("ring=%u, id=%u, pd_addr=%010Lx" , - __entry->ring, __entry->id, __entry->pd_addr) +TP_printk ("ring=%u, id=%u, hub=%u, pd_addr=%010Lx" , + __entry->ring, __entry->vm_id, + __entry->vm_hub,__entry->pd_addr)
Can you also include job->base->id in this trace?
Andres
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0
-0); TRACE_EVENT(amdgpu_bo_list_set,drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job) · line 627
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-1@@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)u64 pd_addr =amdgpu_vm_adjust_mc_addr (adev, job->vm_pd_addr);struct fence *fence; -trace_amdgpu_vm_flush (pd_addr, ring->idx, job->vm_id); +trace_amdgpu_vm_flush (ring, job->vm_id, pd_addr);amdgpu_ring_emit_vm_flush (ring, job->vm_id, pd_addr); r =amdgpu_fence_emit (ring, &fence);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 7c8d0caf-8775-fcc9-5cc6-7290d79a91ac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 8/8] drm/amdgpu: trace vm hub druing flush as well
Am 07.04.2017 um 18:52 schrieb Andres Rodriguez:
Quoted 41 lines
s/druing/during in subject
Quoted 37 lines · Christian König
From: Christian König <[email protected]>
Trace on which hub we are doing the flush.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +9
-6@@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes, ); TRACE_EVENT(amdgpu_vm_flush, - TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), - TP_ARGS(pd_addr, ring, id), + TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id, + uint64_t pd_addr), + TP_ARGS(ring, vm_id, pd_addr), TP_STRUCT__entry( - __field(u64, pd_addr) __field(u32, ring) - __field(u32, id) + __field(u32, vm_id) + __field(u32, vm_hub) + __field(u64, pd_addr) ), TP_fast_assign( + __entry->ring = ring->idx; + __entry->vm_id = vm_id; + __entry->vm_hub = ring->funcs->vmhub; __entry->pd_addr = pd_addr; - __entry->ring = ring; - __entry->id = id;
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h TRACE_EVENT(amdgpu_vm_copy_ptes, · line 355
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +3
-2), -TP_printk ("ring=%u, id=%u, pd_addr=%010Lx" , - __entry->ring, __entry->id, __entry->pd_addr) +TP_printk ("ring=%u, id=%u, hub=%u, pd_addr=%010Lx" , + __entry->ring, __entry->vm_id, + __entry->vm_hub,__entry->pd_addr)Can you also include
job->base->idin this trace?
No, at least not of hand. VM flushes are meant to be independent of job submission.
Christian.
Quoted 17 lines
Andres
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0
-0); TRACE_EVENT(amdgpu_bo_list_set,drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_flush(struct amdgpu_ring *ring, · line 627
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-0@@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job) u64 pd_addr = amdgpu_vm_adjust_mc_addr(adev, job->vm_pd_addr);struct fence *fence; -trace_amdgpu_vm_flush (pd_addr, ring->idx, job->vm_id); +trace_amdgpu_vm_flush (ring, job->vm_id, pd_addr);amdgpu_ring_emit_vm_flush (ring, job->vm_id, pd_addr); r =amdgpu_fence_emit (ring, &fence);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 4ed1bd8a-2dcd-488f-9594-51171735db5e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Re: [PATCH 8/8] drm/amdgpu: trace vm hub druing flush as well
Quoted 52 lines · Christian König
Am 07.04.2017 um 18:52 schrieb Andres Rodriguez:
Quoted 42 lines
s/druing/during in subject
Quoted 38 lines · Christian König
From: Christian König <[email protected]>
Trace on which hub we are doing the flush.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +9
-6@@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes, ); TRACE_EVENT(amdgpu_vm_flush, - TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), - TP_ARGS(pd_addr, ring, id), + TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id, + uint64_t pd_addr), + TP_ARGS(ring, vm_id, pd_addr), TP_STRUCT__entry( - __field(u64, pd_addr) __field(u32, ring) - __field(u32, id) + __field(u32, vm_id) + __field(u32, vm_hub) + __field(u64, pd_addr) ), TP_fast_assign( + __entry->ring = ring->idx; + __entry->vm_id = vm_id; + __entry->vm_hub = ring->funcs->vmhub; __entry->pd_addr = pd_addr; - __entry->ring = ring; - __entry->id = id;Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h TRACE_EVENT(amdgpu_vm_copy_ptes, · line 355
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +3
-2), -TP_printk ("ring=%u, id=%u, pd_addr=%010Lx" , - __entry->ring, __entry->id, __entry->pd_addr) +TP_printk ("ring=%u, id=%u, hub=%u, pd_addr=%010Lx" , + __entry->ring, __entry->vm_id, + __entry->vm_hub,__entry->pd_addr)Can you also include
job->base->idin this trace?
Quoted 3 lines
No, at least not of hand. VM flushes are meant to be independent of job submission.
Sorry about the confusion. This comment should've been on patch 7/8 instead of this one.
Quoted 21 lines
Christian.
Quoted 18 lines
Andres
Quoted 15 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +0
-0); TRACE_EVENT(amdgpu_bo_list_set,drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-0@@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job) u64 pd_addr = amdgpu_vm_adjust_mc_addr(adev, job->vm_pd_addr);struct fence *fence; -trace_amdgpu_vm_flush (pd_addr, ring->idx, job->vm_id); +trace_amdgpu_vm_flush (ring, job->vm_id, pd_addr);amdgpu_ring_emit_vm_flush (ring, job->vm_id, pd_addr); r =amdgpu_fence_emit (ring, &fence);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Andres Rodriguez
Reviewed-bySome minor nitpicks as replies to the other emails.
With those fixed, this series is:
I've learned about VMHUB from your patches, so take it with a little grain of salt though.
Quoted 92 lines · Christian König
From: Christian König <[email protected]>
Add the info which ring belonging to which VMHUB.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -99,6 +99,7 @@ struct amdgpu_ring_funcs {uint32_t align_mask;u32 nop;bool support_64bit_ptrs; +unsigned vmhub;/* ring read/write ptr handling */ u64 (*get_rptr)(struct amdgpu_ring *ring);drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3
-0@@ -3456,6 +3456,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_gfx, .get_wptr = gfx_v9_0_ring_get_wptr_gfx, .set_wptr = gfx_v9_0_ring_set_wptr_gfx,@@ -3500,6 +3501,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute, .set_wptr = gfx_v9_0_ring_set_wptr_compute,@@ -3529,6 +3531,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute, .set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0@@ -1473,6 +1473,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .align_mask = 0xf, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, + .vmhub = AMDGPU_MMHUB, .get_rptr = sdma_v4_0_ring_get_rptr, .get_wptr = sdma_v4_0_ring_get_wptr, .set_wptr = sdma_v4_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +2
-0@@ -1448,6 +1448,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_ring_vm_funcs = { .align_mask = 0xf, .nop = PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_NO_OP), 0), .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_ring_get_rptr, .get_wptr = uvd_v7_0_ring_get_wptr, .set_wptr = uvd_v7_0_ring_set_wptr,@@ -1475,6 +1476,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = { .align_mask = 0x3f, .nop = HEVC_ENC_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_enc_ring_get_rptr, .get_wptr = uvd_v7_0_enc_ring_get_wptr, .set_wptr = uvd_v7_0_enc_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { · line 1080
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1
-0@@ -1074,6 +1074,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { .align_mask = 0x3f, .nop = VCE_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = vce_v4_0_ring_get_rptr, .get_wptr = vce_v4_0_ring_get_wptr, .set_wptr = vce_v4_0_ring_set_wptr,
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): fdc1ff71-1b86-14e9-95c5-86d5d949216d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 3 lines · Andres Rodriguez
Some minor nitpicks as replies to the other emails.
With those fixed, this series is:
Looks good to me.
David
Quoted 107 lines
Reviewed-by Andres Rodriguez <[email protected]>I've learned about VMHUB from your patches, so take it with a little grain of salt though.
Quoted 102 lines · Christian König
From: Christian König <[email protected]>
Add the info which ring belonging to which VMHUB.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -99,6 +99,7 @@ struct amdgpu_ring_funcs {uint32_t align_mask;u32 nop;bool support_64bit_ptrs; +unsigned vmhub;/* ring read/write ptr handling */ u64 (*get_rptr)(struct amdgpu_ring *ring);drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3456,6 +3456,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_gfx, .get_wptr = gfx_v9_0_ring_get_wptr_gfx,.set_wptr = gfx_v9_0_ring_set_wptr_gfx,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3500,6 +3501,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3529,6 +3531,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0@@ -1473,6 +1473,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .align_mask = 0xf, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, + .vmhub = AMDGPU_MMHUB, .get_rptr = sdma_v4_0_ring_get_rptr, .get_wptr = sdma_v4_0_ring_get_wptr,.set_wptr = sdma_v4_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1448,6 +1448,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_ring_vm_funcs = { .align_mask = 0xf, .nop = PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_NO_OP), 0), .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_ring_get_rptr, .get_wptr = uvd_v7_0_ring_get_wptr,.set_wptr = uvd_v7_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1475,6 +1476,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = { .align_mask = 0x3f, .nop = HEVC_ENC_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_enc_ring_get_rptr, .get_wptr = uvd_v7_0_enc_ring_get_wptr,.set_wptr = uvd_v7_0_enc_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1
-0@@ -1074,6 +1074,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { .align_mask = 0x3f, .nop = VCE_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB,
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +0
-0.get_rptr = vce_v4_0_ring_get_rptr, .get_wptr = vce_v4_0_ring_get_wptr,.set_wptr = vce_v4_0_ring_set_wptr,_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am 10.04.2017 um 05:41 schrieb zhoucm1:
Quoted 7 lines · Andres Rodriguez
Quoted 3 lines
Some minor nitpicks as replies to the other emails.
With those fixed, this series is:
Looks good to me.
Does that mean I can stitch your rb on it and commit it?
Thanks,
Christian.
Quoted 118 lines
David
Quoted 115 lines
Reviewed-by Andres Rodriguez <[email protected]>I've learned about VMHUB from your patches, so take it with a little grain of salt though.
Quoted 104 lines · Christian König
From: Christian König <[email protected]>
Add the info which ring belonging to which VMHUB.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -99,6 +99,7 @@ struct amdgpu_ring_funcs {uint32_t align_mask;u32 nop;bool support_64bit_ptrs; +unsigned vmhub;/* ring read/write ptr handling */ u64 (*get_rptr)(struct amdgpu_ring *ring);drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3456,6 +3456,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_gfx, .get_wptr = gfx_v9_0_ring_get_wptr_gfx,.set_wptr = gfx_v9_0_ring_set_wptr_gfx,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3500,6 +3501,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3529,6 +3531,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0@@ -1473,6 +1473,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .align_mask = 0xf, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, + .vmhub = AMDGPU_MMHUB, .get_rptr = sdma_v4_0_ring_get_rptr, .get_wptr = sdma_v4_0_ring_get_wptr,.set_wptr = sdma_v4_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1448,6 +1448,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_ring_vm_funcs = { .align_mask = 0xf, .nop = PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_NO_OP), 0), .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_ring_get_rptr, .get_wptr = uvd_v7_0_ring_get_wptr,.set_wptr = uvd_v7_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1475,6 +1476,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = { .align_mask = 0x3f, .nop = HEVC_ENC_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_enc_ring_get_rptr, .get_wptr = uvd_v7_0_enc_ring_get_wptr,.set_wptr = uvd_v7_0_enc_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1
-0@@ -1074,6 +1074,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { .align_mask = 0x3f, .nop = VCE_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = vce_v4_0_ring_get_rptr, .get_wptr = vce_v4_0_ring_get_wptr,Quoted 2 lines
.set_wptr = vce_v4_0_ring_set_wptr,_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 82c7bd46-44ff-ee99-5431-307cbc8f00be-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Quoted 10 lines · Christian König
Am 10.04.2017 um 05:41 schrieb zhoucm1:
Quoted 7 lines · Andres Rodriguez
Quoted 3 lines
Some minor nitpicks as replies to the other emails.
With those fixed, this series is:
Looks good to me.
Does that mean I can stitch your rb on it and commit it?
Already has Andres's RB, go ahead to push it.
Thanks,
David Zhou
Quoted 123 lines
Thanks,
Christian.Quoted 118 lines
David
Quoted 115 lines
Reviewed-by Andres Rodriguez <[email protected]>I've learned about VMHUB from your patches, so take it with a little grain of salt though.
Quoted 104 lines · Christian König
From: Christian König <[email protected]>
Add the info which ring belonging to which VMHUB.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -99,6 +99,7 @@ struct amdgpu_ring_funcs {uint32_t align_mask;u32 nop;bool support_64bit_ptrs; +unsigned vmhub;/* ring read/write ptr handling */ u64 (*get_rptr)(struct amdgpu_ring *ring);drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3456,6 +3456,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_gfx, .get_wptr = gfx_v9_0_ring_get_wptr_gfx,.set_wptr = gfx_v9_0_ring_set_wptr_gfx,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3500,6 +3501,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -3529,6 +3531,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { .align_mask = 0xff, .nop = PACKET3(PACKET3_NOP, 0x3FFF), .support_64bit_ptrs = true, + .vmhub = AMDGPU_GFXHUB, .get_rptr = gfx_v9_0_ring_get_rptr_compute, .get_wptr = gfx_v9_0_ring_get_wptr_compute,.set_wptr = gfx_v9_0_ring_set_wptr_compute,drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0@@ -1473,6 +1473,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .align_mask = 0xf, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, + .vmhub = AMDGPU_MMHUB, .get_rptr = sdma_v4_0_ring_get_rptr, .get_wptr = sdma_v4_0_ring_get_wptr,.set_wptr = sdma_v4_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1448,6 +1448,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_ring_vm_funcs = { .align_mask = 0xf, .nop = PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_NO_OP), 0), .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_ring_get_rptr, .get_wptr = uvd_v7_0_ring_get_wptr,.set_wptr = uvd_v7_0_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1
-0@@ -1475,6 +1476,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = { .align_mask = 0x3f, .nop = HEVC_ENC_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = uvd_v7_0_enc_ring_get_rptr, .get_wptr = uvd_v7_0_enc_ring_get_wptr,.set_wptr = uvd_v7_0_enc_ring_set_wptr,drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +1
-0@@ -1074,6 +1074,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = { .align_mask = 0x3f, .nop = VCE_CMD_NO_OP, .support_64bit_ptrs = false, + .vmhub = AMDGPU_MMHUB, .get_rptr = vce_v4_0_ring_get_rptr, .get_wptr = vce_v4_0_ring_get_wptr,Quoted 2 lines
.set_wptr = vce_v4_0_ring_set_wptr,_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx