Discussion:
[Libva-intel-driver][PATCH] vdenc: Always use the 1st VCS ring
(too old to reply)
Xiang, Haihao
2016-10-28 05:23:14 UTC
Permalink
VDEnc/HuC only works with the 1st VCS ring, however SKL GT3+ has 2 VCS rings.
To avoid executing the corresponding batch buffer from the 2nd VCS ring in i915, we
have to specify the 1st ring in the driver.

SKL GT1/GT2 has only one VCS ring, so specifying the 1st ring in the driver has no
any impact to GT1/GT2

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98033
Signed-off-by: Xiang, Haihao <***@intel.com>
---
src/gen9_vdenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gen9_vdenc.c b/src/gen9_vdenc.c
index 46da334..2bc15b7 100644
--- a/src/gen9_vdenc.c
+++ b/src/gen9_vdenc.c
@@ -3567,7 +3567,8 @@ gen9_vdenc_avc_encode_picture(VADriverContextP ctx,
vdenc_context->is_first_pass = (vdenc_context->current_pass == 0);
vdenc_context->is_last_pass = (vdenc_context->current_pass == (vdenc_context->num_passes - 1));

- intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
+ intel_batchbuffer_start_atomic_bcs_override(batch, 0x1000, BSD_RING0);
+
intel_batchbuffer_emit_mi_flush(batch);

if (vdenc_context->brc_enabled) {
--
1.9.1
Xiang, Haihao
2016-10-28 05:27:58 UTC
Permalink
Sorry, the bug URL is wrong, I will update it.
Post by Xiang, Haihao
VDEnc/HuC only works with the 1st VCS ring, however SKL GT3+ has 2 VCS rings.
To avoid executing the corresponding batch buffer from the 2nd VCS ring in i915, we
have to specify the 1st ring in the driver.
SKL GT1/GT2 has only one VCS ring, so specifying the 1st ring in the driver has no
any impact to GT1/GT2
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98033
---
 src/gen9_vdenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gen9_vdenc.c b/src/gen9_vdenc.c
index 46da334..2bc15b7 100644
--- a/src/gen9_vdenc.c
+++ b/src/gen9_vdenc.c
@@ -3567,7 +3567,8 @@ gen9_vdenc_avc_encode_picture(VADriverContextP ctx,
         vdenc_context->is_first_pass = (vdenc_context->current_pass
== 0);
         vdenc_context->is_last_pass = (vdenc_context->current_pass
== (vdenc_context->num_passes - 1));
 
-        intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
+        intel_batchbuffer_start_atomic_bcs_override(batch, 0x1000,
BSD_RING0);
+
         intel_batchbuffer_emit_mi_flush(batch);
 
         if (vdenc_context->brc_enabled) {
Xiang, Haihao
2016-10-28 05:32:39 UTC
Permalink
VDEnc/HuC only works with the 1st VCS ring, however SKL GT3+ has 2 VCS rings.
To avoid executing the corresponding batch buffer from the 2nd VCS ring in i915, we
have to specify the 1st ring in the driver.

SKL GT1/GT2 has only one VCS ring, so specifying the 1st ring in the driver has no
any impact to GT1/GT2

v2: Use the right bug URL

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97872
Signed-off-by: Xiang, Haihao <***@intel.com>
---
src/gen9_vdenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gen9_vdenc.c b/src/gen9_vdenc.c
index 46da334..2bc15b7 100644
--- a/src/gen9_vdenc.c
+++ b/src/gen9_vdenc.c
@@ -3567,7 +3567,8 @@ gen9_vdenc_avc_encode_picture(VADriverContextP ctx,
vdenc_context->is_first_pass = (vdenc_context->current_pass == 0);
vdenc_context->is_last_pass = (vdenc_context->current_pass == (vdenc_context->num_passes - 1));

- intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
+ intel_batchbuffer_start_atomic_bcs_override(batch, 0x1000, BSD_RING0);
+
intel_batchbuffer_emit_mi_flush(batch);

if (vdenc_context->brc_enabled) {
--
1.9.1
Sean V Kelley
2016-10-28 20:02:27 UTC
Permalink
Post by Xiang, Haihao
VDEnc/HuC only works with the 1st VCS ring, however SKL GT3+ has 2 VCS rings.
To avoid executing the corresponding batch buffer from the 2nd VCS ring in i915, we
have to specify the 1st ring in the driver.
SKL GT1/GT2 has only one VCS ring, so specifying the 1st ring in the driver has no
any impact to GT1/GT2
v2: Use the right bug URL
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97872
lgtm, applied.

Thanks,

Sean
Post by Xiang, Haihao
---
 src/gen9_vdenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gen9_vdenc.c b/src/gen9_vdenc.c
index 46da334..2bc15b7 100644
--- a/src/gen9_vdenc.c
+++ b/src/gen9_vdenc.c
@@ -3567,7 +3567,8 @@ gen9_vdenc_avc_encode_picture(VADriverContextP ctx,
         vdenc_context->is_first_pass = (vdenc_context->current_pass
== 0);
         vdenc_context->is_last_pass = (vdenc_context->current_pass
== (vdenc_context->num_passes - 1));
 
-        intel_batchbuffer_start_atomic_bcs(batch, 0x1000);
+        intel_batchbuffer_start_atomic_bcs_override(batch, 0x1000,
BSD_RING0);
+
         intel_batchbuffer_emit_mi_flush(batch);
 
         if (vdenc_context->brc_enabled) {
Loading...