From c836f2ce288f202a1c5a1514cd4890e47f60f3d7 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 9 Feb 2017 10:25:20 -0500 Subject: radeon/uvd: adapt gfx9 surface to uvd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Christian König --- src/gallium/drivers/radeonsi/si_uvd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 0d5bc378b2b..53a7ce9402c 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -97,7 +97,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, pbs[i] = &resources[i]->resource.buf; } - rvid_join_surfaces(ctx->b.ws, pbs, surfaces); + rvid_join_surfaces(&ctx->b, pbs, surfaces); for (i = 0; i < VL_NUM_COMPONENTS; ++i) { if (!resources[i]) @@ -121,12 +121,16 @@ error: /* set the decoding target buffer offsets */ static struct pb_buffer* si_uvd_set_dtb(struct ruvd_msg *msg, struct vl_video_buffer *buf) { + struct si_screen *sscreen = (struct si_screen*)buf->base.context->screen; struct r600_texture *luma = (struct r600_texture *)buf->resources[0]; struct r600_texture *chroma = (struct r600_texture *)buf->resources[1]; + enum ruvd_surface_type type = (sscreen->b.chip_class >= GFX9) ? + RUVD_SURFACE_TYPE_GFX9 : + RUVD_SURFACE_TYPE_LEGACY; msg->body.decode.dt_field_mode = buf->base.interlaced; - ruvd_set_dt_surfaces(msg, &luma->surface, &chroma->surface); + ruvd_set_dt_surfaces(msg, &luma->surface, &chroma->surface, type); return luma->resource.buf; } -- cgit v1.2.3