summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2017-04-17 12:37:44 -0400
committerLeo Liu <[email protected]>2017-05-25 11:40:20 -0400
commitf94cfdc5f2724d7fc92ad1c5d2127b884e7892ff (patch)
treed21ff134306c3e33dea21c9dc07db21667abb5e1 /src
parent7ecc244b14fdf4b3aae9592a38de0630b940b079 (diff)
radeonsi: enable vcn decode
Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_uvd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c
index 53a7ce9402c..d17a6656a46 100644
--- a/src/gallium/drivers/radeonsi/si_uvd.c
+++ b/src/gallium/drivers/radeonsi/si_uvd.c
@@ -35,6 +35,7 @@
#include "radeon/radeon_video.h"
#include "radeon/radeon_uvd.h"
#include "radeon/radeon_vce.h"
+#include "radeon/radeon_vcn_dec.h"
/**
* creates an video buffer with an UVD compatible memory layout
@@ -156,9 +157,11 @@ struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
const struct pipe_video_codec *templ)
{
struct si_context *ctx = (struct si_context *)context;
+ bool vcn = (ctx->b.family == CHIP_RAVEN) ? true : false;
if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE)
return rvce_create_encoder(context, templ, ctx->b.ws, si_vce_get_buffer);
- return ruvd_create_decoder(context, templ, si_uvd_set_dtb);
+ return (vcn) ? radeon_create_decoder(context, templ) :
+ ruvd_create_decoder(context, templ, si_uvd_set_dtb);
}