diff options
author | Monk Liu | 2016-08-26 08:12:37 +0200 |
---|---|---|
committer | Alex Deucher | 2016-08-30 23:55:45 +0200 |
commit | c2167a659cc91075417018b88437da86633bb455 (patch) | |
tree | 6a473d677ee81d910307f6927c952a457dbc2650 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |
parent | drm/amd/amdgpu: debugfs SMC addresses are byte addresses (diff) | |
download | kernel-qcow2-linux-c2167a659cc91075417018b88437da86633bb455.tar.gz kernel-qcow2-linux-c2167a659cc91075417018b88437da86633bb455.tar.xz kernel-qcow2-linux-c2167a659cc91075417018b88437da86633bb455.zip |
drm/amdgpu:add switch buffer to end of CS (v2)
sync switch buffer scheme with windows kmd for gfx v8,
step1: append a switch_buffer to the end of CS
v2:rebase on latest staging
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 6022208ead31..b8bc413a8e32 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -6087,6 +6087,12 @@ static void gfx_v8_0_ring_emit_fence_compute(struct amdgpu_ring *ring, amdgpu_ring_write(ring, upper_32_bits(seq)); } +static void gfx_v8_ring_emit_sb(struct amdgpu_ring *ring) +{ + amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0)); + amdgpu_ring_write(ring, 0); +} + static void gfx_v8_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev, enum amdgpu_interrupt_state state) { @@ -6268,6 +6274,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = { .test_ib = gfx_v8_0_ring_test_ib, .insert_nop = amdgpu_ring_insert_nop, .pad_ib = amdgpu_ring_generic_pad_ib, + .emit_switch_buffer = gfx_v8_ring_emit_sb, }; static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_compute = { |