diff options
author | Boyuan Zhang <[email protected]> | 2018-10-17 15:03:29 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2018-10-23 08:50:02 -0400 |
commit | 97c473bb29c3f6a5d7f342bfd51f52f34fd501a1 (patch) | |
tree | 7395178fa067b1737bdf8156ee673e5695d6efef /src | |
parent | 4558758c517490c4e644858fbd3fa4712dcc90de (diff) |
winsys/amdgpu: add vcn jpeg cs support
Add vcn jpeg cs support, align cs by no-op.
Signed-off-by: Boyuan Zhang <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index c0f8b442b1d..5986810d4e9 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -845,6 +845,10 @@ static bool amdgpu_init_cs_context(struct amdgpu_winsys *ws, cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_ENC; break; + case RING_VCN_JPEG: + cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_JPEG; + break; + case RING_COMPUTE: case RING_GFX: cs->ib[IB_MAIN].ip_type = ring_type == RING_GFX ? AMDGPU_HW_IP_GFX : @@ -1589,6 +1593,14 @@ static int amdgpu_cs_flush(struct radeon_cmdbuf *rcs, while (rcs->current.cdw & 15) radeon_emit(rcs, 0x80000000); /* type2 nop packet */ break; + case RING_VCN_JPEG: + if (rcs->current.cdw % 2) + assert(0); + while (rcs->current.cdw & 15) { + radeon_emit(rcs, 0x60000000); /* nop packet */ + radeon_emit(rcs, 0x00000000); + } + break; case RING_VCN_DEC: while (rcs->current.cdw & 15) radeon_emit(rcs, 0x81ff); /* nop packet */ |