]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu/vce: add common ring callbacks for ib and dma frame size
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Sep 2016 15:01:26 +0000 (11:01 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Sep 2016 19:53:01 +0000 (15:53 -0400)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h

index b0c670294e2f94077947697a21dd1b41dd8598f5..2c9ea9b50f48bf9bb13d8edd6587fb35fbf35e51 100644 (file)
@@ -803,6 +803,18 @@ void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
        amdgpu_ring_write(ring, VCE_CMD_END);
 }
 
+unsigned amdgpu_vce_ring_get_emit_ib_size(struct amdgpu_ring *ring)
+{
+       return
+               4; /* amdgpu_vce_ring_emit_ib */
+}
+
+unsigned amdgpu_vce_ring_get_dma_frame_size(struct amdgpu_ring *ring)
+{
+       return
+               6; /* amdgpu_vce_ring_emit_fence  x1 no user fence */
+}
+
 /**
  * amdgpu_vce_ring_test_ring - test if VCE ring is working
  *
index 63f83d0d985c0fc981de361ee746865c079373b5..12729d2852df42e3c4706bb9b5246085b13549c8 100644 (file)
@@ -42,5 +42,7 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring);
 int amdgpu_vce_ring_test_ib(struct amdgpu_ring *ring, long timeout);
 void amdgpu_vce_ring_begin_use(struct amdgpu_ring *ring);
 void amdgpu_vce_ring_end_use(struct amdgpu_ring *ring);
+unsigned amdgpu_vce_ring_get_emit_ib_size(struct amdgpu_ring *ring);
+unsigned amdgpu_vce_ring_get_dma_frame_size(struct amdgpu_ring *ring);
 
 #endif