From: Alex Deucher Date: Tue, 27 Mar 2018 21:51:41 +0000 (-0500) Subject: drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback (v2) X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4dfe7d7b4e3ba16fc377a48a221bfe8172bc50e1;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback (v2) This adds support for writing and reading back in a single oneshot packet. This is needed to send a tlb invalidation and wait for ack in a single operation. v2: squash sdma hang fix into this patch Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Emily Deng --- diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 2c618a1be03e..03a36cbe7557 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1611,6 +1611,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .pad_ib = sdma_v4_0_ring_pad_ib, .emit_wreg = sdma_v4_0_ring_emit_wreg, .emit_reg_wait = sdma_v4_0_ring_emit_reg_wait, + .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper, }; static void sdma_v4_0_set_ring_funcs(struct amdgpu_device *adev)