From: Boyuan Zhang <boyuan.zh...@amd.com> Add RING_VCN_JPEG for VCN Jpeg decode, and keep RING_VCN_DEC for other codecs.
Signed-off-by: Boyuan Zhang <boyuan.zh...@amd.com> --- src/gallium/drivers/radeon/radeon_vcn_dec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c index 8bea704..e6c1b67 100644 --- a/src/gallium/drivers/radeon/radeon_vcn_dec.c +++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c @@ -1173,7 +1173,7 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context, struct radeon_winsys* ws = ((struct r600_common_context *)context)->ws; struct r600_common_context *rctx = (struct r600_common_context*)context; unsigned width = templ->width, height = templ->height; - unsigned dpb_size, bs_buf_size, stream_type = 0; + unsigned dpb_size, bs_buf_size, stream_type = 0, ring = RING_VCN_DEC; struct radeon_decoder *dec; int r, i; @@ -1199,6 +1199,10 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context, case PIPE_VIDEO_FORMAT_HEVC: stream_type = RDECODE_CODEC_H265; break; + case PIPE_VIDEO_FORMAT_JPEG: + stream_type = RDECODE_CODEC_JPEG; + ring = RING_VCN_JPEG; + break; default: assert(0); break; @@ -1225,7 +1229,7 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context, dec->stream_handle = si_vid_alloc_stream_handle(); dec->screen = context->screen; dec->ws = ws; - dec->cs = ws->cs_create(rctx->ctx, RING_VCN_DEC, NULL, NULL); + dec->cs = ws->cs_create(rctx->ctx, ring, NULL, NULL); if (!dec->cs) { RVID_ERR("Can't get command submission context.\n"); goto error; -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev