[Mesa-dev] [PATCH 17/17] radeonsi: enable vcn decode
Leo Liu
leo.liu at amd.com
Wed May 10 20:15:51 UTC 2017
Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
---
src/gallium/drivers/radeonsi/si_uvd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c
index 53a7ce9..d17a665 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);
}
--
2.7.4
More information about the mesa-dev
mailing list