Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On Thu, 2016-10-13 at 03:07 +0800, Xiang, Haihao wrote: > AVS can't gurantee bit-match for a large surface. This fixes the > failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. > > before: > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (9361 ms total) > [ PASSED ] 0 tests. > [ FAILED ] 1 test, listed below: > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > after: > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (15365 ms total) > [ PASSED ] 1 test. > > Signed-off-by: Xiang, Haihao We can merge this now we are tracking the bus error issue. Applied, thanks. Sean > --- > src/gen8_post_processing.c | 56 > +- > src/shaders/post_processing/gen8/Makefile.am | 2 + > .../gen8/PL2_media_read_buf0123.g8a| 65 > + > .../gen8/PL3_media_read_buf0123.g8a| 68 > ++ > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > ++ > src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + > src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 > ++ > src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + > src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 > +++ > src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- > src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 > +++ > src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 > ++ > src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 > ++ > src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 > +++ > src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 > +++ > 16 files changed, 563 insertions(+), 2 deletions(-) > create mode 100644 > src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a > create mode 100644 > src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a > > diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c > index 375bbe0..687cedc 100644 > --- a/src/gen8_post_processing.c > +++ b/src/gen8_post_processing.c > @@ -630,6 +630,31 @@ > gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct > i965_post_proc > SURFACE_FORMAT_R8_UNORM, 0, > base_index + 2); > } > + > +gen8_pp_set_surface_state(ctx, pp_context, > + bo, 0, > + ALIGN(width[0], 4) / 4, height[0], > pitch[0], > + I965_SURFACEFORMAT_R8_UINT, > + base_index + 3, 1); > + > +if (fourcc_info->num_planes == 2) { > +gen8_pp_set_surface_state(ctx, pp_context, > + bo, offset[1], > + ALIGN(width[1], 2) / 2, > height[1], pitch[1], > + I965_SURFACEFORMAT_R8G8_SINT, > + base_index + 4, 1); > +} else if (fourcc_info->num_planes == 3) { > +gen8_pp_set_surface_state(ctx, pp_context, > + bo, offset[1], > + ALIGN(width[1], 4) / 4, > height[1], pitch[1], > + I965_SURFACEFORMAT_R8_SINT, > + base_index + 4, 1); > +gen8_pp_set_surface_state(ctx, pp_context, > + bo, offset[2], > + ALIGN(width[2], 4) / 4, > height[2], pitch[2], > + I965_SURFACEFORMAT_R8_SINT, > + base_index + 5, 1); > +} > } > } > > @@ -788,6 +813,33 @@ gen8_pp_get_8tap_filter_mode(VADriverContextP > ctx, > return 3; > } > > +static int > +gen8_pp_kernel_use_media_read_msg(VADriverContextP ctx, > + const struct i965_surface > *src_surface, > + const VARectangle *src_rect, > + const struct i965_surface > *dst_surface, > + const VARectangle *dst_rect) > +{ > +int src_fourcc = pp_get_surface_fourcc(ctx, src_surface); > +int dst_fourcc = pp_get_surface_fourcc(ctx, dst_surface); > +const i965_fourcc_i
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
I've created a bugzilla for the issue... https://bugs.freedesktop.org/show_bug.cgi?id=98311 Let's continue discussion there. U. Artie > -Original Message- > From: Sean V Kelley [mailto:sean.v.kel...@intel.com] > Sent: Monday, October 17, 2016 10:35 AM > To: Xiang, Haihao > Cc: Zhao, Yakui ; Eoff, Ullysses A > ; libva@lists.freedesktop.org > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if > possible on Gen8+ > > Yes, I want to throttle the pace of the changes until we qualify and > understand the performance and test failure issues. Then we can resume > normal flow. > > For these tests to be meaningful they have to be consistent across > distributions and platforms. > > Thanks, > > Sean > > > On Sun, Oct 16, 2016 at 8:11 PM, Xiang, Haihao wrote: > > > > Hi Sean, > > > > I can't reproduce the issue mentioned by you and Artie on my SKL. I am > > using Ubuntu 14.04 but built kernel and libdrm from source code: > > > > Linux kernel: > > aab15c274da587bcab19376d2caa9d6626440335 (drm-intel-nightly: 2016y-09m- > > 26d-12h-11m-33s) > > > > libdrm: 2.4.70 > > > > I don't think the bus error is related to this patch, but I would hold > > off on merging this patch if you reproduced the error with > > Common/JPEGEncodeInputTest.Full/95 only. > > > > Thanks > > Haihao > > > > > > > >> On 10/15/2016 03:58 AM, Eoff, Ullysses A wrote: > >> > > >> > > -Original Message- > >> > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On > >> > > Behalf Of Sean V Kelley > >> > > Sent: Friday, October 14, 2016 11:44 AM > >> > > To: Zhao, Yakui; Xiang, Haihao >> > > @intel.com> > >> > > Cc: libva@lists.freedesktop.org > >> > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > >> > > message if possible on Gen8+ > >> > > > >> > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > >> > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > >> > > > > AVS can't gurantee bit-match for a large surface. This fixes > >> > > > > the > >> > > > > failure reported by gtest case > >> > > > > Common/JPEGEncodeInputTest.Full/95. > >> > > > > > >> > > > > before: > >> > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > >> > > > > GetParam() = > >> > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > >> > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > >> > > > > total) > >> > > > > > >> > > > > [--] Global test environment tear-down > >> > > > > [==] 1 test from 1 test case ran. (9361 ms total) > >> > > > > [ PASSED ] 0 tests. > >> > > > > [ FAILED ] 1 test, listed below: > >> > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > >> > > > > GetParam() = > >> > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > >> > > > > > >> > > > > after: > >> > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > >> > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > >> > > > > total) > >> > > > > > >> > > > > [--] Global test environment tear-down > >> > > > > [==] 1 test from 1 test case ran. (15365 ms total) > >> > > > > [ PASSED ] 1 test. > >> > > > > > >> > > > > Signed-off-by: Xiang, Haihao > >> > > > > >> > > > This looks good to me. > >> > > > > >> > > > Add: Reviewed-by: Zhao Yakui > >> > > > >> > > > >> > > Getting a core dump although the test is now passing. We'll need > >> > > to > >> > > debug further. > >> > > > >> > > >> > I don't get any core dump on my SKL... And the test passes for me > >> > with > >> > this patch. Are you running the test in isolation or with the > >> > entire suite? > >> > If with the entire suite, does t
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
Yes, I want to throttle the pace of the changes until we qualify and understand the performance and test failure issues. Then we can resume normal flow. For these tests to be meaningful they have to be consistent across distributions and platforms. Thanks, Sean On Sun, Oct 16, 2016 at 8:11 PM, Xiang, Haihao wrote: > > Hi Sean, > > I can't reproduce the issue mentioned by you and Artie on my SKL. I am > using Ubuntu 14.04 but built kernel and libdrm from source code: > > Linux kernel: > aab15c274da587bcab19376d2caa9d6626440335 (drm-intel-nightly: 2016y-09m- > 26d-12h-11m-33s) > > libdrm: 2.4.70 > > I don't think the bus error is related to this patch, but I would hold > off on merging this patch if you reproduced the error with > Common/JPEGEncodeInputTest.Full/95 only. > > Thanks > Haihao > > > >> On 10/15/2016 03:58 AM, Eoff, Ullysses A wrote: >> > >> > > -Original Message- >> > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On >> > > Behalf Of Sean V Kelley >> > > Sent: Friday, October 14, 2016 11:44 AM >> > > To: Zhao, Yakui; Xiang, Haihao> > > @intel.com> >> > > Cc: libva@lists.freedesktop.org >> > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read >> > > message if possible on Gen8+ >> > > >> > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: >> > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: >> > > > > AVS can't gurantee bit-match for a large surface. This fixes >> > > > > the >> > > > > failure reported by gtest case >> > > > > Common/JPEGEncodeInputTest.Full/95. >> > > > > >> > > > > before: >> > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where >> > > > > GetParam() = >> > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) >> > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms >> > > > > total) >> > > > > >> > > > > [--] Global test environment tear-down >> > > > > [==] 1 test from 1 test case ran. (9361 ms total) >> > > > > [ PASSED ] 0 tests. >> > > > > [ FAILED ] 1 test, listed below: >> > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where >> > > > > GetParam() = >> > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") >> > > > > >> > > > > after: >> > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) >> > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms >> > > > > total) >> > > > > >> > > > > [--] Global test environment tear-down >> > > > > [==] 1 test from 1 test case ran. (15365 ms total) >> > > > > [ PASSED ] 1 test. >> > > > > >> > > > > Signed-off-by: Xiang, Haihao >> > > > >> > > > This looks good to me. >> > > > >> > > > Add: Reviewed-by: Zhao Yakui >> > > >> > > >> > > Getting a core dump although the test is now passing. We'll need >> > > to >> > > debug further. >> > > >> > >> > I don't get any core dump on my SKL... And the test passes for me >> > with >> > this patch. Are you running the test in isolation or with the >> > entire suite? >> > If with the entire suite, does the core dump occur during this test >> > case or >> > another? >> > >> > I've noticed that I occasionally get a "bus error" with the >> > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without >> > this patch. Perhaps this is what you're encountering? >> >> Hi, Sean/Artie >> >> Is it possible that you can send out the dmesg log when the >> bus_error is triggered? >> I try the test several times on one KBL machine(similar to SKL) >> and >> unfortunately there is no "sig_bus error". >> >> Thanks >> Yakui >> >> > >> > U. Artie >> > >> > > Sean >> > > >> > > > >> > > > Thanks >> > > > Yakui >> > > > >> > > > > --- >> > > > &g
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
> On Fri, 2016-10-14 at 19:58 +, Eoff, Ullysses A wrote: > > > -Original Message- > > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On > > > Behalf > > > Of Sean V Kelley > > > Sent: Friday, October 14, 2016 11:44 AM > > > To: Zhao, Yakui ; Xiang, Haihao > > > > > @intel.com> > > > Cc: libva@lists.freedesktop.org > > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > > message if possible on Gen8+ > > > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > > the > > > > > failure reported by gtest case > > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > > > before: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > > [ PASSED ] 0 tests. > > > > > [ FAILED ] 1 test, listed below: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > > > after: > > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > > [ PASSED ] 1 test. > > > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > > > This looks good to me. > > > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > > > > Getting a core dump although the test is now passing. We'll need > > > to > > > debug further. > > > > > > > I don't get any core dump on my SKL... And the test passes for me > > with > > this patch. Are you running the test in isolation or with the > > entire > > suite? > > If with the entire suite, does the core dump occur during this test > > case or > > another? > > > > I've noticed that I occasionally get a "bus error" with the > > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > > this patch. Perhaps this is what you're encountering? > > I'm consistently seeing this on a SKL system. It is also quite slow > for execution. Actually tested this on my Arch sytem with Kernel 4.7 > and the older LTS 4.4. Same bus error and slow execution > performance. Sorry, I didn't notice the issue of slow execution. In theory, my patch should not cause slowdown because it read YUV data directly from a surface in the GPU kernel. I ran the test case several times with/without the patch, and can't reproduce the issue. It seems this issue is also a random issue in gtest. > > We need to isolate the root cause here because I suspect this is what > Haihao has also been seeing. > > Takes nearly a minute on one system and far less time on an Ubuntu > system with the same kernel and essentially the same SKL SKU. > > Sean > > > > > > > U. Artie > > > > > Sean > > > > > > > > > > > Thanks > > > > Yakui > > > > > > > > > --- > > > > > src/gen8_post_processing.c | 56 > > > > > +- > > > > > src/shaders/post_processing/gen8/Makefile.am | 2 + > > > > > .../gen8/PL2_media_read_buf0123.g8a| 65 > > > > > + > > > > > .../gen8/PL3_media_read_buf0123.g8a| 68 > > > > > ++ > > > > > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > > > > > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > > >
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
Hi Sean, I can't reproduce the issue mentioned by you and Artie on my SKL. I am using Ubuntu 14.04 but built kernel and libdrm from source code: Linux kernel: aab15c274da587bcab19376d2caa9d6626440335 (drm-intel-nightly: 2016y-09m- 26d-12h-11m-33s) libdrm: 2.4.70 I don't think the bus error is related to this patch, but I would hold off on merging this patch if you reproduced the error with Common/JPEGEncodeInputTest.Full/95 only. Thanks Haihao > On 10/15/2016 03:58 AM, Eoff, Ullysses A wrote: > > > > > -Original Message- > > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On > > > Behalf Of Sean V Kelley > > > Sent: Friday, October 14, 2016 11:44 AM > > > To: Zhao, Yakui; Xiang, Haihao > > @intel.com> > > > Cc: libva@lists.freedesktop.org > > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > > message if possible on Gen8+ > > > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > > the > > > > > failure reported by gtest case > > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > > > before: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > > [ PASSED ] 0 tests. > > > > > [ FAILED ] 1 test, listed below: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > > > after: > > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > > [ PASSED ] 1 test. > > > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > > > This looks good to me. > > > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > > > > Getting a core dump although the test is now passing. We'll need > > > to > > > debug further. > > > > > > > I don't get any core dump on my SKL... And the test passes for me > > with > > this patch. Are you running the test in isolation or with the > > entire suite? > > If with the entire suite, does the core dump occur during this test > > case or > > another? > > > > I've noticed that I occasionally get a "bus error" with the > > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > > this patch. Perhaps this is what you're encountering? > > Hi, Sean/Artie > > Is it possible that you can send out the dmesg log when the > bus_error is triggered? > I try the test several times on one KBL machine(similar to SKL) > and > unfortunately there is no "sig_bus error". > > Thanks > Yakui > > > > > U. Artie > > > > > Sean > > > > > > > > > > > Thanks > > > > Yakui > > > > > > > > > --- > > > > > src/gen8_post_processing.c | 56 > > > > > +- > > > > > src/shaders/post_processing/gen8/Makefile.am | 2 + > > > > > .../gen8/PL2_media_read_buf0123.g8a| 65 > > > > > + > > > > > .../gen8/PL3_media_read_buf0123.g8a| 68 > > > > > ++ > > > > > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > > > > > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > > > > > ++ > > > > > src/shaders/post_processing/gen8/pl2_to_pl3.asm
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On 10/15/2016 03:58 AM, Eoff, Ullysses A wrote: -Original Message- From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf Of Sean V Kelley Sent: Friday, October 14, 2016 11:44 AM To: Zhao, Yakui; Xiang, Haihao Cc: libva@lists.freedesktop.org Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+ On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: On 10/13/2016 03:07 AM, Xiang, Haihao wrote: AVS can't gurantee bit-match for a large surface. This fixes the failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. before: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (9361 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") after: [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) [--] 1 test from Common/JPEGEncodeInputTest (15250 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (15365 ms total) [ PASSED ] 1 test. Signed-off-by: Xiang, Haihao This looks good to me. Add: Reviewed-by: Zhao Yakui Getting a core dump although the test is now passing. We'll need to debug further. I don't get any core dump on my SKL... And the test passes for me with this patch. Are you running the test in isolation or with the entire suite? If with the entire suite, does the core dump occur during this test case or another? I've noticed that I occasionally get a "bus error" with the Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without this patch. Perhaps this is what you're encountering? Hi, Sean/Artie Is it possible that you can send out the dmesg log when the bus_error is triggered? I try the test several times on one KBL machine(similar to SKL) and unfortunately there is no "sig_bus error". Thanks Yakui U. Artie Sean Thanks Yakui --- src/gen8_post_processing.c | 56 +- src/shaders/post_processing/gen8/Makefile.am | 2 + .../gen8/PL2_media_read_buf0123.g8a| 65 + .../gen8/PL3_media_read_buf0123.g8a| 68 ++ src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 ++ src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 ++ src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 +++ src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 +++ src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 ++ src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 ++ src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 +++ src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 +++ 16 files changed, 563 insertions(+), 2 deletions(-) create mode 100644 src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a create mode 100644 src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c index 375bbe0..687cedc 100644 --- a/src/gen8_post_processing.c +++ b/src/gen8_post_processing.c @@ -630,6 +630,31 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc SURFACE_FORMAT_R8_UNORM, 0, base_index + 2); } + +gen8_pp_set_surface_state(ctx, pp_context, + bo, 0, + ALIGN(width[0], 4) / 4, height[0], pitch[0], + I965_SURFACEFORMAT_R8_UINT, + base_index + 3, 1); + +if (fourcc_info->num_planes == 2) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 2) / 2, height[1], pitch[1], + I965_SURFACEFORMAT_R8G8_SINT , + base_index + 4, 1); +} else if (fourcc_info->num_planes == 3) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 4) / 4, height[1], pitc
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
U. Artie Eoff Software Engineer Visualization - Intel Open Source Technology Center Hillsboro, Oregon, USA > -Original Message- > From: Kelley, Sean V > Sent: Friday, October 14, 2016 2:48 PM > To: Eoff, Ullysses A ; sea...@posteo.de; Zhao, > Yakui ; Xiang, Haihao > > Cc: libva@lists.freedesktop.org > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if > possible on Gen8+ > > > > On 10/14/16, 2:12 PM, "Libva on behalf of Eoff, Ullysses A" > ullysses.a.e...@intel.com> wrote: > > > -Original Message- > > From: Sean V Kelley [mailto:sea...@posteo.de] > > Sent: Friday, October 14, 2016 1:45 PM > > To: Eoff, Ullysses A ; Zhao, Yakui > ; Xiang, Haihao > > Cc: libva@lists.freedesktop.org > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message > if possible on Gen8+ > > > > On Fri, 2016-10-14 at 19:58 +, Eoff, Ullysses A wrote: > > > > -Original Message- > > > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf > > > > Of Sean V Kelley > > > > Sent: Friday, October 14, 2016 11:44 AM > > > > To: Zhao, Yakui ; Xiang, Haihao > > > @intel.com> > > > > Cc: libva@lists.freedesktop.org > > > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > > > message if possible on Gen8+ > > > > > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > > > the > > > > > > failure reported by gtest case > > > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > > > > > before: > > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > > GetParam() = > > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > > > total) > > > > > > > > > > > > [--] Global test environment tear-down > > > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > > > [ PASSED ] 0 tests. > > > > > > [ FAILED ] 1 test, listed below: > > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > > GetParam() = > > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > > > > > after: > > > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > > > total) > > > > > > > > > > > > [--] Global test environment tear-down > > > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > > > [ PASSED ] 1 test. > > > > > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > > > > > This looks good to me. > > > > > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > > > > > > > Getting a core dump although the test is now passing. We'll need > > > > to > > > > debug further. > > > > > > > > > > I don't get any core dump on my SKL... And the test passes for me > > > with > > > this patch. Are you running the test in isolation or with the entire > > > suite? > > > If with the entire suite, does the core dump occur during this test > > > case or > > > another? > > > > > > I've noticed that I occasionally get a "bus error" with the > > > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > > > this patch. Perhaps this is what you're encountering? > > > > I'm consistently seeing this on a SKL system. It is also quite slow > > for execution. Actually tested this on my Arch sytem with Kernel 4.7 >
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On 10/14/16, 2:12 PM, "Libva on behalf of Eoff, Ullysses A" wrote: > -Original Message- > From: Sean V Kelley [mailto:sea...@posteo.de] > Sent: Friday, October 14, 2016 1:45 PM > To: Eoff, Ullysses A ; Zhao, Yakui ; Xiang, Haihao > Cc: libva@lists.freedesktop.org > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+ > > On Fri, 2016-10-14 at 19:58 +, Eoff, Ullysses A wrote: > > > -Original Message- > > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf > > > Of Sean V Kelley > > > Sent: Friday, October 14, 2016 11:44 AM > > > To: Zhao, Yakui ; Xiang, Haihao > > @intel.com> > > > Cc: libva@lists.freedesktop.org > > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > > message if possible on Gen8+ > > > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > > the > > > > > failure reported by gtest case > > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > > > before: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > > [ PASSED ] 0 tests. > > > > > [ FAILED ] 1 test, listed below: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > > > after: > > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > > [ PASSED ] 1 test. > > > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > > > This looks good to me. > > > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > > > > Getting a core dump although the test is now passing. We'll need > > > to > > > debug further. > > > > > > > I don't get any core dump on my SKL... And the test passes for me > > with > > this patch. Are you running the test in isolation or with the entire > > suite? > > If with the entire suite, does the core dump occur during this test > > case or > > another? > > > > I've noticed that I occasionally get a "bus error" with the > > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > > this patch. Perhaps this is what you're encountering? > > I'm consistently seeing this on a SKL system. It is also quite slow > for execution. Actually tested this on my Arch sytem with Kernel 4.7 > and the older LTS 4.4. Same bus error and slow execution performance. > > We need to isolate the root cause here because I suspect this is what > Haihao has also been seeing. > > Takes nearly a minute on one system and far less time on an Ubuntu > system with the same kernel and essentially the same SKL SKU. > Yes, I agree we need to isolate this issue. I can file a bug for this but was hoping to find time to generate a coredump output file. The slow execution is caused by the byte comparison loop between the input and the output YUV data... for larger resolutions it takes a long time and uses a lot of memory. I don't like having long running tests, especially at this level of testing... so the only way to speed up this test is to optimize the comparison routine. Per
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
> -Original Message- > From: Sean V Kelley [mailto:sea...@posteo.de] > Sent: Friday, October 14, 2016 1:45 PM > To: Eoff, Ullysses A ; Zhao, Yakui > ; Xiang, Haihao > Cc: libva@lists.freedesktop.org > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if > possible on Gen8+ > > On Fri, 2016-10-14 at 19:58 +, Eoff, Ullysses A wrote: > > > -Original Message- > > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf > > > Of Sean V Kelley > > > Sent: Friday, October 14, 2016 11:44 AM > > > To: Zhao, Yakui ; Xiang, Haihao > > @intel.com> > > > Cc: libva@lists.freedesktop.org > > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > > message if possible on Gen8+ > > > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > > the > > > > > failure reported by gtest case > > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > > > before: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > > [ PASSED ] 0 tests. > > > > > [ FAILED ] 1 test, listed below: > > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > > GetParam() = > > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > > > after: > > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > > total) > > > > > > > > > > [--] Global test environment tear-down > > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > > [ PASSED ] 1 test. > > > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > > > This looks good to me. > > > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > > > > Getting a core dump although the test is now passing. We'll need > > > to > > > debug further. > > > > > > > I don't get any core dump on my SKL... And the test passes for me > > with > > this patch. Are you running the test in isolation or with the entire > > suite? > > If with the entire suite, does the core dump occur during this test > > case or > > another? > > > > I've noticed that I occasionally get a "bus error" with the > > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > > this patch. Perhaps this is what you're encountering? > > I'm consistently seeing this on a SKL system. It is also quite slow > for execution. Actually tested this on my Arch sytem with Kernel 4.7 > and the older LTS 4.4. Same bus error and slow execution performance. > > We need to isolate the root cause here because I suspect this is what > Haihao has also been seeing. > > Takes nearly a minute on one system and far less time on an Ubuntu > system with the same kernel and essentially the same SKL SKU. > Yes, I agree we need to isolate this issue. I can file a bug for this but was hoping to find time to generate a coredump output file. The slow execution is caused by the byte comparison loop between the input and the output YUV data... for larger resolutions it takes a long time and uses a lot of memory. I don't like having long running tests, especially at this level of testing... so the only way to speed up this test is to optimize the comparison routine. Perhaps checksums would be better, but would require a new library dependency. We could also consider disabling this test case (8192x8192) too. Nonetheless, none of these issues are related to this patch since they pre-existed. Thus, this patch LGTM. U. Artie > Sean > > > > > > > U. Artie > > > > > Sean > > > > > > > > > > > Thanks > > > > Yakui
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On Fri, 2016-10-14 at 19:58 +, Eoff, Ullysses A wrote: > > -Original Message- > > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf > > Of Sean V Kelley > > Sent: Friday, October 14, 2016 11:44 AM > > To: Zhao, Yakui ; Xiang, Haihao > @intel.com> > > Cc: libva@lists.freedesktop.org > > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read > > message if possible on Gen8+ > > > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > > AVS can't gurantee bit-match for a large surface. This fixes > > > > the > > > > failure reported by gtest case > > > > Common/JPEGEncodeInputTest.Full/95. > > > > > > > > before: > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > GetParam() = > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms > > > > total) > > > > > > > > [--] Global test environment tear-down > > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > > [ PASSED ] 0 tests. > > > > [ FAILED ] 1 test, listed below: > > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where > > > > GetParam() = > > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > > > after: > > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > > total) > > > > > > > > [--] Global test environment tear-down > > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > > [ PASSED ] 1 test. > > > > > > > > Signed-off-by: Xiang, Haihao > > > > > > This looks good to me. > > > > > > Add: Reviewed-by: Zhao Yakui > > > > > > Getting a core dump although the test is now passing. We'll need > > to > > debug further. > > > > I don't get any core dump on my SKL... And the test passes for me > with > this patch. Are you running the test in isolation or with the entire > suite? > If with the entire suite, does the core dump occur during this test > case or > another? > > I've noticed that I occasionally get a "bus error" with the > Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without > this patch. Perhaps this is what you're encountering? I'm consistently seeing this on a SKL system. It is also quite slow for execution. Actually tested this on my Arch sytem with Kernel 4.7 and the older LTS 4.4. Same bus error and slow execution performance. We need to isolate the root cause here because I suspect this is what Haihao has also been seeing. Takes nearly a minute on one system and far less time on an Ubuntu system with the same kernel and essentially the same SKL SKU. Sean > > U. Artie > > > Sean > > > > > > > > Thanks > > > Yakui > > > > > > > --- > > > > src/gen8_post_processing.c | 56 > > > > +- > > > > src/shaders/post_processing/gen8/Makefile.am | 2 + > > > > .../gen8/PL2_media_read_buf0123.g8a| 65 > > > > + > > > > .../gen8/PL3_media_read_buf0123.g8a| 68 > > > > ++ > > > > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > > > > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > > > > ++ > > > > src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + > > > > src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 > > > > ++ > > > > src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + > > > > src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 > > > > +++ > > > > src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- > > > > src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 > > > > +++ > > > > src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 > > > > ++ > > > > src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 > > > >
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
> -Original Message- > From: Libva [mailto:libva-boun...@lists.freedesktop.org] On Behalf Of Sean V > Kelley > Sent: Friday, October 14, 2016 11:44 AM > To: Zhao, Yakui ; Xiang, Haihao > Cc: libva@lists.freedesktop.org > Subject: Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if > possible on Gen8+ > > On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > > AVS can't gurantee bit-match for a large surface. This fixes the > > > failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. > > > > > > before: > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) > > > > > > [--] Global test environment tear-down > > > [==] 1 test from 1 test case ran. (9361 ms total) > > > [ PASSED ] 0 tests. > > > [ FAILED ] 1 test, listed below: > > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > > > after: > > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > > total) > > > > > > [--] Global test environment tear-down > > > [==] 1 test from 1 test case ran. (15365 ms total) > > > [ PASSED ] 1 test. > > > > > > Signed-off-by: Xiang, Haihao > > > > This looks good to me. > > > > Add: Reviewed-by: Zhao Yakui > > > Getting a core dump although the test is now passing. We'll need to > debug further. > I don't get any core dump on my SKL... And the test passes for me with this patch. Are you running the test in isolation or with the entire suite? If with the entire suite, does the core dump occur during this test case or another? I've noticed that I occasionally get a "bus error" with the Big/JPEGEncodeInputTest.* test cases (i.e. 8192x8192) even without this patch. Perhaps this is what you're encountering? U. Artie > Sean > > > > > Thanks > > Yakui > > > > > --- > > > src/gen8_post_processing.c | 56 > > > +- > > > src/shaders/post_processing/gen8/Makefile.am | 2 + > > > .../gen8/PL2_media_read_buf0123.g8a| 65 > > > + > > > .../gen8/PL3_media_read_buf0123.g8a| 68 > > > ++ > > > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > > > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > > > ++ > > > src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + > > > src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 > > > ++ > > > src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + > > > src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 > > > +++ > > > src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- > > > src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 > > > +++ > > > src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 > > > ++ > > > src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 > > > ++ > > > src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 > > > +++ > > > src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 > > > +++ > > > 16 files changed, 563 insertions(+), 2 deletions(-) > > > create mode 100644 > > > src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a > > > create mode 100644 > > > src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a > > > > > > diff --git a/src/gen8_post_processing.c > > > b/src/gen8_post_processing.c > > > index 375bbe0..687cedc 100644 > > > --- a/src/gen8_post_processing.c > > > +++ b/src/gen8_post_processing.c > > > @@ -630,6 +630,31 @@ > > > gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct > > > i965_post_proc > > > SURFACE_FORMAT_R8_UNORM, > > > 0, > > > base_index + 2); > > > } > > >
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On Fri, 2016-10-14 at 08:37 +0800, Zhao Yakui wrote: > On 10/13/2016 03:07 AM, Xiang, Haihao wrote: > > AVS can't gurantee bit-match for a large surface. This fixes the > > failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. > > > > before: > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) > > [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) > > > > [--] Global test environment tear-down > > [==] 1 test from 1 test case ran. (9361 ms total) > > [ PASSED ] 0 tests. > > [ FAILED ] 1 test, listed below: > > [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = > > (Fixed Size 7680x4320, 0x501176 pointing to "I420") > > > > after: > > [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) > > [--] 1 test from Common/JPEGEncodeInputTest (15250 ms > > total) > > > > [--] Global test environment tear-down > > [==] 1 test from 1 test case ran. (15365 ms total) > > [ PASSED ] 1 test. > > > > Signed-off-by: Xiang, Haihao > > This looks good to me. > > Add: Reviewed-by: Zhao Yakui Getting a core dump although the test is now passing. We'll need to debug further. Sean > > Thanks > Yakui > > > --- > > src/gen8_post_processing.c | 56 > > +- > > src/shaders/post_processing/gen8/Makefile.am | 2 + > > .../gen8/PL2_media_read_buf0123.g8a| 65 > > + > > .../gen8/PL3_media_read_buf0123.g8a| 68 > > ++ > > src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + > > src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 > > ++ > > src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + > > src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 > > ++ > > src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + > > src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 > > +++ > > src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- > > src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 > > +++ > > src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 > > ++ > > src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 > > ++ > > src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 > > +++ > > src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 > > +++ > > 16 files changed, 563 insertions(+), 2 deletions(-) > > create mode 100644 > > src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a > > create mode 100644 > > src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a > > > > diff --git a/src/gen8_post_processing.c > > b/src/gen8_post_processing.c > > index 375bbe0..687cedc 100644 > > --- a/src/gen8_post_processing.c > > +++ b/src/gen8_post_processing.c > > @@ -630,6 +630,31 @@ > > gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct > > i965_post_proc > > SURFACE_FORMAT_R8_UNORM, > > 0, > > base_index + 2); > > } > > + > > +gen8_pp_set_surface_state(ctx, pp_context, > > + bo, 0, > > + ALIGN(width[0], 4) / 4, > > height[0], pitch[0], > > + I965_SURFACEFORMAT_R8_UINT, > > + base_index + 3, 1); > > + > > +if (fourcc_info->num_planes == 2) { > > +gen8_pp_set_surface_state(ctx, pp_context, > > + bo, offset[1], > > + ALIGN(width[1], 2) / 2, > > height[1], pitch[1], > > + I965_SURFACEFORMAT_R8G8_SINT > > , > > + base_index + 4, 1); > > +} else if (fourcc_info->num_planes == 3) { > > +gen8_pp_set_surface_state(ctx, pp_context, > > + bo, offset[1], > > + ALIGN(width[1], 4) / 4, > > height[1], pitch[1], > > + I965_SURFACEFORMAT_R8_SINT, > > + base_index + 4, 1); > > +gen8_pp_set_surface_state(ctx, pp_context, > > + bo, offset[2], > > + ALIGN(width[2], 4) / 4, > > height[2], pitch[2], > > + I965_SURFACEFORMAT_R8_SINT, > > + base_index + 5, 1); > > +} > > } > > } > > > > @@ -788,6 +813,33 @@ gen8_pp_get_8tap_filter_mode(VADriverContextP > > ctx, > > return 3; > > } > > > > +static int > > +gen8_pp_kernel_use_media_read_msg(VADriverContextP ctx, > > + const struct i965_
Re: [Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
On 10/13/2016 03:07 AM, Xiang, Haihao wrote: AVS can't gurantee bit-match for a large surface. This fixes the failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. before: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (9361 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") after: [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) [--] 1 test from Common/JPEGEncodeInputTest (15250 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (15365 ms total) [ PASSED ] 1 test. Signed-off-by: Xiang, Haihao This looks good to me. Add: Reviewed-by: Zhao Yakui Thanks Yakui --- src/gen8_post_processing.c | 56 +- src/shaders/post_processing/gen8/Makefile.am | 2 + .../gen8/PL2_media_read_buf0123.g8a| 65 + .../gen8/PL3_media_read_buf0123.g8a| 68 ++ src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 ++ src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 ++ src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 +++ src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 +++ src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 ++ src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 ++ src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 +++ src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 +++ 16 files changed, 563 insertions(+), 2 deletions(-) create mode 100644 src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a create mode 100644 src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c index 375bbe0..687cedc 100644 --- a/src/gen8_post_processing.c +++ b/src/gen8_post_processing.c @@ -630,6 +630,31 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc SURFACE_FORMAT_R8_UNORM, 0, base_index + 2); } + +gen8_pp_set_surface_state(ctx, pp_context, + bo, 0, + ALIGN(width[0], 4) / 4, height[0], pitch[0], + I965_SURFACEFORMAT_R8_UINT, + base_index + 3, 1); + +if (fourcc_info->num_planes == 2) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 2) / 2, height[1], pitch[1], + I965_SURFACEFORMAT_R8G8_SINT, + base_index + 4, 1); +} else if (fourcc_info->num_planes == 3) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 4) / 4, height[1], pitch[1], + I965_SURFACEFORMAT_R8_SINT, + base_index + 4, 1); +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[2], + ALIGN(width[2], 4) / 4, height[2], pitch[2], + I965_SURFACEFORMAT_R8_SINT, + base_index + 5, 1); +} } } @@ -788,6 +813,33 @@ gen8_pp_get_8tap_filter_mode(VADriverContextP ctx, return 3; } +static int +gen8_pp_kernel_use_media_read_msg(VADriverContextP ctx, + const struct i965_surface *src_surface, + const VARectangle *src_rect, + const struct i965_surface *dst_surface, + const VARectangle *dst_rect) +{ +int src_fourcc = pp_get_surface_fourcc(ctx, src_surface); +int dst_fourcc = pp_get_surface_fourcc(ctx, dst_surface); +const i965_fourcc_info *src_fourcc_info = get_fourcc_info(src_fourcc); +const i965_fourcc_info *dst_fourcc_info = get_fourcc_info(dst_fourcc); + +if (!src_fourcc_info || +src_fourcc_info->subsampling != SUBSAMPLE_YUV420 || +
[Libva] [Libva-intel-driver][PATCH] Use Media Read message if possible on Gen8+
AVS can't gurantee bit-match for a large surface. This fixes the failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. before: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) [--] 1 test from Common/JPEGEncodeInputTest (9239 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (9361 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") after: [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) [--] 1 test from Common/JPEGEncodeInputTest (15250 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (15365 ms total) [ PASSED ] 1 test. Signed-off-by: Xiang, Haihao --- src/gen8_post_processing.c | 56 +- src/shaders/post_processing/gen8/Makefile.am | 2 + .../gen8/PL2_media_read_buf0123.g8a| 65 + .../gen8/PL3_media_read_buf0123.g8a| 68 ++ src/shaders/post_processing/gen8/pl2_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl2.g8b| 44 ++ src/shaders/post_processing/gen8/pl2_to_pl3.asm| 2 + src/shaders/post_processing/gen8/pl2_to_pl3.g8b| 44 ++ src/shaders/post_processing/gen8/pl3_to_pl2.asm| 2 + src/shaders/post_processing/gen8/pl3_to_pl2.g8b| 47 +++ src/shaders/post_processing/gen8/pl3_to_pl3.asm| 4 +- src/shaders/post_processing/gen8/pl3_to_pl3.g8b| 47 +++ src/shaders/post_processing/gen9/pl2_to_pl2.g9b| 44 ++ src/shaders/post_processing/gen9/pl2_to_pl3.g9b| 44 ++ src/shaders/post_processing/gen9/pl3_to_pl2.g9b| 47 +++ src/shaders/post_processing/gen9/pl3_to_pl3.g9b| 47 +++ 16 files changed, 563 insertions(+), 2 deletions(-) create mode 100644 src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a create mode 100644 src/shaders/post_processing/gen8/PL3_media_read_buf0123.g8a diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c index 375bbe0..687cedc 100644 --- a/src/gen8_post_processing.c +++ b/src/gen8_post_processing.c @@ -630,6 +630,31 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc SURFACE_FORMAT_R8_UNORM, 0, base_index + 2); } + +gen8_pp_set_surface_state(ctx, pp_context, + bo, 0, + ALIGN(width[0], 4) / 4, height[0], pitch[0], + I965_SURFACEFORMAT_R8_UINT, + base_index + 3, 1); + +if (fourcc_info->num_planes == 2) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 2) / 2, height[1], pitch[1], + I965_SURFACEFORMAT_R8G8_SINT, + base_index + 4, 1); +} else if (fourcc_info->num_planes == 3) { +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[1], + ALIGN(width[1], 4) / 4, height[1], pitch[1], + I965_SURFACEFORMAT_R8_SINT, + base_index + 4, 1); +gen8_pp_set_surface_state(ctx, pp_context, + bo, offset[2], + ALIGN(width[2], 4) / 4, height[2], pitch[2], + I965_SURFACEFORMAT_R8_SINT, + base_index + 5, 1); +} } } @@ -788,6 +813,33 @@ gen8_pp_get_8tap_filter_mode(VADriverContextP ctx, return 3; } +static int +gen8_pp_kernel_use_media_read_msg(VADriverContextP ctx, + const struct i965_surface *src_surface, + const VARectangle *src_rect, + const struct i965_surface *dst_surface, + const VARectangle *dst_rect) +{ +int src_fourcc = pp_get_surface_fourcc(ctx, src_surface); +int dst_fourcc = pp_get_surface_fourcc(ctx, dst_surface); +const i965_fourcc_info *src_fourcc_info = get_fourcc_info(src_fourcc); +const i965_fourcc_info *dst_fourcc_info = get_fourcc_info(dst_fourcc); + +if (!src_fourcc_info || +src_fourcc_info->subsampling != SUBSAMPLE_YUV420 || +!dst_fourcc_info || +dst_fourcc_info->subsampling != SUBSAMPLE_YUV420) +return 0; + +if (src_rect->x == dst_rect->x && +