GithubHelp home page GithubHelp logo

intel / intel-vaapi-driver Goto Github PK

View Code? Open in Web Editor NEW
300.0 58.0 126.0 8.36 MB

VA-API user mode driver for Intel GEN Graphics family

Home Page: https://01.org/linuxmedia

License: Other

Shell 0.01% C 86.45% C++ 6.78% Python 0.02% Assembly 6.26% Makefile 0.23% M4 0.03% Pawn 0.18% Meson 0.05%

intel-vaapi-driver's Introduction

Stories in Ready Build Status Coverity Scan Build Status

Intel-vaapi-driver Project

VA-API (Video Acceleration API) user mode driver for Intel GEN Graphics family

VA-API is an open-source library and API specification, which provides access to graphics hardware acceleration capabilities for video processing. It consists of a main library and driver-specific acceleration backends for each supported hardware vendor.

The current video driver backend provides a bridge to the GEN GPUs through the packaging of buffers and commands to be sent to the i915 driver for exercising both hardware and shader functionality for video decode, encode, and processing.

If you would like to contribute to intel-vaapi-driver, check our Contributing guide.

We also recommend taking a look at the 'janitorial' bugs in our list of open issues as these bugs can be solved without an extensive knowledge of intel-vaapi-driver.

We would love to help you start contributing!

The intel vaapi media development team can be reached via our mailing list and on IRC in channel ##intel-media on Freenode.

We also use #Slack and host VAAPI Media Slack Team. You can signup by submitting your email address to our Slack Team invite page.

Slack complements our other means of communication. Pick the one that works best for you!

intel-vaapi-driver's People

Contributors

carpalis avatar ceyusa avatar chivakker avatar cwhuang avatar dmitryermilov avatar dspmeng avatar evelikov avatar fhvwy avatar fritsch avatar gbeauchesne avatar haitaohuang avatar laureatian avatar lizhong1008 avatar llandwerlin-intel avatar mypopydev avatar pengche1 avatar pkerling avatar sebastinas avatar siewhoon avatar smuppava avatar sreerenjb avatar uartie avatar victortoso avatar xhaihao avatar xiaowei0916 avatar xuguangxin avatar yakuizhao avatar ysqcn avatar yujiankang avatar zzoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intel-vaapi-driver's Issues

Convince me you are using Android.mk

Because we are not testing Android build with it and yet the makefile is still there and we are rarely adding files to it...I'd honestly prefer to see that maintained at the packaging level of an android project. Anyway, why can't Android just cooperate and not require their own Makefile?

Begin

[Feature request] add support for YUV background colors

migrated from Bugzilla #99193
status ASSIGNED severity enhancement in component intel for ---
Reported in version unspecified on platform Other
Assigned to: haihao

On 2016-12-23 16:54:34 +0000, wrote:

When composing several sources into a single output surface, we can specify the color of the background pixels using VAProcPipelineParameterBuffer::output_background_color. Currently this background color must be a 32-bit ARGB value.

But when the output is a non-RGB format, such as NV12, it would be helpful if we could set the background color to a constant YUV value instead. This would be very useful in scenarios where the composite surface is used as the input to another processing stage that expects YUV (e.g. video encoding).

imported surface doesn't check the buffer layout

When the surface is created in driver internally, it will be allocated based on HW requirement.
But when the surface is imported through buffer_sharing, it doesn't check the layout. In such case maybe the buffer doesn't meet with the HW requirement.

So when the buffer is created through buffer_sharing, it will be better to add the check of layout requirement. For example: pitch.

Unittest Regression: AVCEncode/AVCEContextTest.QualityRange test cases

PR #33 caused the AVCEncode/AVCEContextTest.QualityRange unittests to regress in the test_i965_drv_video test suite on SKL+. Based on the nature of the change, this only appears to be an issue with the test cases being out of date now. That is, the default quality ranges for AVCE were changed in PR #33 but the test cases were not updated to reflect the new defaults. The good thing is that the test cases reveal that the new changes in the driver are working... just that the expected values are no longer correct for the tests. Please update these tests to fix this.

$ ./test/test_i965_drv_video --gtest_filter=AVCEncode/AVCEContextTest.QualityRange*

