drm/amdgpu: add emit trap for vcn jpeg
authorBoyuan Zhang <boyuan.zhang@amd.com>
Wed, 18 Jul 2018 20:26:28 +0000 (16:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:10:11 +0000 (11:10 -0500)
Add emit trap command in jpeg emit fence call.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c

index 8d84e2e5063657426f565837eb5eb6869b621c8d..aa21f667ff475686c29e89249fc516446ca64a36 100644 (file)
@@ -1340,6 +1340,10 @@ static void vcn_v1_0_jpeg_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u6
        amdgpu_ring_write(ring,
                PACKETJ(0, 0, 0, PACKETJ_TYPE0));
        amdgpu_ring_write(ring, 0x1);
+
+       /* emit trap */
+       amdgpu_ring_write(ring, PACKETJ(0, 0, 0, PACKETJ_TYPE7));
+       amdgpu_ring_write(ring, 0);
 }
 
 /**