summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vce.c
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2015-04-15 12:36:32 -0400
committerMarek Olšák <[email protected]>2015-08-14 15:02:30 +0200
commit1550790b3fab901c697e9d8e5b01ea67d8843e99 (patch)
treef4a7e994620bb5f82d4b7568f48dc217ed50fb8b /src/gallium/drivers/radeon/radeon_vce.c
parent22f71dbf7976d1803940bc2a0429c3d302dae9fa (diff)
radeon/vce: implement VCE two pipe support
v2: rebase by Marek Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index c7b8952403a..02991b2afd7 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -400,6 +400,8 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
enc->use_vm = true;
if ((rscreen->info.drm_major > 2) || (rscreen->info.drm_minor >= 42))
enc->use_vui = true;
+ if (rscreen->info.family >= CHIP_TONGA)
+ enc->use_2p = true;
enc->base = *templ;
enc->base.context = context;
@@ -439,6 +441,9 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
cpb_size = cpb_size * align(tmp_surf->npix_y, 16);
cpb_size = cpb_size * 3 / 2;
cpb_size = cpb_size * enc->cpb_num;
+ if (enc->use_2p)
+ cpb_size += RVCE_MAX_AUX_BUFFER_NUM *
+ RVCE_MAX_BITSTREAM_OUTPUT_ROW_SIZE;
tmp_buf->destroy(tmp_buf);
if (!rvid_create_buffer(enc->screen, &enc->cpb, cpb_size, PIPE_USAGE_DEFAULT)) {
RVID_ERR("Can't create CPB buffer.\n");