some cleanups and fixes
Subsystems (2)
cover some cleanups and fixes
Monk Liu (3):
drm/amdgpu:set cond_exec polling value to 1 in ring_init drm/amdgpu:Preamble is forbid to be ignored in SRIOV drm/amdgpu:insert switch buffer only for VM submit
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1484707233-29838-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
PATCH 1/3 drm/amdgpu:set cond_exec polling value to 1 in ring_init
no need to set it per ib_schedule(), hw won't override this polling address.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -3
@@ -175,9 +175,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,if (ring->funcs->emit_hdp_flush)amdgpu_ring_emit_hdp_flush (ring); -/* always set cond_exec_polling to CONTINUE */ - *ring->cond_exe_cpu_addr =1 ; - skip_preamble = ring->current_ctx == fence_ctx; need_ctx_switch = ring->current_ctx != fence_ctx;if (job && ring->funcs->emit_cntxcntl) {
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +3 -1
@@ -207,6 +207,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, } ring->cond_exe_gpu_addr = adev->wb.gpu_addr + (ring->cond_exe_offs *4 ); ring->cond_exe_cpu_addr = &adev->wb.wb[ring->cond_exe_offs]; +/* always set cond_exec_polling to CONTINUE */ + *ring->cond_exe_cpu_addr =1 ; r =amdgpu_fence_driver_start_ring (ring, irq_src, irq_type);if (r) {
@@ -307,7 +309,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf,while (size) {if (*pos >= (ring->ring_size +12 ))return result; - + value = ring->ring[(*pos -12 )/4 ]; r =put_user (value, (uint32_t *)buf);if (r)
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/3 drm/amdgpu:Preamble is forbid to be ignored in SRIOV
In reply to a message not in the archive--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -1
@@ -193,7 +193,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,/* drop preamble IBs if we don't have a context switch */ if ((ib->flags &AMDGPU_IB_FLAG_PREAMBLE ) && skip_preamble && - !(status &AMDGPU_PREAMBLE_IB_PRESENT_FIRST )) + !(status &AMDGPU_PREAMBLE_IB_PRESENT_FIRST ) && + !amdgpu_sriov_vf (adev))/* for SRIOV preemption, Preamble CE ib must be inserted anyway */ continue ; amdgpu_ring_emit_ib(ring, ib, job ? job->vm_id : 0,
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 drm/amdgpu:insert switch buffer only for VM submit
In reply to a message not in the archivefor non-VM submit which is from kernel side, no need to switch buffer at all.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1 -1
@@ -224,7 +224,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,amdgpu_ring_patch_cond_exec (ring, patch_offset); ring->current_ctx = fence_ctx; -if (ring->funcs->emit_switch_buffer) +if (vm && ring->funcs->emit_switch_buffer)amdgpu_ring_emit_switch_buffer (ring);amdgpu_ring_commit (ring);return 0 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Reviewed-byRegards,
Christian.
Am 18.01.2017 um 03:40 schrieb Monk Liu:
Quoted 9 lines
Monk Liu (3):
drm/amdgpu:setcond_execpolling value to 1 inring_initdrm/amdgpu:Preamble is forbid to be ignored in SRIOV drm/amdgpu:insert switch buffer only for VM submitdrivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx