Mesa (master): radeon/vce: set flag based on dual instance enablement

Leo Liu leoliu at kemper.freedesktop.org
Fri Aug 19 14:39:16 UTC 2016


Module: Mesa
Branch: master
Commit: c0be51f270ad85ab40daa635a4dbb3bad78d46e8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0be51f270ad85ab40daa635a4dbb3bad78d46e8

Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date:   Mon Aug 15 10:36:14 2016 -0400

radeon/vce: set flag based on dual instance enablement

Set the flag on when dual instance encoding is supported,
otherwise set it to off.

Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>

---

 src/gallium/drivers/radeon/radeon_vce_52.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/radeon_vce_52.c b/src/gallium/drivers/radeon/radeon_vce_52.c
index 136f080..5db01fe 100644
--- a/src/gallium/drivers/radeon/radeon_vce_52.c
+++ b/src/gallium/drivers/radeon/radeon_vce_52.c
@@ -158,13 +158,15 @@ void radeon_vce_52_get_param(struct rvce_encoder *enc, struct pipe_h264_enc_pict
 	enc->enc_pic.ref_idx_l0 = pic->ref_idx_l0;
 	enc->enc_pic.ref_idx_l1 = pic->ref_idx_l1;
 	enc->enc_pic.not_referenced = pic->not_referenced;
-	enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = pic->ref_pic_mode;
+	if (enc->dual_inst)
+		enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = 0x00000201;
+	else
+		enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = 0x01000201;
 	enc->enc_pic.is_idr = pic->is_idr;
 }
 
 static void create(struct rvce_encoder *enc)
 {
-	enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = 0x00000201;
 	enc->task_info(enc, 0x00000000, 0, 0, 0);
 
 	RVCE_BEGIN(0x01000001); // create cmd




More information about the mesa-commit mailing list