Note: Google Test filter = AVCEncode/AVCEContextTest.QualityRange*
[==========] Running 8 tests from 1 test case.
[----------] Global test environment set-up.
Seeded std::rand() with 1488480252.
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /opt/media/build/intel-vaapi-driver/src/.libs/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
[----------] 8 tests from AVCEncode/AVCEContextTest
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/0
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 2
To be equal to: hw_context->quality_range
      Which is: 8
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/0, where GetParam() = (VAProfileH264ConstrainedBaseline, VAEntrypointEncSlice) (0 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/1
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 8
To be equal to: hw_context->quality_range
      Which is: 2
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/1, where GetParam() = (VAProfileH264ConstrainedBaseline, VAEntrypointEncSliceLP) (0 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/2
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 2
To be equal to: hw_context->quality_range
      Which is: 8
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/2, where GetParam() = (VAProfileH264Main, VAEntrypointEncSlice) (1 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/3
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 8
To be equal to: hw_context->quality_range
      Which is: 2
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/3, where GetParam() = (VAProfileH264Main, VAEntrypointEncSliceLP) (0 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/4
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 2
To be equal to: hw_context->quality_range
      Which is: 8
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/4, where GetParam() = (VAProfileH264High, VAEntrypointEncSlice) (0 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/5
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 8
To be equal to: hw_context->quality_range
      Which is: 2
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/5, where GetParam() = (VAProfileH264High, VAEntrypointEncSliceLP) (0 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/6
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 1
To be equal to: hw_context->quality_range
      Which is: 8
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/6, where GetParam() = (VAProfileH264MultiviewHigh, VAEntrypointEncSlice) (1 ms)
[ RUN      ] AVCEncode/AVCEContextTest.QualityRange/7
i965_avce_context_test.cpp:240: Failure
      Expected: qranges.at(profile)
      Which is: 1
To be equal to: hw_context->quality_range
      Which is: 8
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/7, where GetParam() = (VAProfileH264StereoHigh, VAEntrypointEncSlice) (0 ms)
[----------] 8 tests from AVCEncode/AVCEContextTest (2 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (19 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 8 tests, listed below:
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/0, where GetParam() = (VAProfileH264ConstrainedBaseline, VAEntrypointEncSlice)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/1, where GetParam() = (VAProfileH264ConstrainedBaseline, VAEntrypointEncSliceLP)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/2, where GetParam() = (VAProfileH264Main, VAEntrypointEncSlice)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/3, where GetParam() = (VAProfileH264Main, VAEntrypointEncSliceLP)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/4, where GetParam() = (VAProfileH264High, VAEntrypointEncSlice)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/5, where GetParam() = (VAProfileH264High, VAEntrypointEncSliceLP)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/6, where GetParam() = (VAProfileH264MultiviewHigh, VAEntrypointEncSlice)
[  FAILED  ] AVCEncode/AVCEContextTest.QualityRange/7, where GetParam() = (VAProfileH264StereoHigh, VAEntrypointEncSlice)

Odd pkgconfig issue when enabling wayland, needs explicit handling for wayland-client

Getting occasional errors where wayland-client.h cannot be found when building intel-vaapi-driver.

Distro: OpenSuse Tumbleweed

Build and install libva locally with wayland support

Build and install intel-vaapi-driver with wayland support

Consistently get this error:

CC libi965_drv_video_la-i965_output_wayland.lo
In file included from i965_output_wayland.c:30:0:
/usr/include/va/va_backend_wayland.h:31:28: fatal error: wayland-client.h: No such file or directory
#include <wayland-client.h>

Of course I have all the deps installed. It's like it is only looking in /usr/include rather than also looking in /usr/include/wayland

A simple work around is to add -I/usr/include/wayland to driver_cflags...

But that should not be necessary because the pkgconfig is clearly present and adds /usr/include/wayland to the includdir search path which in turn is added to wayland-client cflags.

I don't have this problem on Arch so is it something about OpenSuse.

VA_FILTER_SCALING_HQ downscaling from 4096x2160 to 176x144 only has a part of the source image

migrated from Bugzilla #96434
status NEEDINFO severity major in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: ykzhao

Original attachment names and IDs:

On 2016-06-08 05:19:33 +0000, joojler wrote:

Created attachment 124398
YUV data before and after scaling

libva: 0.39
intel-driver: 1.6.2

VA_FILTER_SCALING_HQ NV12 downscaling from 4096x2160 to 176x144 only has a part of the source image. Looks like AVS scaling has some limitation for larger ratio.

Reproduce on both Braswell N3150 and Skylake Core i5-6600 with libyami VPP test application. Please refer to the attached YUV file before and after scaling to get exact phenomenon.

Steps:
$ git config --global http.sslverify false
$ git clone https://github.com/01org/libyami
$ ./autogen.sh --prefix=/usr �enable-avformat=yes --enable-tests=yes --enable-debu=yes --enable-dmabuf=yes
$ cd tests
$ ./yamivpp 4096x2160_NV12.nv12 output_176x144.nv12

On 2016-12-14 01:31:52 +0000, joojler wrote:

Created attachment 128457
attachment-2938-0.html

Thanks for your mail. I'm in business travel from ww51.1~ww51.4. Email response will be slow, please call me for urgent issues. 18500233196

On 2016-12-15 04:43:52 +0000, ykzhao wrote:

Hi, Jooler
Will you please try the latest driver code and see whether it works for you?
The driver adds the new implementation for NV12 scaling.

Thanks

[IVB/BYT/BSW] Macroblocking artifact seen on a VC1 video file

migrated from Bugzilla #68492
status REOPENED severity major in component intel for ---
Reported in version unspecified on platform All
Assigned to: Focus.Luo

On 2013-08-23 23:01:04 +0000, wrote:

Macroblocking artifacts seen during playback of a WMV file with VC1 video using vaapi-decode. The macroblocks can be seen in the first 3-4 seconds of the clip. Also artifacts are more prominent around 02:31 timestamp in the playback.

Instructions to reproduce:

File:
http://download.microsoft.com/download/9/b/4/9b4535e2-f908-4785-97a5-ef360405e391/Elephant%27s%20Dream%20720p%202M.wmv

Playback command:
gst-launch-0.10 filesrc location=elephant_dream.wmv ! asfdemux ! vaapidecode ! queue ! vaapisink

Platform:
reproduced on Ivybridge 64-bit and Baytrail-M 32-bit with 13.10 Ubuntu and 3.11 kernel.

On 2013-08-23 23:03:05 +0000, wrote:

These macroblocking artifacts are not seen when playing the same file with software codec, or with windows media player on Windows.

On 2014-10-01 15:58:39 +0000, Kevin Mitchell wrote:

*** Bug 84552 has been marked as a duplicate of this bug. ***

On 2015-11-23 14:28:31 +0000, haihao wrote:

We fixed some VC1 related issues this year. Could you try the latest driver if you still experience this issue ?

On 2016-01-12 04:48:16 +0000, Kevin Mitchell wrote:

Problem persists unchanged for me with libva and intel-driver git master.

On 2016-02-05 20:04:27 +0000, wrote:

Gentlemen,

Seems like I'm having the same problem on ASRock Beebox Intel Celeron N3000. The file is coded VC-1, 1080p24. When I play the file with VAAPI enabled, I get the square artifacts on the screen. I experienced this problem with vaapi intel-driver 1.6.1 and 1.6.2. If VAAPI is disabled, the problem disappears, but the CPU load is too much.

You may get the file here: https://docs.google.com/uc?id=0B9X316MN6HHvSlNWb1ZhSGo2X2M&export=download (Second 3 till the end).

Reproduced on Braswell 64-bit, with OpenELEC 6.0.0, Linux Mint 17, kernel 4.3.3, vaapi intel-driver 1.6.1 and 1.6.2.

On 2016-12-07 02:50:26 +0000, haihao wrote:

Hi Focus,

Can you reproduce this issue on SKL or KBL?

Thanks
Haihao

VDENC fails to export the supported BRC on BXT/KBL

The VDENC CBR BRC depends on the Huc. But unfortunately the driver doesn't export the BRC mode based on the detection of Huc attribute.
In such case the user-space middleware checks that only CQP is supported on BXT/KBL.

Bus error (core dumped) 8192x8192 JPEG decode

migrated from Bugzilla #98311
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform Other
Assigned to: haihao

Original attachment names and IDs:

On 2016-10-18 18:56:01 +0000, U. Artie Eoff wrote:

Decoding a 8192x8192 resolution JPEG image sometimes triggers a SIGBUS bus error (core dump).

This can be reproduced with ./test_i965_drv_video --gtest_filter=Big/JPEGEncodeInputTest.Full/2 (i.e. 8192x8192 UYVY test case) sometimes.

Dmesg does not report any errors even with drm.debug=0xe kernel parameter.

See attachments for some gdb trace details.

Environment

SKL (Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz)
Kernel 4.5.0-302.fc24.x86_64
drm (master) libdrm-2.4.68-0-gfc09c5ab8424
mesa (master) heads/master-0-ga1e49be71360
libva (master) heads/master-0-g3b7e4999950a
intel-driver (master) heads/master-0-ge748bc7f0565

On 2016-10-18 18:57:00 +0000, U. Artie Eoff wrote:

Comment on attachment 127383
gdb trace w/drm_intel_bufmgr debug on

Starting program: /home/uartie/Work/workspace/media/build/intel-driver/test/test_i965_drv_video --gtest_filter=Big/JPEGEncodeInputTest.Full/2
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.23.1-5.fc24.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Note: Google Test filter = Big/JPEGEncodeInputTest.Full/2
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /home/uartie/Work/workspace/media/build/intel-driver/src/.libs/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
bo_create: buf 1 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=0, open=1, limit=-1
bo_map: 1 (batch buffer), map_count=1
bo_map: 1 (batch buffer) -> 0x7ffff7f51000
bo_create: buf 2 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=0, open=2, limit=-1
bo_map: 2 (batch buffer), map_count=1
bo_map: 2 (batch buffer) -> 0x7ffff7ed1000
bo_create: buf 3 (kernel shader) 65328b
drm_intel_gem_bo_purge_vma_cache: cached=0, open=3, limit=-1
bo_map: 3 (kernel shader), map_count=1
bo_map: 3 (kernel shader) -> 0x7ffff7fe6000
drm_intel_gem_bo_purge_vma_cache: cached=1, open=2, limit=-1
bo_create: buf 4 (kernel shader) 5696b
drm_intel_gem_bo_purge_vma_cache: cached=1, open=3, limit=-1
bo_map: 4 (kernel shader), map_count=1
bo_map: 4 (kernel shader) -> 0x7ffff7fe4000
drm_intel_gem_bo_purge_vma_cache: cached=2, open=2, limit=-1
libva info: va_openDriver() returns 0
[----------] 1 test from Big/JPEGEncodeInputTest
[ RUN ] Big/JPEGEncodeInputTest.Full/2
bo_create: buf 5 (vaapi surface) 134217728b
bo_create: buf 6 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=2, open=3, limit=-1
bo_map: 6 (batch buffer), map_count=1
bo_map: 6 (batch buffer) -> 0x7ffff7e51000
bo_create: buf 7 (kernel shader) 1744b
drm_intel_gem_bo_purge_vma_cache: cached=2, open=4, limit=-1
bo_map: 7 (kernel shader), map_count=1
bo_map: 7 (kernel shader) -> 0x7ffff7fe3000
drm_intel_gem_bo_purge_vma_cache: cached=3, open=3, limit=-1
bo_create: buf 8 (Buffer) 268460032b
drm_intel_gem_bo_purge_vma_cache: cached=3, open=4, limit=-1
bo_map: 8 (Buffer), map_count=1
bo_map: 8 (Buffer) -> 0x7fffdde7c000
drm_intel_gem_bo_purge_vma_cache: cached=4, open=3, limit=-1
drm_intel_gem_bo_purge_vma_cache: cached=4, open=4, limit=-1
bo_map_gtt: mmap 5 (vaapi surface), map_count=1
bo_map_gtt: 5 (vaapi surface) -> 0x7fffd5e7c000
drm_intel_gem_bo_purge_vma_cache: cached=5, open=3, limit=-1
bo_create: buf 9 (Buffer) 32768b
bo_create: buf 10 (Buffer) 4194304b
bo_create: buf 11 (Buffer) 131072b
bo_create: buf 12 (Buffer) 65536b
bo_create: buf 13 (batch buffer) 4194304b
drm_intel_gem_bo_purge_vma_cache: cached=5, open=4, limit=-1
bo_map: 13 (batch buffer), map_count=1
bo_map: 13 (batch buffer) -> 0x7fffd5a7c000
bo_create: buf 14 (surface state & binding table) 2312b
bo_create: buf 15 (surface state & binding table) 1344b
drm_intel_gem_bo_purge_vma_cache: cached=4, open=5, limit=-1
bo_map: 8 (Buffer) -> 0x7fffdde7c000
drm_intel_gem_bo_purge_vma_cache: cached=5, open=4, limit=-1
drm_intel_gem_bo_purge_vma_cache: cached=6, open=3, limit=-1
BO 5 (vaapi surface) migrated: 0x00000000 00000000 -> 0x00000000 f7fff000
BO 10 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 f7bff000
BO 9 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 f7bf7000
BO 11 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 f7bd7000
BO 8 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 e7bd1000
BO 12 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 e7bc1000
BO 6 (batch buffer) migrated: 0x00000000 00000000 -> 0x00000000 e7b41000
0: 5 (vaapi surface)
1: 10 (Buffer)
2: 9 (Buffer)
3: 11 (Buffer)
4: 8 (Buffer)
5: 12 (Buffer)
6: 6 (batch buffer)@0x00000000 00000058 -> 5 (vaapi surface)@0x00000000 f7fff000 + 0x00000000
6: 6 (batch buffer)@0x00000000 00000064 -> 10 (Buffer)@0x00000000 f7bff000 + 0x00000000
6: 6 (batch buffer)@0x00000000 00000070 -> 9 (Buffer)@0x00000000 f7bf7000 + 0x00000000
6: 6 (batch buffer)@0x00000000 0000007c -> 11 (Buffer)@0x00000000 f7bd7000 + 0x00000000
6: 6 (batch buffer)@0x00000000 0000010c -> 10 (Buffer)@0x00000000 f7bff000 + 0x00000000
6: 6 (batch buffer)@0x00000000 00000184 -> 8 (Buffer)@0x00000000 e7bd1000 + 0x00001000
6: 6 (batch buffer)@0x00000000 00000190 -> 8 (Buffer)@0x00000000 e7bd1000 + 0x10005000
6: 6 (batch buffer)@0x00000000 0000019c -> 12 (Buffer)@0x00000000 e7bc1000 + 0x00000000
bo_unreference final: 6 (batch buffer)
bo_create: buf 16 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=6, open=4, limit=-1
bo_map: 16 (batch buffer), map_count=1
bo_map: 16 (batch buffer) -> 0x7fffd59fc000
drm_intel_gem_bo_purge_vma_cache: cached=5, open=5, limit=-1
bo_map: 8 (Buffer) -> 0x7fffdde7c000
drm_intel_gem_bo_purge_vma_cache: cached=6, open=4, limit=-1
bo_create: buf 6 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=5, open=5, limit=-1
bo_map: 6 (batch buffer) -> 0x7ffff7e51000
bo_create: buf 17 (Buffer) 207060624b
bo_create: buf 18 (vaapi surface) 201326592b
drm_intel_gem_bo_purge_vma_cache: cached=6, open=4, limit=-1
BO 18 (vaapi surface) migrated: 0x00000000 00000000 -> 0x00000000 dbb41000
BO 17 (Buffer) migrated: 0x00000000 00000000 -> 0x00000000 cf5c9000
0: 18 (vaapi surface)
1: 17 (Buffer)
2: 6 (batch buffer)@0x00000000 00000040 -> 18 (vaapi surface)@0x00000000 dbb41000 + 0x00000000
2: 6 (batch buffer)@0x00000000 00000218 -> 17 (Buffer)@0x00000000 cf5c9000 + 0x00000000
2: 6 (batch buffer)@0x00000000 00000428 -> 17 (Buffer)@0x00000000 cf5c9000 + 0x00000000
bo_unreference final: 6 (batch buffer)
bo_create: buf 19 (batch buffer) 524288b
drm_intel_gem_bo_purge_vma_cache: cached=6, open=5, limit=-1
bo_map: 19 (batch buffer), map_count=1
bo_map: 19 (batch buffer) -> 0x7fffb4e8b000
drm_intel_gem_bo_purge_vma_cache: cached=6, open=6, limit=-1
bo_map_gtt: mmap 18 (vaapi surface), map_count=1
bo_map_gtt: 18 (vaapi surface) -> 0x7fffa8e8b000

Program received signal SIGBUS, Bus error.
0x000000000044eb58 in JPEG::Encode::JPEGEncodeInputTest::VerifyOutput()::{lambda(unsigned char const&, unsigned char const&)# 1}::operator()(unsigned char const&, unsigned char const&) const (__closure=0x7fffffffc5b0, a=@0x7fffa8e8b000: , b=@0x7fffc1483010: 64 '@') at i965_jpeg_encode_test.cpp:404
404 return std::abs(int(a)-int(b)) <= 2;
Missing separate debuginfos, use: dnf debuginfo-install libgcc-6.1.1-2.fc24.x86_64 libpciaccess-0.13.4-3.fc24.x86_64 libstdc++-6.1.1-2.fc24.x86_64

bt full

0 0x000000000044eb58 in JPEG::Encode::JPEGEncodeInputTest::VerifyOutput()::{lambda(unsigned char const&, unsigned char const&)# 1}::operator()(unsigned char const&, unsigned char const&) const (__closure=0x7fffffffc5b0, a=@0x7fffa8e8b000: , b=@0x7fffc1483010: 64 '@') at i965_jpeg_encode_test.cpp:404

No locals.

1 0x0000000000452345 in std::equal<unsigned char const*, unsigned char const*, JPEG::Encode::JPEGEncodeInputTest::VerifyOutput()::{lambda(unsigned char const&, unsigned char const&)# 1}>(unsigned char const*, JPEG::Encode::JPEGEncodeInputTest::VerifyOutput()::{lambda(unsigned char const&, unsigned char const&)# 1}, unsigned char const*, JPEG::Encode::JPEGEncodeInputTest::VerifyOutput()::{lambda(unsigned char const&, unsigned char const&)# 1}) (__first1=0x7fffa8e8b000 <error: Cannot access memory at address 0x7fffa8e8b000>, __last1=0x7fffa8e8d000 <error: Cannot access memory at address 0x7fffa8e8d000>, _first2=0x7fffc1483010 "@,%\247\272\t\030\347]\203v\221\322J\220/Ϋ\031\223TN\215�\350j.\262\364r\261\351\331v\313pG\004\356:q\267\270\337}\315`}D\364�N\224\003\026\333\350\234%\366v|\243;\340\031\226\366k'w\213)0\372\237X\345\326V\222\256k\216<?i\343\352\361\250\246\003^+\bY\315\337\302.H\360V��\302n\272\363\320[A\035\024b\206Qqn\274\231\017\025v.Rk\203\250-\022\061\257\310\026\314H*\037\204\aB\245\036\334I\243\306V\352D+\305-v&JG\213I%\212\004\311\003f\370\215\367r\266\254\243p\230\237RQ\371\273�\276\371\347\336\300\070\230\356\375", <incomplete sequence \302>, __binary_pred=...) at /usr/include/c++/6.1.1/bits/stl_algobase.h:1083

No locals.

2 0x00000000004507a3 in JPEG::Encode::JPEGEncodeInputTest::VerifyOutput (this=0x9cd820) at i965_jpeg_encode_test.cpp:415

    gtest_ar_ = {
      success_ = 160, 
      message_ = {
        ptr_ = 0x7fffffffc7c8
      }
    }
    r = 0
    w = 8192
    h = 8192
    source = 0x7fffc1483010 "@,%\247\272\t\030\347]\203v\221\322J\220/Ϋ\031\223TN\215�\350j.\262\364r\261\351\331v\313pG\004\356:q\267\270\337}\315`}D\364�N\224\003\026\333\350\234%\366v|\243;\340\031\226\366k'w\213)0\372\237X\345\326V\222\256k\216<?i\343\352\361\250\246\003^+\bY\315\337\302.H\360V��\302n\272\363\320[A\035\024b\206Qqn\274\231\017\025v.Rk\203\250-\022\061\257\310\026\314H*\037\204\aB\245\036\334I\243_\306V\352D+\305-v&JG\213I%\212\004\311\003f\370\215\367r\266\254\243p\230\237RQ\371\273�\276\371\347\336\300\070\230\356\375", <incomplete sequence \302>
    result = 0x7fffa8e8b000 <error: Cannot access memory at address 0x7fffa8e8b000>
    i = 0
    image = {
      image_id = 167772160, 
      format = {
        fourcc = 1211249204, 
        byte_order = 1, 
        bits_per_pixel = 16, 
        depth = 0, 
        red_mask = 0, 
        green_mask = 0, 
        blue_mask = 0, 
        alpha_mask = 0
      }, 
      buf = 134217740, 
      width = 8192, 
      height = 8192, 
      data_size = 201326592, 
      num_planes = 3, 
      pitches = {[0] = 8192, [1] = 8192, [2] = 8192}, 
      offsets = {[0] = 0, [1] = 67108864, [2] = 134217728}, 
      num_palette_entries = 0, 
      entry_bytes = 0, 
      component_order = "\000\000\000"
    }
    data = 0x7fffa8e8b000 <error: Cannot access memory at address 0x7fffa8e8b000>
    isClose = {<No data fields>}
    oconfig = 16777217
    ocontext = 33554433
    buffers = std::vector of length 5, capacity 8 = {[0] = 134217735, [1] = 134217736, [2] = 134217737, [3] = 134217738, [4] = 134217739}
    osurfaces = std::vector of length 1, capacity 1 = {[0] = 67108865}
    attribs = std::vector of length 1, capacity 1 = {[0] = {
        type = VAConfigAttribRTFormat, 
        value = 2
      }}
    expect = std::shared_ptr (count 1, weak 1) 0x9cfc80
    pd = std::shared_ptr (count 1, weak 0) 0x9cff80

3 0x00000000004485e0 in JPEG::Encode::JPEGEncodeInputTest_Full_Test::TestBody (this=0x9cd820) at i965_jpeg_encode_test.cpp:457

    i965 = 0x9c2900

4 0x00000000005645be in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x9cd820, method=&virtual testing::Test::TestBody(), location=0x6e1bdb "the test body") at ../test/gtest/src/gtest.cc:2402

No locals.

5 0x000000000055f350 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x9cd820, method=&virtual testing::Test::TestBody(), location=0x6e1bdb "the test body") at ../test/gtest/src/gtest.cc:2438

No locals.

6 0x000000000054564c in testing::Test::Run (this=0x9cd820) at ../test/gtest/src/gtest.cc:2475

    impl = 0x954e00

7 0x0000000000545ebc in testing::TestInfo::Run (this=0x990260) at ../test/gtest/src/gtest.cc:2656

    impl = 0x954e00
    repeater = 0x955000
    start = 1476816869608
    test = 0x9cd820

8 0x00000000005464fd in testing::TestCase::Run (this=0x9802d0) at ../test/gtest/src/gtest.cc:2774

    i = 2
    impl = 0x954e00
    repeater = 0x955000
    start = 1476816869608

9 0x000000000054d07b in testing::internal::UnitTestImpl::RunAllTests (this=0x954e00) at ../test/gtest/src/gtest.cc:4649

    test_index = 12
    start = 1476816869589
    i = 0
    in_subprocess_for_death_test = false
    should_shard = false
    has_tests_to_run = true
    failed = false
    repeater = 0x955000
    repeat = 1
    forever = false

10 0x000000000056536f in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x954e00, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x54cdb8 testing::internal::UnitTestImpl::RunAllTests(), location=0x6e2418 "auxiliary test code (environments or event listeners)") at ../test/gtest/src/gtest.cc:2402

No locals.

11 0x000000000055ff58 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x954e00, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x54cdb8 testing::internal::UnitTestImpl::RunAllTests(), location=0x6e2418 "auxiliary test code (environments or event listeners)") at ../test/gtest/src/gtest.cc:2438

No locals.

12 0x000000000054bd7d in testing::UnitTest::Run (this=0x9423e0 testing::UnitTest::GetInstance()::instance) at ../test/gtest/src/gtest.cc:4257

    in_death_test_child_process = false
    premature_exit_file = {
      premature_exit_filepath_ = 0x0
    }

13 0x0000000000468fc5 in RUN_ALL_TESTS () at ../test/gtest/include/gtest/gtest.h:2233

No locals.

14 0x0000000000468f3a in main (argc=1, argv=0x7fffffffd808) at test_main.cpp:35

No locals.

On 2016-10-18 18:58:42 +0000, U. Artie Eoff wrote:

Created attachment 127384
gdb trace with drm bufmgr debug on

On 2016-10-18 19:02:25 +0000, U. Artie Eoff wrote:

Created attachment 127388
additional gdb data

On 2016-10-18 19:08:04 +0000, U. Artie Eoff wrote:

The bus error is triggered when the test tries to access the data pointer returned by i965_MapBuffer of the derived image.

On 2016-10-18 21:07:58 +0000, U. Artie Eoff wrote:

AFAICT, we are failing to read from the drm mmap'd region... mmap documentation says:

   Use of a mapped region can result in these signals:

   SIGSEGV
          Attempted write into a region mapped as read-only.

   SIGBUS Attempted access to a portion of the buffer that does not
          correspond to the file (for example, beyond the end of the
          file, including the case where another process has truncated
          the file).

If I'm reading it correctly and since the mmap call does not fail, something must have truncated it before we try to use it? But what/how?

On 2016-10-19 13:52:09 +0000, haihao wrote:

Is the buffer tiled?

On 2016-10-19 13:55:35 +0000, U. Artie Eoff wrote:

(In reply to haihao from comment # 6)

Is the buffer tiled?

dri_bo_get_tiling in i965_MapBuffer returns 2 for tiling

On 2016-10-19 14:24:20 +0000, U. Artie Eoff wrote:

(In reply to U. Artie Eoff from comment # 7)

(In reply to haihao from comment # 6)

Is the buffer tiled?

dri_bo_get_tiling in i965_MapBuffer returns 2 for tiling

Furthermore, the returned [mmap'd] buffer comes from intel_bufmgr_gem.c:map_gtt(...)

On 2016-10-20 16:20:27 +0000, U. Artie Eoff wrote:

When I execute from within a graphical environment, I always encounter this issue. I am using gnome for my graphical env.

However, if I vt-switch into a non-graphical console, I do not encounter this issue when executing from there.

On 2016-10-24 04:56:12 +0000, haihao wrote:

I can't reproduce it in the graphics env. I ran the test case 100 times without any issue.

On 2016-10-24 05:10:38 +0000, haihao wrote:

Please you check the aperture size in your system

$> sudo cat /sys/kernel/debug/dri/0/i915_gem_objects | grep gtt

map_gtt() uses the aperture space and a tiled 8192x8192 NV12 surface is 96M. I guess your system has a small aperture space.

On 2016-10-24 05:12:36 +0000, haihao wrote:

Or you can try a new linux kernel, I am using 4.8.0-rc8+.

On 2016-10-24 17:54:27 +0000, U. Artie Eoff wrote:

$ sudo cat /sys/kernel/debug/dri/0/i915_gem_objects | grep gtt
264 [57] objects, 35753984 [35753984] bytes in gtt
4294967296 [268435456] gtt total

On 2016-10-24 19:07:46 +0000, U. Artie Eoff wrote:

This is the state of i915_gem_objects when the SIGBUS occurs on my system...

518 objects, 1447014400 bytes
311 [26] objects, 168669184 [168669184] bytes in gtt
0 [0] active objects, 0 [0] bytes
26 [26] inactive objects, 168669184 [168669184] bytes
15 unbound objects, 50593792 bytes
19 purgeable objects, 19304448 bytes
2 pinned mappable objects, 16683008 bytes
4 fault mappable objects, 134746112 bytes
4294967296 [268435456] gtt total

systemd-logind: 56 objects, 105865216 bytes (0 active, 88657920 inactive, 524288 global, 67125248 shared, 1130496 unbound)
Xorg: 404 objects, 263962624 bytes (0 active, 150650880 inactive, 4096 global, 67121152 shared, 74235904 unbound)
test_i965_drv_v: 48 objects, 1135419392 bytes (0 active, 1129111552 inactive, 134217728 global, 0 shared, 0 unbound)

On 2016-10-25 04:44:18 +0000, haihao wrote:

I can always reproduce this issue with kernel 4.5.0-rc4+ with/without graphical env. The issue is gone after switching kernel to 4.8.0-rc8+.

Could you try a recent kernel to see the issue is still there? I will mark the bug as resolved if the test case works fine with a recent kernel.

On 2016-10-25 20:44:07 +0000, U. Artie Eoff wrote:

I tried kernel 4.8.0-rc8 and the issue is still there. I also encounter this issue with and without a graphical session on this kernel.

On 2016-10-25 23:07:35 +0000, Sean V Kelley wrote:

Yes, I was going to say I've been using 4.8 on Arch and the issue is always there.

Sean

On 2016-10-25 23:37:06 +0000, U. Artie Eoff wrote:

(In reply to Sean V Kelley from comment # 17)

Yes, I was going to say I've been using 4.8 on Arch and the issue is always
there.

Sean

My last result was from upstream kernel at tag v4.8-rc8, which is not v4.8-rc8+ as Haihao tested. @haihao, can you be more specific about which commit id you are on with v4.8-rc8+? @sean, is your kernel a 4.8 "final" or an "rc" release?

I'm trying 4.9.0-rc2+ (i.e. 9fe68cad6e74) right now, and so far I am not seeing the issue with this version after ~100 executions.

On 2016-10-26 00:45:23 +0000, haihao wrote:

I am using drm-intel-nightly

commit SHA: aab15c274da587bcab19376d2caa9d6626440335
Author: Jani Nikula [email protected]
Date: Mon Sep 26 15:11:53 2016 +0300

drm-intel-nightly: 2016y-09m-26d-12h-11m-33s UTC integration manifest

On 2016-10-26 06:46:19 +0000, Sean V Kelley wrote:

Created attachment 127549
attachment-31931-0.html

That�s all good and well, but for this testing you really should use a stable kernel. That�s what our customers are using.

Sean

On 25 DFómh 2016, at 17:45, [email protected] wrote:

Comment # 19 https://bugs.freedesktop.org/show_bug.cgi?id=98311#c19 on bug 98311 https://bugs.freedesktop.org/show_bug.cgi?id=98311 from haihao mailto:[email protected]
I am using drm-intel-nightly

commit SHA: aab15c274da587bcab19376d2caa9d6626440335
Author: Jani Nikula <[email protected] mailto:[email protected]>
Date: Mon Sep 26 15:11:53 2016 +0300

drm-intel-nightly: 2016y-09m-26d-12h-11m-33s UTC integration manifest

You are receiving this mail because:
You are the QA Contact for the bug.

On 2016-10-26 06:50:41 +0000, Sean V Kelley wrote:

Created attachment 127550
attachment-32256-0.html

I�d prefer not to see a chase-the-kernel-version and hope-it-goes-away, like to know the root cause. :-)

Arch�s kernel generally is tracking releases and not rcs. 4.8.4-1

And yes I do still see the issue.

https://www.archlinux.org/packages/core/x86_64/linux/ https://www.archlinux.org/packages/core/x86_64/linux/

Thanks,

Sean

On 25 DFómh 2016, at 16:37, [email protected] wrote:

Comment # 18 https://bugs.freedesktop.org/show_bug.cgi?id=98311#c18 on bug 98311 https://bugs.freedesktop.org/show_bug.cgi?id=98311 from U. Artie Eoff mailto:[email protected]
(In reply to Sean V Kelley from comment # 17 x-msg://6/show_bug.cgi?id=98311#c17)

Yes, I was going to say I've been using 4.8 on Arch and the issue is always
there.

Sean

My last result was from upstream kernel at tag v4.8-rc8, which is not v4.8-rc8+
as Haihao tested. @haihao, can you be more specific about which commit id you
are on with v4.8-rc8+? @sean, is your kernel a 4.8 "final" or an "rc" release?

I'm trying 4.9.0-rc2+ (i.e. 9fe68cad6e74) right now, and so far I am not seeing
the issue with this version after ~100 executions.

You are receiving this mail because:
You are the QA Contact for the bug.

On 2016-10-26 08:52:49 +0000, haihao wrote:

It is hard for us too find the root cause if we don't look into the i915. If we want to know the root cause, I think a better way is find a good commit and a bad commit, then do bisect.

In addition, we can make sure it is not a driver issue if the test case works well with a recent kernel.

On 2016-10-26 15:42:43 +0000, U. Artie Eoff wrote:

I continuously ran the test overnight with kernel.org 4.9.0-rc2+ (i.e. 9fe68cad6e74) and have not encountered this issue.

Yes, I agree. We should understand the root-cause even if it's kernel related and not a driver issue. That way, if this issue shows up again in the future, we can save time by investigating the direct cause. So far, it appears kernel related. Or maybe it's a compatibility issue with userspace libdrm and kernel version?

I am not sure what the chronological relationship is between drm-intel-nightly and kernel.org. So if you're going to bisect i915, use kernel.org since there is a good and bad there. Unfortunately, 4.8.4 is the latest mainstream stable release which Sean confirmed is bad. And other distros are on slightly older versions. So if we can understand the cause, perhaps we can come up with a driver solution to WA it for now.

On 2016-11-02 17:32:44 +0000, Sean V Kelley wrote:

Yes, the most important thing is that we need to be able to isolate the root cause as we can hardly promote the framework if we don't know the cause for the errors. It is good to bisect the kernel and map that to libdrm versions. I get very wary of using non stable kernels in this testing. Try to start from the Quarterly release BKC.

Sean

H.264 decoder crashes "couldn't find associated picture parameter set with id: 0"

capture.zip

Using gstreamer pipeline:

gst-launch-1.0 filesrc location=./streams/62508/WGN_VU_2016-11-30_09.00.53.ts ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=10000000000 ! tsdemux name=dmx dmx. ! h264parse ! vaapidecode ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=10000000000 ! vaapisink

On a specific content which is provided as an attachment. The provided capture is decoded flawlessly using other software decoders, while it leads to the following errors and crash of the vaapi decoder:

0:00:00.782582616 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 882
0:00:00.782670450 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 883
0:00:00.785492921 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 888
0:00:00.785554710 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 889
0:00:00.791317991 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 886
0:00:00.791373724 19934 0xf92680 ERROR vaapi gstvaapidecoder_h264.c:2648:find_short_term_reference: found no short-term reference picture with PicNum = 887
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
0:00:03.586209079 19934 0xf92680 WARN codecparsers_h264 gsth264parser.c:2212:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0
0:00:03.586248940 19934 0xf92680 ERROR vaapidecode gstvaapidecode.c:867:gst_vaapidecode_parse_frame: parse error -1
0:00:03.586550842 19934 0xf92680 WARN codecparsers_h264 gsth264parser.c:2212:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0
0:00:03.586580271 19934 0xf92680 ERROR vaapidecode gstvaapidecode.c:867:gst_vaapidecode_parse_frame: parse error -1
0:00:03.586602723 19934 0xf92680 WARN codecparsers_h264 gsth264parser.c:2212:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0
0:00:03.586615079 19934 0xf92680 ERROR vaapidecode gstvaapidecode.c:867:gst_vaapidecode_parse_frame: parse error -1

MADI on at least IVB and SNB assumes that reference surface is NV12, even when it's not (e.g. when feeding YUY2 surfaces from software to VPP)

migrated from Bugzilla #79377
status NEEDINFO severity normal in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: PengChen

Original attachment names and IDs:

On 2014-05-28 16:43:30 +0000, Simon Farnsworth wrote:

With VA-API intel-driver 1.3.1 on IVB, or on SNB with the SNB MADI backport applied, I see issues when I upload YUY2 surfaces from a V4L2 capture card to VA-API for deinterlacing using gstreamer-vaapi version 0.5.8 with the patch from https://bugzilla.gnome.org/show_bug.cgi?id=726361 applied to enable me to force deinterlacing.

My pipeline looks like:

gst-launch-1.0 v4l2src ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-adaptive ! vaapisink

The problem is that the reference frame passed to hardware is still in YUY2 format, whereas the hardware is expecting NV12 format. I've come up with a very hacky patch which "fixes" the problem, which I'll attach to this bug.

On 2014-05-28 16:48:23 +0000, Simon Farnsworth wrote:

Created attachment 100041
Hacky patch that fixes the deinterlacing bug

This patch isn't suitable for applying to the source tree as-is. It puts in a special case for MADI, where the colour space conversion is applied to the reference frame, too.

Applying this "fixes" my issue with deinterlacing YUY2 surfaces, implying that it's about colour space of the reference frame.

On 2014-05-29 06:40:00 +0000, haihao wrote:

It would be better to fix this issue in gstreamer-vaapi, could you file a bug in gsteamer bugzilla to track the issue ?

On 2014-05-29 09:09:45 +0000, Simon Farnsworth wrote:

(In reply to comment # 2)

It would be better to fix this issue in gstreamer-vaapi, could you file a
bug in gsteamer bugzilla to track the issue ?

I'll file a bug there, too.

At a minimum, though, intel-driver needs to reject the reference surface if it's in the wrong format, just as it refuses to work without a reference surface. I'll cook up a quick patch to show what I mean.

On 2014-05-29 09:29:27 +0000, Simon Farnsworth wrote:

Created attachment 100098
Patch against staging to reject non-NV12 surfaces

This patch (against the staging branch) simply has intel-driver reject non-NV12 references on SNB and IVB, returning the same error code (different warning message) as it would if you asked for MADI without providing a reference surface.

I haven't gone deep enough into MCDI and MADI on HSW/BDW to work out whether they need a similar patch.

On 2014-05-29 09:37:04 +0000, Simon Farnsworth wrote:

https://bugzilla.gnome.org/show_bug.cgi?id=730925 filed for gstreamer-vaapi.

On 2014-08-19 05:53:21 +0000, Pengfei wrote:

the patch Patch against staging to reject non-NV12 surfaces has been sent to Libva [email protected]. and assign to you.

On 2014-08-19 05:57:21 +0000, Pengfei wrote:

the patch Patch against staging to reject non-NV12 surfaces has been sent to Libva [email protected]. and assign to you.

On 2014-09-12 11:22:41 +0000, Simon Farnsworth wrote:

I can't find the patch in my archive of the list. Could someone give me a pointer to it?

On 2015-11-23 16:27:46 +0000, haihao wrote:

Sorry for slow response. do you still experience this issue?

On 2016-01-12 02:54:01 +0000, Simon Farnsworth wrote:

(In reply to haihao from comment # 9)

Sorry for slow response. do you still experience this issue?

I've left ONELAN, and no longer have access to this hardware. You should be able to reproduce with the details in comment # 0 if it's still an issue on IVB or SNB.

Libva intel-driver(i965) master branch can't decode field VC1

migrated from Bugzilla #98850
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform All
Assigned to: ykzhao

On 2016-11-25 06:24:03 +0000, Jun Zhao wrote:

We used the file fate-suite/vc1/SA10143.vc1 fate-suite/vc1/ilaced_twomv.vc1, and can get the files with the command:

rsync -aL rsync://fate-suite.ffmpeg.org:/fate-suite/ fate-suite.

On 2016-11-25 08:54:56 +0000, haihao wrote:

Yes, this is a known issue, and lower the priority.

Properly check for X11 backend to avoid compilation break

configuring should use pkg-config to know if X11 headers (distributions call this devel packages) are available to the path and avoid compiling X11 stuff if they are not present.

Currently configure won't check for it and as a result in the absence of X11 headers the build breaks when compiling vi_dricommon.h, which is included by va_backend_compat.h. Compilation relies on a successful configure stage.

H.264 encoder produces invalid motion vectors with certain inputs

migrated from Bugzilla #97070
status ASSIGNED severity major in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: haihao

On 2016-07-25 09:20:14 +0000, Steinar H. Gunderson wrote:

Hi,

This is moved over from https://trac.ffmpeg.org/ticket/5732, which contains somewhat more discussions and info. Long story short, when encoding H.264 video on a Haswell (with a specific, very challenging input), the hardware or driver produces a bitstream that's not spec-compliant and does not play well in libavcodec. However, it is somehow consistently wrong, because libva itself decodes it right.

You can find an example stream (big; 5.1 GB) at http://storage.sesse.net/through-the-cracks.mp4; the first instance corruption happens at 13:50. This is encoded at constant qp 15. There is a smaller, cut-out section (with audio removed) at http://storage.sesse.net/through-the-cracks-cut.mp4 if you just want to see that part.

The original encode was done using my live video mixer, Nageru, which contains a VA-API-based encoder derived from Intel's example H.264 code, running against version 0.7.0 of the Intel VA driver on a desktop Haswell. I can also reproduce this reliably with ffmpeg(1) against version 0.7.1, on my Haswell laptop, so I don't think it's an error of the driving application. I don't have access to Broadwell or Skylake to test.

To reproduce, you can use the uncut .mp4 and reencode it with ffmpeg(1) as follows:

ffmpeg -hwaccel vaapi -ss 12:00 -vaapi_device :0 -i through-the-cracks.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi test.mp4 -qp 20

Note the use of -hwaccel vaapi to get VA-API decode instead of libavcodec, so that the encoder has a correct bitstream to work with (as VA-API decodes its own stream correctly).

[BYT] GPU HANG: ecode 1:0xa8eeeb7e, in DVDPlayerVideo [4335], reason: Ring hung, action: reset in bsd ring

migrated from Bugzilla #95249
status NEEDINFO severity normal in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: ykzhao

Original attachment names and IDs:

On 2016-05-03 10:09:14 +0000, Axay wrote:

Created attachment 123432
GPU crash dump from /sys/class/drm/card0/error

Play movie in kodi, suddenly display gone and following log found in dmesg. After reboot system become normal.

[drm] stuck on bsd ring
[drm] GPU HANG: ecode 1:0xa8eeeb7e, in DVDPlayerVideo [4335], reason: Ring hung, action: reset
[drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[drm] Please file a new bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[drm] GPU crash dump saved to /sys/class/drm/card0/error
[drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off
[drm] stuck on bsd ring
[drm] GPU HANG: ecode 1:0xcbedeb76, in DVDPlayerVideo [4335], reason: Ring hung, action: reset
[drm:i915_context_is_banned] ERROR gpu hanging too fast, banning!
[drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off

On 2016-12-07 09:13:05 +0000, yann wrote:

(In reply to Axay from comment # 0)

Created attachment 123432 [details]
GPU crash dump from /sys/class/drm/card0/error

Play movie in kodi, suddenly display gone and following log found in dmesg.
After reboot system become normal.

[drm] stuck on bsd ring
[drm] GPU HANG: ecode 1:0xa8eeeb7e, in DVDPlayerVideo [4335], reason: Ring
hung, action: reset
[drm] GPU hangs can indicate a bug anywhere in the entire gfx stack,
including userspace.
[drm] Please file a new bug report on bugs.freedesktop.org against DRI ->
DRM/Intel
[drm] drm/i915 developers can then reassign to the right component if it's
not a kernel issue.
[drm] The gpu crash dump is required to analyze gpu hangs, so please always
attach it.
[drm] GPU crash dump saved to /sys/class/drm/card0/error
[drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off
[drm] stuck on bsd ring
[drm] GPU HANG: ecode 1:0xcbedeb76, in DVDPlayerVideo [4335], reason: Ring
hung, action: reset
[drm:i915_context_is_banned] ERROR gpu hanging too fast, banning!
[drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off

We seem to have neglected the bug a bit, apologies.

The issue is occurring with a pretty old kernel and in bsd ring.
Reassigning to libva component.
There were improvements pushed in kernel and libva that will benefit to your system, so please re-test with latest kernel & libva and mark as REOPENED if you can reproduce (and attach fresh gpu error dump & kernel log) and RESOLVED/* if you cannot reproduce.

On 2016-12-07 15:19:00 +0000, haihao wrote:

Besides kodi, can you reproduce this issue with other vaapi based player?

On 2016-12-16 12:42:56 +0000, haihao wrote:

The issue in https://bugs.freedesktop.org/show_bug.cgi?id=95197 disappears after using a recent Linux kernel and libva. # 95917 and # 95249 are similar, so could you also retest with latest kernel and libva?

Encoding doesn't check the input rate_control attribute

When the upper-middleware passes the attribute that is not supported by the driver, the driver doesn't check it and still continue the encoding. This is wrong.
For example: CBR is not exported. The upper-middleware passes the CBR rate_control. And the driver still helps to do the CBR encoding.

Expected behaviour: return error code when the unsupported attribute is passed.

README isn't updated for Kaby Lake

Hi,

The README doesn't mention that Kaby Lake supports VP9 encode (both 8- and 10-bit), even though the NEWS file mentions it was added in 1.7.1/1.7.3. It should probably be updated.

How to disable informative messages in .xsession-errors

My kodi runs over a NUC with ubuntu 16.04.
The file .xsession-errors is full of messages from vaapi:

libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0

I reported on kodi forum: http://forum.kodi.tv/showthread.php?tid=305503&pid=2513806#pid2513806 and they told me that this is something outside their control.
Is it possible to disable the print of those messages that fills the file without any valuable information?

[HSW]JPEG decode would core dumped with loadjpeg

migrated from Bugzilla #67150
status REOPENED severity normal in component intel for ---
Reported in version unspecified on platform Other
Assigned to: haihao

Original attachment names and IDs:

On 2013-07-22 02:45:52 +0000, Yang Lianyue wrote:

System Environment:

Platform: HSW
libva: (staging)SHA: 6ba83cd306629e7579912627edab7a86d8c9ae1c
intel_driver: (staging)SHA: 1caf179

Bug Info:

Libva will be core dumped when jpeg decode.
There is some error in gen75_mfd.c:2220.

Steps:

jpegdecode 2.jpg
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/X11R7/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
jpegdecode: gen75_mfd.c:2220: gen75_mfd_jpeg_decode_init: Assertion `0' failed.
Aborted (core dumped)

On 2013-07-22 04:48:59 +0000, haihao wrote:

Is this a HSW specific issue ? Where to get jpegdecode and 2.jpg ?

On 2013-07-22 06:27:15 +0000, Ouping Zhang wrote:

jpegdecode is not used any more.

On 2016-02-26 09:01:22 +0000, Víctor Jáquez wrote:

This problem still exist in Haswell, and most surely in further chipsets with jpeg decoding capabilities.

The steps to reproduce it:

./loadjpeg vaapi-assert.jpg
ERROR:We only support YUV images
WARNING:Height need to be a multiple of 16 (current height is 1417)
WARNING:Width need to be a multiple of 16 (current Width is 1429)
Decoding JPEG image 1429x1417...
libva info: VA-API version 0.38.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/gnome/jh/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
lt-loadjpeg: gen75_mfd.c:2203: void gen75_mfd_jpeg_decode_init(VADriverContextP, struct decode_state *, struct gen7_mfd_context *): Assertion `0' failed.
Aborted

The problem is not that the driver doesn't support more than 3 components or sizes multiple of 16. The problem is the error handling in libva-intel-driver: in my opinion an assert is not error handling.

As this is a driver specific restriction, the client doesn't have to do the verification, the driver should notify the client that it is unable to process the data, without crashing.

Furthermore, asserts can be disabled at compilation time, making the behavior unpredictable.

This is very similar to bug 91626, where an assert is also used for error handling.

On 2016-02-26 09:02:08 +0000, Víctor Jáquez wrote:

Created attachment 121978
test file for crash

VDENC: VDENC encoding fail on KBL

Current driver is only validated in libyami. But it fails when using other encoding tool.
At the same time when the multi-slices are used, more issues will be triggered.

H.265 encoder crashes when given surfaces straight from H.264 decoder

With current libav:
./avconv -y -threads 1 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i in.mp4 -an -c:v hevc_vaapi out.mp4
crashes with heap corruption.

valgrind says:

==9218== Invalid write of size 4
==9218==    at 0x840C7C7: gen9_intel_hevc_input_check (gen9_vme.c:1859)
==9218==    by 0x840C9C8: gen9_vme_hevc_prepare (gen9_vme.c:1909)
==9218==    by 0x840CA83: gen9_vme_hevc_pipeline (gen9_vme.c:1933)
==9218==    by 0x84573D0: intel_encoder_end_picture (i965_encoder.c:1308)
==9218==    by 0x8449562: i965_EndPicture (i965_drv_video.c:3588)
==9218==    by 0x53804C9: vaEndPicture (va.c:1286)
==9218==    by 0x7E9DBF: vaapi_encode_issue (vaapi_encode.c:388)
==9218==    by 0x7EA032: vaapi_encode_step (vaapi_encode.c:609)
==9218==    by 0x7EA331: ff_vaapi_encode2 (vaapi_encode.c:896)
==9218==    by 0x345682: avcodec_encode_video2 (encode.c:231)
==9218==    by 0x345821: do_encode (encode.c:278)
==9218==    by 0x34599B: avcodec_send_frame (encode.c:327)
==9218==  Address 0x9f16448 is 8 bytes after a block of size 32 alloc'd
==9218==    at 0x4C2CBC5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9218==    by 0x83FDBAB: gen8_mfd_init_avc_surface (gen8_mfd.c:76)
==9218==    by 0x8400185: gen8_mfd_avc_decode_init (gen8_mfd.c:853)
==9218==    by 0x84004AF: gen8_mfd_avc_decode_picture (gen8_mfd.c:917)
==9218==    by 0x8405AE6: gen8_mfd_decode_picture (gen8_mfd.c:3105)
==9218==    by 0x8449562: i965_EndPicture (i965_drv_video.c:3588)
==9218==    by 0x53804C9: vaEndPicture (va.c:1286)
==9218==    by 0x7E83D9: ff_vaapi_decode_issue (vaapi_decode.c:185)
==9218==    by 0x5ADD60: vaapi_h264_end_frame (vaapi_h264.c:320)
==9218==    by 0x757E70: ff_h264_field_end (h264_picture.c:166)
==9218==    by 0x39D60A: h264_decode_frame (h264dec.c:744)
==9218==    by 0x31C252: decode_simple_internal (decode.c:335)
==9218==    by 0x31C252: decode_simple_receive_frame (decode.c:391)
==9218==    by 0x31C252: decode_receive_frame_internal (decode.c:409)

The struct object_surface private_data field seems to be inappropriately shared. The H.264 decoder allocates it as a GenAvcSurface (32 bytes), but the H.265 encoder is treating it as if it were a GenHevcSurface (48 bytes) and therefore encounters issues when it tries to write the later fields.

(It also happens in some other combinations, e.g. VC-1 decode -> H.265 encode; I haven't studied every case but it looks like the same issue.)

[NM70][H264] h264 encoding does not works, return empty frames

migrated from Bugzilla #99573
status NEW severity critical in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: haihao

On 2017-01-28 01:45:54 +0000, wrote:

Hello, when i'm trying to encode something with ffmpeg it gets only empty frames.
Full log: http://pastebin.com/5WtF5b3A
[h264_vaapi @ 0x55fd7098cf80] Output buffer: 0 bytes (status 00000000).

So, i tried to run h264encode from /test/encode of libva and it seem to have same problem:

Loading data into surface 15.....Complete surface loading
\00000059(000000 bytes coded)

Full log: http://pastebin.com/e1uhn848
Also, drm.debug=0x06 does not shows anything special.
Dmesg and vainfo output: http://pastebin.com/vwn1ufUv

My hardware:
Intel® Dual-core Celeron® 1037U
Gigabyte GA-C1037UN-EU
x86_64
libva latest from Arch Linux (1.7.3)
kernel 4.9.6-1-ARCH
It is headless server.

Is there any way to get vaapi h264 encoding working?

[SKL] hwaccel putimage doesn't check format

migrated from Bugzilla #91624
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform Other
Assigned to: PengChen

Original attachment names and IDs:

On 2015-08-13 14:58:41 +0000, Víctor Jáquez wrote:

Created attachment 117666
test case

Right now gstreamer-vaapi uses vaPutImage for encoding (jpeg encoding in this particular case).

When adding support for other input video formats[1], I just found that the i965_hw_putimage() doesn't handle the case when the surface and the image have different color format.

Looking at i965_sw_putimage(), it does (triggers an error).

In the case of i965_hw_putimage(), as far as I understand, the postprocessor is used for the color conversion, nonetheless the generated jpeg image is corrupted.

I attach a minimal case-test:

$ make run
$ display tulips_uyvy.jpg

You can "fix" the output changing the define SAMEFORMAT to 1

  1. https://bugzilla.gnome.org/show_bug.cgi?id=744042

On 2016-04-21 09:29:06 +0000, Víctor Jáquez wrote:

Comment on attachment 117666
test case

fix mime type

On 2016-04-21 09:30:13 +0000, Víctor Jáquez wrote:

$ wget https://bugs.freedesktop.org/attachment.cgi?id=117666 -O test.tgz

$ tar tf test.tgz
jpeg-enc-test/
jpeg-enc-test/Makefile
jpeg-enc-test/bug.c
jpeg-enc-test/huff.h
jpeg-enc-test/tulips_uyvy422_prog_packed_qcif.yuv

On 2016-12-14 01:00:27 +0000, PengChen wrote:

if (HAS_ACCELERATED_GETIMAGE(i965))
    va_status = i965_hw_getimage(ctx, obj_surface, obj_image, &rect);
else
    va_status = i965_sw_getimage(ctx, obj_surface, obj_image, &rect);

above is the latest implementation, if the hardware has VPP, it only select i965_hw_getimage() no mater what the color format it is. and i965_hw_getimage() do support some color formats conversion. if the comment has some mistake or misunderstanding, just feel free to let me know.

loadjpeg will crash for ffmpeg generated content

migrated from Bugzilla #97633
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform Other
Assigned to: PengChen

Original attachment names and IDs:

On 2016-09-08 09:12:54 +0000, Guangxin.Xu wrote:

Created attachment 126296
422H

loadjpeg will crash at gen75_mfd_jpeg_decode_init L2201

4 0x00007ffff5497bc4 in gen75_mfd_jpeg_decode_init (decode_state=0x616388, decode_state=0x616388, gen7_mfd_context=0x61cd00, ctx=0x612180) at gen75_mfd.c:2201

2201 assert(0);
(gdb) l
2196 } else if (h1 == 2 && h2 == 2 && h3 == 2 &&
2197 v1 == 2 && v2 == 1 && v3 == 1) {
2198 subsampling = SUBSAMPLE_YUV422V;
2199 fourcc = VA_FOURCC_422V;
2200 } else
2201 assert(0);
2202 } else {
2203 assert(0);
2204 }

On 2016-09-08 09:13:28 +0000, Guangxin.Xu wrote:

Created attachment 126297
44V

On 2016-09-08 09:13:48 +0000, Guangxin.Xu wrote:

Created attachment 126298
444P

HEVC vaapi official (latest) Debian stretch is missing ?

Hi,
are HEVC in vaapi on official Debian stretch is missing ?

vainfo 
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.3)
vainfo: Driver version: Intel i965 driver for Intel(R) Broadwell - 1.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointVLD

my GPU:
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)

should rebuild from source ?

Thanks.

VDENC: some static table are updated incorrectly

VDENC defines some static tables. In theory they should not be changed. But the current code will update the static table incorrectly, which causes that the static table can't be recovered. In such case it will cause the different behaviour under the below scneario:
> CBR
>VBR firstly and then start a new CBR

[feature request] disable informative messages

In my .xsession-errors I found this messages:
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0

I'd like to have the ability to disable those messages.
This will avoid to make the file grow in machines that runs kodi and are not rebooted often.

The h264encode doesn't free memory when it should

migrated from Bugzilla #75287
status NEEDINFO severity major in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: haihao

Original attachment names and IDs:

On 2014-02-20 22:59:05 +0000, Bryan Christ wrote:

In h264encode, we observe that memory usage increases as the program proceeds. For large files, this results in unreasonably large memory usage.

Example case:

Input: 18G yuv file
Output: 3.3G h264 video
run with valgrind using the massif tool:
$ valgrind --tool=massif --stacks=yes /usr/local/bin/h264encode --srcyuv output2.yuv -framecount 0 -f 25 -o massif_test_out.mp4

There is a malloc at i965_drv_video.c:1671 that accounts for 92.58% of memory usage at the peak. This call creates a buffer which has a reference count on it. When the reference count hits 0, the memory is cleared. Many of the buffers stored in this way never have their reference counts set to zero during encoding. As a result, the memory usage keeps growing during encoding. On completion, all of this memory is freed, so a simple valgrind run does not find this leak.

Excerpts from the ms_print massif file:

Command: /usr/local/bin/h264encode --srcyuv output2.yuv -framecount 0 -f 25 -o massif_test_out
Massif arguments: --stacks=yes
ms_print arguments: massif.out.31611

GB

1.202^ #
| @@@@#
| @@@@@@@#
| @@@@@@@@@@#
| @@@@@@@@@@@@@#
| @@@@@@@@@@@@@@@@#
| :@@@ @@@@@@@@@@@@@@#
| @:@@:@ @ @@@@@@@@@@@@@@#
| @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@@@@@@@@:@@:@ @ @@@@@@@@@@@@@@#
| :::@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@@@:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@:@@@@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| :@@@@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@::@ @@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@:::@ ::@ @@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@@:@@:: @ ::@ @@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
| @@:@@ :@@:: @ ::@ @@@@@:@ @@ @:::: :@@@ @@@@@:@@:@ @ @@@@@@@@@@@@@@#
0 +----------------------------------------------------------------------->Gi
0 75.59


n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)

79 80,394,261,652 1,290,739,176 1,255,405,747 35,332,005 1,424
97.26% (1,255,405,747B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->92.58% (1,194,924,096B) 0x567936F: i965_create_buffer_internal.isra.18 (i965_drv_video.c:1671)
| ->92.58% (1,194,924,096B) 0x4C27E60: vaCreateBuffer (va.c:949)
| ->78.39% (1,011,857,700B) 0x4026E5: main (h264encode.c:1656)
| |
| ->13.44% (173,461,320B) 0x40664B: render_picture (h264encode.c:1426)
| | ->13.21% (170,570,160B) 0x402634: main (h264encode.c:1995)
| | |
| | ->00.22% (2,891,160B) in 1+ places, all below ms_print's threshold (01.00%)
| |
| ->00.74% (9,605,076B) in 1+ places, all below ms_print's threshold (01.00%)
|
->02.51% (32,397,504B) 0x569361B: object_heap_expand (object_heap.c:62)
| ->02.51% (32,382,464B) 0x56937FE: object_heap_allocate (object_heap.c:121)
| | ->02.51% (32,379,904B) 0x5679235: i965_create_buffer_internal.isra.18 (i965_drv_video.c:1612)
| | | ->02.38% (30,683,648B) 0x567C0CB: i965_DeriveImage (i965_drv_video.c:3041)
| | | | ->02.38% (30,683,648B) 0x405464: load_surface (loadsurface.h:304)
| | | | ->02.38% (30,683,136B) 0x405F1E: storage_task (h264encode.c:1903)
| | | | | ->02.38% (30,683,136B) 0x4061A7: storage_task_thread (h264encode.c:1925)
| | | | | ->02.38% (30,683,136B) 0x3A95607C51: start_thread (in /usr/lib64/libpthread-2.17.so)
| | | | | ->02.38% (30,683,136B) 0x3A94EF5E1B: clone (in /usr/lib64/libc-2.17.so)
| | | | |
| | | | ->00.00% (512B) in 1+ places, all below ms_print's threshold (01.00%)
| | | |
| | | ->00.13% (1,696,256B) in 1+ places, all below ms_print's threshold (01.00%)
| | |
| | ->00.00% (2,560B) in 1+ places, all below ms_print's threshold (01.00%)
| |
| ->00.00% (15,040B) in 1+ places, all below ms_print's threshold (01.00%)
|
->01.88% (24,285,024B) 0x5679288: i965_create_buffer_internal.isra.18 (i965_drv_video.c:1629)
| ->01.88% (24,285,024B) 0x4C27E60: vaCreateBuffer (va.c:949)
| | ->01.88% (24,285,024B) in 9 places, all below massif's threshold (01.00%)
| |
| ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
->00.29% (3,799,123B) in 1+ places, all below ms_print's threshold (01.00%)

On 2014-03-24 01:43:46 +0000, haihao wrote:

Created attachment 96265
destroy the buffer automatically

The patch is only for testing.

On 2014-03-24 17:39:45 +0000, Bryan Christ wrote:

Initial testing indicates that patch seems to fix the problem. Will continue to test.

On 2015-11-26 03:08:58 +0000, haihao wrote:

*** Bug 90429 has been marked as a duplicate of this bug. ***

H.265 Main 10 profile encoder aborts when given non-Y-tiled P010 surfaces

On Kaby Lake:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x00007ffff5ef940a in __GI_abort () at abort.c:89
#2  0x00007ffff5ef0e47 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7ffff48e917e "hevc_encoder_surface", file=file@entry=0x7ffff48e9082 "../../vanilla/src/gen9_vme.c", line=line@entry=1433, function=function@entry=0x7ffff48e93d0 <__PRETTY_FUNCTION__.14053> "gen9_vme_hevc_surface_setup")
    at assert.c:92
#3  0x00007ffff5ef0ef2 in __GI___assert_fail (assertion=0x7ffff48e917e "hevc_encoder_surface", file=0x7ffff48e9082 "../../vanilla/src/gen9_vme.c", line=1433, function=0x7ffff48e93d0 <__PRETTY_FUNCTION__.14053> "gen9_vme_hevc_surface_setup") at assert.c:101
#4  0x00007ffff4834733 in gen9_vme_hevc_surface_setup (ctx=0x555556ae75e0, encode_state=0x555556afc298, is_intra=1, encoder_context=0x555557a703a0) at ../../vanilla/src/gen9_vme.c:1433
#5  0x00007ffff4835a07 in gen9_vme_hevc_prepare (ctx=0x555556ae75e0, encode_state=0x555556afc298, encoder_context=0x555557a703a0) at ../../vanilla/src/gen9_vme.c:1914
#6  0x00007ffff4835a94 in gen9_vme_hevc_pipeline (ctx=0x555556ae75e0, profile=VAProfileHEVCMain10, encode_state=0x555556afc298, encoder_context=0x555557a703a0) at ../../vanilla/src/gen9_vme.c:1933
#7  0x00007ffff4880320 in intel_encoder_end_picture (ctx=0x555556ae75e0, profile=VAProfileHEVCMain10, codec_state=0x555556afc298, hw_context=0x555557a703a0) at ../../vanilla/src/i965_encoder.c:1308
#8  0x00007ffff487252d in i965_EndPicture (ctx=0x555556ae75e0, context=33554434) at ../../vanilla/src/i965_drv_video.c:3588
#9  0x00007ffff7bb74ca in vaEndPicture (dpy=0x555556ae7500, context=33554434) at ../../vanilla/va/va.c:1290

Other related combinations do work:

  • Y-tiled P010 surfaces, encoding to Main 10 profile.
  • Non-Y-tiled P010 surfaces, encoding to Main profile (with downsampling).
  • Non-Y-tiled NV12 surfaces, encoding to Main profile.

[SNB]invalid VASurfaceID when filtering a surface for color space transform

migrated from Bugzilla #97086
status NEEDINFO severity normal in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: ykzhao

On 2016-07-26 06:36:53 +0000, wrote:

Overview:
Since libva-intel-driver >=1.6.2, the encode fails after we call vaCreateSurfaces() and do filtering another surface into this surface.

Steps to Reproduce:

  1. render to a vasurface
  2. create a surface for encoding
    va_status = vaCreateSurfaces(
    va_dpy,
    VA_RT_FORMAT_YUV420, 1280, 720,
    &dst_surface, 1,
    NULL, 0
    );
  3. like https://github.com/gbeauchesne/ffvademo/blob/master/src/ffvafilter.c
    ffva_filter_process()
    use the surface in step 1 to do color transform to the dst_surface.
  4. Use the dst_surface to encode.

Actual Results:
For filter:
"
error: vaEndPicture(): invalid VASurfaceID
"
For encode:
"
error: vaEndPicture(): invalid VASurfaceID
ffvaencoder: i965_encoder.c:69: intel_encoder_check_yuv_surface: Assertion `obj_surface && obj_surface->bo' failed.
"
And the application crashed.

Expected Results:
Expect the application works well.

Build Date & Hardware:
Ubuntu 16.04.1 LTS (amd64)
libva 1.7.0 (sudo apt install libva-dev:1.7.0-1)
CPU: i3-2310E / i5-2410m

Additional Builds and Platforms:
(1)works well for Haswell.
Ubuntu 16.04.1 LTS (x86)
libva 1.7.0
CPU: Celeron G1820(Haswell)

Additional Information:
This bug introduces by
(1)
https://cgit.freedesktop.org/vaapi/intel-driver/commit/?h=v1.6-branch&id=SHA: 7deaf55
(2)
https://cgit.freedesktop.org/vaapi/intel-driver/commit/?h=v1.6-branch&id=SHA: bd018d6
If I add the following code to libra-driver 1.6.1, I can also reproduce the bug.

  • if (!dst_obj_surface->bo)
  •    return VA_STATUS_ERROR_INVALID_SURFACE;
    

After I gdb it, I find the following reason.
(1)vaCreateSurfaces() may not initialize surface->bo.
Since i965_surface_native_memory() returns if
if (!expected_fourcc) {
return VA_STATUS_SUCCESS;
}
(2)If we use this surface(surface->bo = NULL), gen75_proc_picture(haswell) will call
if (!obj_dst_surf->bo) {
unsigned int is_tiled = 1;
unsigned int fourcc = VA_FOURCC_NV12;
int sampling = SUBSAMPLE_YUV420;
i965_check_alloc_surface_bo(ctx, obj_dst_surf, is_tiled, fourcc, sampling);
}
to make sure the bo != NULL
(3)For SNB, it will call i965_proc_picture() directly which has no i965_check_alloc_surface_bo() at all.

On 2016-07-26 07:41:18 +0000, wrote:

Fix the Additional Information I mentioned.
"
(3)For SNB, it will call i965_proc_picture() directly which has no i965_check_alloc_surface_bo() at all.
"

I comment

  • //if (!dst_obj_surface->bo)
  • // return VA_STATUS_ERROR_INVALID_SURFACE;
    and run once more.
    (1)
    i965_proc_picture_fast() failed with VA_STATUS_ERROR_UNIMPLEMENTED,
    if (pp_index < 0)
    return VA_STATUS_ERROR_UNIMPLEMENTED;

(2)the i965_proc_picture() went on and surface->bo initialize here.

int csc_needed = 0;
if (obj_surface->fourcc && obj_surface->fourcc !=  VA_FOURCC_NV12){
    csc_needed = 1;
    out_surface_id = VA_INVALID_ID;
    status = i965_CreateSurfaces(ctx,
                                 obj_surface->orig_width,
                                 obj_surface->orig_height,
                                 VA_RT_FORMAT_YUV420, 
                                 1,
                                 &out_surface_id);
    assert(status == VA_STATUS_SUCCESS);
    tmp_surfaces[num_tmp_surfaces++] = out_surface_id;
    struct object_surface *csc_surface = SURFACE(out_surface_id);
    assert(csc_surface);
    i965_check_alloc_surface_bo(ctx, csc_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
    dst_surface.base = (struct object_base *)csc_surface;
} else {
    i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
    dst_surface.base = (struct object_base *)obj_surface;
}

On 2016-07-26 08:11:02 +0000, wrote:

Summarize the above on SNB,

For libra-driver 1.6.1, my code will run this way:
(1) i965_proc_picture() calls i965_proc_picture_fast(), and
i965_proc_picture_fast() failed with VA_STATUS_ERROR_UNIMPLEMENTED,
if (pp_index < 0)
return VA_STATUS_ERROR_UNIMPLEMENTED;
(2) i965_proc_picture() went went on and surface->bo initialize here.

int csc_needed = 0;
if (obj_surface->fourcc && obj_surface->fourcc !=  VA_FOURCC_NV12){
    csc_needed = 1;
    out_surface_id = VA_INVALID_ID;
    status = i965_CreateSurfaces(ctx,
                                 obj_surface->orig_width,
                                 obj_surface->orig_height,
                                 VA_RT_FORMAT_YUV420, 
                                 1,
                                 &out_surface_id);
    assert(status == VA_STATUS_SUCCESS);
    tmp_surfaces[num_tmp_surfaces++] = out_surface_id;
    struct object_surface *csc_surface = SURFACE(out_surface_id);
    assert(csc_surface);
    i965_check_alloc_surface_bo(ctx, csc_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
    dst_surface.base = (struct object_base *)csc_surface;
} else {
    i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
    dst_surface.base = (struct object_base *)obj_surface;
}

(3) went on to call i965_post_processing_internal().

For libra-intel-driver >=1.6.2, I modify my code with
"
VASurfaceAttrib va_attrib;
va_attrib.type = VASurfaceAttribPixelFormat;
va_attrib.flags = VA_SURFACE_ATTRIB_SETTABLE;
va_attrib.value.type = VAGenericValueTypeInteger;
va_attrib.value.value.i = VA_FOURCC_NV12;
va_status = vaCreateSurfaces(
va_dpy,
VA_RT_FORMAT_YUV420, 1280, 720,
&dst_surface, 1,
&va_attrib, 1
);
"
And i965_proc_picture() calls i965_proc_picture_fast() which calls i965_post_processing_internal() directly.

On 2016-07-27 01:00:22 +0000, haihao wrote:

Could you provide a test case? I want to try it on other platforms.

On 2016-10-03 14:47:11 +0000, wrote:

Sorry for long delay.
I make a demo with the base of ffvademo to describe my problem.

Seeing xiaoyur347/ffvademo@SHA: ec31a905e3a5124b3806459f200d20552ff4a137

My demo do:
(1) render the video like the ffvademo does.
(2) using glCopyTexImage2D to capture the display to a glTexture.
which shares with the libva by eglCreateImageKHR().
(3) filter the captured libva surface from rgba to yuv.
And it fails when the dest surface created with ensure_filter_surface() #if 0 condition.

+static int ensure_filter_surface(FFVARendererEGL *rnd)
+{

  • s_vaFilter = ffva_filter_new(rnd->base.display);
  • VAStatus va_status;
  • // Create surface
    +#if 0 //fail
  • va_status = vaCreateSurfaces(
  •    rnd->va_display,
    
  •    VA_RT_FORMAT_YUV420,
    
  •    rnd->native_renderer->width, rnd->native_renderer->height,
    
  •    &s_vaFilterSurface, 1,
    
  •    NULL, 0
    
  • );
    +#else //success
  • VASurfaceAttrib va_attrib;
  • va_attrib.type = VASurfaceAttribPixelFormat;
  • va_attrib.flags = VA_SURFACE_ATTRIB_SETTABLE;
  • va_attrib.value.type = VAGenericValueTypeInteger;
  • va_attrib.value.value.i = VA_FOURCC_NV12;
  • va_status = vaCreateSurfaces(
  •    rnd->va_display,
    
  •    VA_RT_FORMAT_YUV420,
    
  •    rnd->native_renderer->width, rnd->native_renderer->height,
    
  •    &s_vaFilterSurface, 1,
    
  •    &va_attrib, 1
    
  • );
    +#endif
    +}

On 2016-10-03 14:52:48 +0000, wrote:

I run the ffvademo the following way.
export LD_LIBRARY_PATH=/opt/ffvademo/ext/ffmpeg/.libs/
./src/.libs/ffvademo -r egl -m mesa_image ./test.ts

With #if 0 condition,
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[mpegts @ 0x10313c0] Could not find codec parameters for stream 1 (Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x10313c0] Could not find codec parameters for stream 2 (Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input # 0, mpegts, from './test.ts':
Duration: 00:04:25.15, start: 600.014000, bitrate: 2975 kb/s
Program 1
Stream # 0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m), 720x480 [SAR 40:33 DAR 20:11], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream # 0:1[0x1100]: Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels
Stream # 0:2[0x1101]: Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels
glGenTextures 2
error: vaEndPicture(): invalid VASurfaceID
ret=-22
error: vaEndPicture(): invalid VASurfaceID
ret=-22
error: vaEndPicture(): invalid VASurfaceID
ret=-22
error: vaEndPicture(): invalid VASurfaceID
ret=-22
...

With the other condition,
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[mpegts @ 0x9bd3c0] Could not find codec parameters for stream 1 (Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x9bd3c0] Could not find codec parameters for stream 2 (Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input # 0, mpegts, from './test.ts':
Duration: 00:04:25.15, start: 600.014000, bitrate: 2975 kb/s
Program 1
Stream # 0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m), 720x480 [SAR 40:33 DAR 20:11], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream # 0:1[0x1100]: Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels
Stream # 0:2[0x1101]: Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels
glGenTextures 2

On 2016-12-15 04:59:28 +0000, ykzhao wrote:

Hi,
Does the issue still exists?
Will you please try the latest driver code and see whether the issue still exists?

Thanks

On 2017-01-05 18:13:52 +0000, wrote:

I believe this bug is still present in libva 1.7.3, but I'm unable to replicate with the code provided (ffvademo bails out with the only output being "failed to create renderer"). Nonetheless, I'm guessing this is the same bug given:

0:00:01.422790532 29211 0x7f7bb4004140 DEBUG vaapi gstvaapiutils.c:53:vaapi_check_status: vaEndPicture(): invalid VASurfaceID
0:00:01.422812057 29211 0x7f7bb4004140 ERROR vaapipostproc gstvaapipostproc.c:805:gst_vaapipostproc_process_vpp: failed to apply VPP filters (error 2)

I've tried the same GStreamer code on two Sandy Bridge machines and gotten the same result. I've not been able to replicate this on my Ivy Bridge desktop, but it has a discrete GPU whose VA driver is loaded by default; It still works if I set LIBVA_DRIVER_NAME to i965, but I've been unable to determine whether the video sink is still using whatever post-processing elements are default for Radeon VA or if that environment variable also has the effect of loading/using vaapipostproc.

FWIW, Googling "invalid vasurfaceid" not only yields this bug report but also a couple of recent posts on the Kodi forums from people reporting a similar issue on Ivy Bridge CPUs:

http://forum.kodi.tv/showthread.php?tid=255766
http://forum.kodi.tv/showthread.php?tid=274833

Hope this helps

Running a transcode from the H.264 of the input file to VP8 results in GPU hang when using the new VP8 encoder

Platform: BSW+

Command:
./yamitranscode -i -f 60 --rcmode CBR --ow 1920 --oh 1080 -c VP8 -b 500 -N 1000 -o out.ivf

Standard test input: http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4

Note: it occurs with some input files at low bitrates with 60fps only

Please refer to https://lists.freedesktop.org/archives/libva/2017-January/005198.html for details

VDENC: Potential shift flow issue in gen9_vdenc_mfx_avc_ref_idx_state

The below code has the potential shift flow issue if the list_ref_idx[0][i] is greater than or equal to 4.
> ref_idx_shift = vdenc_context->list_ref_idx[0][i] * 8;
fwd_ref_entry &= ~(0xFF << ref_idx_shift);
fwd_ref_entry += (gen9_vdenc_mfx_get_ref_idx_state(ref_pic, vdenc_context->list_ref_idx[0][i]) << ref_idx_shift);

HEVC CQP Encoding has shade on big QP(for example, QP=50)

migrated from Bugzilla #96545
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform x86 (IA32)
Assigned to: PengChen

Original attachment names and IDs:

On 2016-06-16 05:43:12 +0000, Focus.Luo wrote:

Created attachment 124552
hevc encoding qp=50

1, to do a hevc cqp encoding for 2k yuv input
./mv_encoder -hevc -i ./$filename:${WIDTH}x${HEIGHT} -o ./$testname -SliceHeaderPack 1 -PictureCodingType 0 -RateControl 3 -ISliceQP $qp $gopsetting -FrameRate $fps -ProfileIDC 1 -LevelIDC $level -loglevel 0 -intra_only -NumRefFrames 0 -NumSlices 1 -LCUSize $lcu

2, to use Vega to view the encoded bitstream

3, found that there are some shade on the decoded picture.

On 2016-07-18 03:40:46 +0000, Focus.Luo wrote:

for HEVC CBR, hevc_enc_cbr_1080p_ipb_10_gop30_lcu16.h265, using Vega to analyse the encoded output bitstream, found the Max/min/average QP is 44, and then also found the shadow issue

Debian control files not used by packagers

Upstream maintainers for debian based packaging do not use the control files in the project. They are poorly maintained and conflict with upstream packaging. Remove them.

Crash in object_heap.c:68 after heavy switching on/off H264 decoding of 6 streams in parallel

migrated from Bugzilla #96179
status NEEDINFO severity major in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: haihao

On 2016-05-25 07:48:28 +0000, Thomas wrote:

I've got here a test running with gstreamer switching on and off 6 H264 streams in parallel. For the decoding hardware acceleration is used with the vaapi elements.
After a few hundred switches I get a crash in object_heap.c:68 because heap->bucket is NULL.
I've tested it with the head revision of the git repository.

Regards,
Thomas

On 2016-07-27 07:26:35 +0000, haihao wrote:

Could you provide your command line?

On 2016-07-27 12:01:55 +0000, Thomas wrote:

Sorry, I don't have a command line for this. It happend inside a library which is used by chrome.

On 2016-07-27 13:06:58 +0000, Víctor Jáquez wrote:

A backtrace is possible?

On 2016-07-27 14:52:56 +0000, Thomas wrote:

I will try to reproduce it. This may take some time becase we switched off vaapi support.

On 2016-08-23 05:12:39 +0000, haihao wrote:

Any update? could you provide a backtrace?

On 2016-12-01 04:20:02 +0000, haihao wrote:

Any update on the backtrace?

On 2017-01-27 06:49:05 +0000, Thomas wrote:

I have tested it with the latest GStreamer version and libva 1.7.2 and i965-va-driver 1.7.0.
I couldn't reproduce the error even after more than 7000 switches.
Regards,
Thomas

[HSW..] vpp number of filters assertion

migrated from Bugzilla #91626
status ASSIGNED severity normal in component intel for ---
Reported in version unspecified on platform Other
Assigned to: PengChen

On 2015-08-13 15:10:09 +0000, Víctor Jáquez wrote:

While working in color balance interface in vaapipostroc [1], I ran across with an assertion that crashed the execution:

gen75_picture_process.c:169: VAStatus gen75_proc_picture(VADriverContextP, VAProfile, union codec_state *, struct hw_context *): Assertion `pipeline_param->num_filters <= 4' failed.
Aborted

In my opinion, this shouldn't be handled in this way. If the hardware offers only a limited number of filters to activate simultaneously, it should behave different (ignore the new filter, perhaps) but it shouldn't crash.

  1. https://bugzilla.gnome.org/show_bug.cgi?id=720376

On 2016-12-14 00:50:05 +0000, PengChen wrote:

whether return error is the better idea if pipeline_param->num_filters <= 4 is not true? it makes the user confused if the driver ignores the new filters at this case.

[BSW]GPU HANG: ecode 8:0:0x7f5f7f7f, in ba [916], reason: Ring hung, action: reset

migrated from Bugzilla #98317
status ASSIGNED severity critical in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: Pengfei

Original attachment names and IDs:

On 2016-10-19 01:25:40 +0000, william wrote:

Created attachment 127396
dump log from /sys/class/drm/card0/error

When using libva-stack from 01.org to encoding, occasionally get this GPU hang issue.
Fully log from dmesg as below shows:
[177082.427310] [drm] stuck on render ring
[177082.438483] [drm] GPU HANG: ecode 8:0:0x7f5f7f7f, in ba [916], reason: Ring hung, action: reset
[177082.448325] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[177082.458809] [drm] Please file a new bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[177082.468840] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[177082.479831] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[177082.489967] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[177082.499497] drm/i915: Resetting chip after gpu hang
[177088.423173] [drm] stuck on render ring
[177088.434265] [drm] GPU HANG: ecode 8:0:0x7f5f7f7f, in ba [916], reason: Ring hung, action: reset
[177088.444257] [drm:i915_context_is_banned] ERROR gpu hanging too fast, banning!
[177088.454664] drm/i915: Resetting chip after gpu hang

Linux Kernel version: 4.2.0

On 2016-10-19 13:41:26 +0000, haihao wrote:

Someone reported GPU hang with high media workload on BSW and provided a workaround in the gfx mailing list. Could you give a try?

https://lists.freedesktop.org/archives/intel-gfx/2016-September/105710.html

On 2016-10-20 01:49:58 +0000, william wrote:

(In reply to haihao from comment # 1)

Someone reported GPU hang with high media workload on BSW and provided a
workaround in the gfx mailing list. Could you give a try?

https://lists.freedesktop.org/archives/intel-gfx/2016-September/105710.html

Okay, I will let my customer to try it, thanks!

On 2016-11-04 03:41:16 +0000, haihao wrote:

Does the fix in kernel work for you ?

On 2016-11-16 07:01:38 +0000, william wrote:

(In reply to haihao from comment # 3)

Does the fix in kernel work for you ?

No, We have tried but have no effect.Is there any tools to debug this type(GPU hang) of issue?

On 2016-11-17 07:04:49 +0000, haihao wrote:

Normally it is hard to identify the root cause for GPU hang issue without any details.

You are using Kernel 4.2.0, could you try the latest rc kernel? If you can produce this issue with the latest rc kernel, please provide the steps to reproduce this issue and /sys/kernel/debug/dri/0/i915_error_state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.