Bug 71276 - [SNB] hang in bsd batch
Summary: [SNB] hang in bsd batch
Status: RESOLVED WORKSFORME
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: haihao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 18:29 UTC by tradefor2points
Modified: 2014-03-28 06:48 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
[drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring (14.01 KB, text/plain)
2013-11-05 18:29 UTC, tradefor2points
Details
i915_error_state (2.39 MB, text/plain)
2013-11-07 00:13 UTC, tradefor2points
Details
2nd part (2.51 MB, text/plain)
2013-11-07 00:15 UTC, tradefor2points
Details
part 3 of 3 (2.33 MB, text/plain)
2013-11-07 00:16 UTC, tradefor2points
Details
compressed error file (991.57 KB, application/gzip)
2013-11-07 12:02 UTC, tradefor2points
Details
bsd ring error with 1080 without deinterlacer (988.83 KB, text/plain)
2013-11-08 07:42 UTC, tradefor2points
Details
Error with libva 1.2.2.pre1 (989.60 KB, text/plain)
2013-11-09 18:49 UTC, tradefor2points
Details
patch to fix the hang issue on SNB (5.92 KB, patch)
2013-11-26 01:35 UTC, haihao
Details | Splinter Review
12-4-13 test error from patch test (988.52 KB, text/plain)
2013-12-04 20:13 UTC, tradefor2points
Details
Screenshot while using ver 1.2.2.pre1 (1.58 MB, text/plain)
2013-12-04 20:20 UTC, tradefor2points
Details
i915 error 12-11-13 libva 1.2.2.pre2 (990.41 KB, text/plain)
2013-12-11 16:46 UTC, tradefor2points
Details
Screenshot while using ver 1.2.2.pre2 (2.52 MB, text/plain)
2013-12-11 16:49 UTC, tradefor2points
Details
i915 error state - bsd ring (996.06 KB, text/plain)
2014-01-09 14:40 UTC, tradefor2points
Details
i915 error state 1-9-14 after color correction patch (987.48 KB, text/plain)
2014-01-09 15:19 UTC, tradefor2points
Details

Description tradefor2points 2013-11-05 18:29:17 UTC
Created attachment 88726 [details]
[drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring

While viewing a video using Mythtv the computer randomly freezes/pauses for a short duration ( usually about 5 seconds ) then can resume ok or it may continue to repeat this freezing/pausing problem several times in a row. This problem has occured in both Ubuntu Gnome 13.10 64 bit and Linux Mint 16 64 bit. The cpu is an Intel CI5 2405s with HD 3000.
Comment 1 Daniel Vetter 2013-11-06 10:43:26 UTC
You error state is cut off. Please rehang your machine and attach the _complete_ file (and not anything else pasted in there - if there's gunk at the top our decoder will get confused).
Comment 2 tradefor2points 2013-11-07 00:13:50 UTC
Created attachment 88792 [details]
i915_error_state

Here is the system log:
6 16:42:46 CI5 kernel: [ 4661.075455] [drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring
Nov  6 16:42:46 CI5 kernel: [ 4661.075461] [drm] capturing error event; look for more information in /sys/kernel/debug/dri/0/i915_error_state
Nov  6 16:42:46 CI5 kernel: [ 4661.079426] [drm:i915_set_reset_status] *ERROR* bsd ring hung inside bo (0x17dc7000 ctx 0) at 0x17dc7538
Nov  6 16:52:52 CI5 kernel: [ 5267.768386] [drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring
Nov  6 16:52:52 CI5 kernel: [ 5267.768441] [drm:i915_set_reset_status] *ERROR* bsd ring hung flushing bo (0x19eee000 ctx 0) at 0x18029ec

Also a bit of info:
Using Linux Mint 16 64 bit and Mythtv ver .27 with decoder=vaapi acceleration Video render=openglvaapi deinterlacer=One Field (1x,HW)
I had to install drivers: libva-intel-vaapi-driver i965-va-driver version 1.0.20-2
Comment 3 tradefor2points 2013-11-07 00:15:56 UTC
Created attachment 88793 [details]
2nd part

I had to break up the error file since there was a 3M limit on attachments. Attached is part 2 of 3.
Comment 4 tradefor2points 2013-11-07 00:16:55 UTC
Created attachment 88794 [details]
part 3 of 3

Attached is part 3 of 3 of the error file.
Comment 5 Daniel Vetter 2013-11-07 09:15:41 UTC
(In reply to comment #4)
> Created attachment 88794 [details]
> part 3 of 3
> 
> Attached is part 3 of 3 of the error file.

Compressing preferred. Can you please reattach in one piece?
Comment 6 tradefor2points 2013-11-07 12:02:53 UTC
Created attachment 88818 [details]
compressed error file

Attached is the compressed error file. Please advise.
Comment 7 Daniel Vetter 2013-11-07 13:27:04 UTC
Utter garbage in the bsd batch. Somewhat fits in with other libva error states we've seen where the gpu tries to execute something that just doesn't make sense. I suspect some harder-to-hit corruption issue somewhere in libva.
Comment 8 tradefor2points 2013-11-07 16:48:02 UTC
In trying to understand... where do things go from here?
Comment 9 Daniel Vetter 2013-11-07 17:34:59 UTC
gpu hang is like when a userspace app crashes. The kernel detects the issue, but the bug is not in the kernel.

In this case here it's somewhere in the libva driver, hence the reassignment.
Comment 10 haihao 2013-11-08 01:19:15 UTC
> 
> Also a bit of info:
> Using Linux Mint 16 64 bit and Mythtv ver .27 with decoder=vaapi
> acceleration Video render=openglvaapi deinterlacer=One Field (1x,HW)

Could you disable deinterlacing  then give a try ?

> I had to install drivers: libva-intel-vaapi-driver i965-va-driver version
> 1.0.20-2

You are using a old version of libva-intel-driver, could you try with the latest official release ?
Comment 11 tradefor2points 2013-11-08 06:23:45 UTC
(In reply to comment #10)
> > 
> > Also a bit of info:
> > Using Linux Mint 16 64 bit and Mythtv ver .27 with decoder=vaapi
> > acceleration Video render=openglvaapi deinterlacer=One Field (1x,HW)
> 
> Could you disable deinterlacing  then give a try ?
> 
> > I had to install drivers: libva-intel-vaapi-driver i965-va-driver version
> > 1.0.20-2
> 
> You are using a old version of libva-intel-driver, could you try with the
> latest official release ?

I will try not using deinterlacer=One Field (1x,HW). Also I will need instruction on how to update libva-intel-vaapi-driver i965-va-driver to the latest offical release which is?
Comment 12 tradefor2points 2013-11-08 06:29:47 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > > 
> > > Also a bit of info:
> > > Using Linux Mint 16 64 bit and Mythtv ver .27 with decoder=vaapi
> > > acceleration Video render=openglvaapi deinterlacer=One Field (1x,HW)
> > 
> > Could you disable deinterlacing  then give a try ?
> > 
> > > I had to install drivers: libva-intel-vaapi-driver i965-va-driver version
> > > 1.0.20-2
> > 
> > You are using a old version of libva-intel-driver, could you try with the
> > latest official release ?
> 
> I will try not using deinterlacer=One Field (1x,HW). Also I will need
> instruction on how to update libva-intel-vaapi-driver i965-va-driver to the
> latest offical release which is?

PS Deinterlacing is only used on 1080 and I am having the bsd ring error on both 1080 and 720p.
Comment 13 tradefor2points 2013-11-08 07:42:25 UTC
Created attachment 88878 [details]
bsd ring error with 1080 without deinterlacer

I have attached the error file for a 1080 video without the deinterlacer.
Comment 14 tradefor2points 2013-11-08 21:39:45 UTC
I couldn't find any info on compiling the latest version of libva-intel-driver but I was able to find this ppa:wsnipex/vaapi with version 1.2.0. but testing resulted in the same error. Please advise on how to compile the latest version for libva-intel-driver for Ubuntu 13.10 64 bit.
Comment 15 tradefor2points 2013-11-09 02:40:13 UTC
I found this site:
https://gitorious.org/gst-plugins-vaapi/pages/Home

libva
git clone git://anongit.freedesktop.org/vaapi/libva
./autogen.sh —prefix=/usr && make && sudo make install

backend driver (take Intel GenX graphics driver as example)
git clone git://anongit.freedesktop.org/vaapi/intel-driver
./autogen.sh —prefix=/usr && make && sudo make install

Will the above work? Please advise.
Thanks
Comment 16 tradefor2points 2013-11-09 18:49:53 UTC
Created attachment 88941 [details]
Error with libva 1.2.2.pre1

Syslog:
Nov  9 13:34:25 CI5 kernel: [  468.349247] [drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring
Nov  9 13:34:25 CI5 kernel: [  468.349256] [drm] capturing error event; look for more information in /sys/kernel/debug/dri/0/i915_error_state
Nov  9 13:34:25 CI5 kernel: [  468.353245] [drm:i915_set_reset_status] *ERROR* bsd ring hung inside bo (0x16872000 ctx 0) at 0x16872538
Nov  9 13:34:39 CI5 kernel: [  482.382267] [drm:i915_hangcheck_elapsed] *ERROR* stuck on bsd ring
Nov  9 13:34:39 CI5 kernel: [  482.382317] [drm:i915_set_reset_status] *ERROR* bsd ring hung inside bo (0x18b55000 ctx 0) at 0x18b55614
Nov  9 13:34:39 CI5 kernel: [  482.394312] [drm:__gen6_gt_force_wake_get] *ERROR* Timed out waiting for forcewake old ack to clear.

I found this ppa, ppa:aap/intel-drivers with ver 1.2.2.pre1. I upgraded the libva and installed the libva-intel-driver and removed libva-intel-vaapi-driver since it seemed it was no longer needed due to libva-intel-driver.
Tested and basically the same error but with something new in the last line..."forcewake".
Comment 17 Daniel Vetter 2013-11-10 13:53:37 UTC
(In reply to comment #16)
> *ERROR* Timed out waiting for forcewake old ack to clear.

That just means the gpu died a bit harder ...
Comment 18 haihao 2013-11-12 01:14:59 UTC
(In reply to comment #15)
> I found this site:
> https://gitorious.org/gst-plugins-vaapi/pages/Home
> 
> libva
> git clone git://anongit.freedesktop.org/vaapi/libva
> ./autogen.sh —prefix=/usr && make && sudo make install
> 
> backend driver (take Intel GenX graphics driver as example)
> git clone git://anongit.freedesktop.org/vaapi/intel-driver
> ./autogen.sh —prefix=/usr && make && sudo make install
> 
> Will the above work? Please advise.
> Thanks

Yes, it should work. Or you can use the latest release:
http://www.freedesktop.org/software/vaapi/
Comment 19 haihao 2013-11-12 01:23:15 UTC
Can you reproduce this issue with other player such as mplayer vaapi (git://gitorious.org/vaapi/mplayer.git). You can clone the branch of hwaccel-vaapi by the following command:

git clone git://gitorious.org/vaapi/mplayer.git -b hwaccel-vaapi

after build mplayer vaapi, you can run the following command :

./mplayer -vo vaapi <video file>
Comment 20 tradefor2points 2013-11-12 02:37:08 UTC
(In reply to comment #19)
> Can you reproduce this issue with other player such as mplayer vaapi
> (git://gitorious.org/vaapi/mplayer.git). You can clone the branch of
> hwaccel-vaapi by the following command:
> 
> git clone git://gitorious.org/vaapi/mplayer.git -b hwaccel-vaapi
> 
> after build mplayer vaapi, you can run the following command :
> 
> ./mplayer -vo vaapi <video file>

Please treat me as a novice when it comes to building anything in linux. Please be as specific as possible concerning building mplayer w/vaapi
Comment 21 haihao 2013-11-14 04:57:14 UTC
After clone the git branch, you can run configure 

$> ./configure --enable-vaapi --with-vaapi-prefix=<prefix to VA-API include and lib directories>

If all are ok, vaapi should be enabled, you can check the output from configure, 

E.g.

  Enabled optional drivers:
    Input: dvdnav(internal) ftp pvr tv-v4l2 tv librtmp libdvdcss(internal) dvdread(internal) vcd dvb smb networking 
    Codecs: ffmpeg(internal) qtx real xanim win32 libmpeg2(internal) libvorbis libmad liblzo 
    Audio output: alsa pulse oss v4l2 sdl mpegpes(dvb) 
    Video output: vaapi v4l2 matrixview opengl sdl pnm jpeg mpegpes(dvb) fbdev caca xvidix cvidix
                          ^^^^

Now you can run 'make' to build mplayer vaapi.

$> make
Comment 22 tradefor2points 2013-11-14 16:54:43 UTC
These are steps as I understand and see step 5 to verify if it is neccessary.

1. Run this command in terminal: git clone git://gitorious.org/vaapi/mplayer.git -b hwaccel-vaapi
2. Run this command in terminal: ./configure --enable-vaapi --with-vaapi-prefix=<prefix to VA-API include and lib directories>
The output should be similar to the following:
Enabled optional drivers:
    Input: dvdnav(internal) ftp pvr tv-v4l2 tv librtmp libdvdcss(internal) dvdread(internal) vcd dvb smb networking 
    Codecs: ffmpeg(internal) qtx real xanim win32 libmpeg2(internal) libvorbis libmad liblzo 
    Audio output: alsa pulse oss v4l2 sdl mpegpes(dvb) 
    Video output: vaapi v4l2 matrixview opengl sdl pnm jpeg mpegpes(dvb) fbdev caca xvidix cvidix
4. Run this command in terminal: make
5. Run this command in terminal: make install (is the step missing?)
6. ./mplayer -vo vaapi <video file>
Comment 23 tradefor2points 2013-11-14 16:58:58 UTC
I updated the steps

1. Run this command in terminal: mkdir mplayer_test
2. Run this command in terminal: cd mplayer_test
3. Run this command in terminal: git clone git://gitorious.org/vaapi/mplayer.git -b hwaccel-vaapi
4. Run this command in terminal: ./configure --enable-vaapi --with-vaapi-prefix=<prefix to VA-API include and lib directories>
The output should be similar to the following:
Enabled optional drivers:
    Input: dvdnav(internal) ftp pvr tv-v4l2 tv librtmp libdvdcss(internal) dvdread(internal) vcd dvb smb networking 
    Codecs: ffmpeg(internal) qtx real xanim win32 libmpeg2(internal) libvorbis libmad liblzo 
    Audio output: alsa pulse oss v4l2 sdl mpegpes(dvb) 
    Video output: vaapi v4l2 matrixview opengl sdl pnm jpeg mpegpes(dvb) fbdev caca xvidix cvidix
5. Run this command in terminal: make
6. Run this command in terminal: make install (is this step missing?)
7. Run this command in terminal: ./mplayer -vo vaapi <video file>
Comment 24 tradefor2points 2013-11-14 17:04:33 UTC
I updated libva-intel-driver to the current:

libva-intel-driver 1.2.2.pre1-1017~46c4901-ppa1~saucy 

The video is now currupted. The color is off. Reds, blues, etc...are not balanced but very bold on certain parts of the video. Kinda reminds me of sepa for a photo but with color extremes.
Comment 25 tradefor2points 2013-11-14 17:43:08 UTC
FYI
I also have a i7-3770 that runs the same software (Ubuntu 13.10 / LM16 and mythtv) except for:
libva 1.1.1-3
libva-intel-vaapi-driver 1.0.20-2

When I run the same test video using hardware acceleration with mythtv, there is no problem. I also have another bug with the i5-2405s:
https://bugs.freedesktop.org/show_bug.cgi?id=70151
when not using hardware acceleration. 

Not sure if this information helps or not.
Comment 26 haihao 2013-11-15 01:27:19 UTC
(In reply to comment #24)
> I updated libva-intel-driver to the current:
> 
> libva-intel-driver 1.2.2.pre1-1017~46c4901-ppa1~saucy 
> 
> The video is now currupted. The color is off. Reds, blues, etc...are not
> balanced but very bold on certain parts of the video. Kinda reminds me of
> sepa for a photo but with color extremes.

The test video is a MPEG-2 video, right ? If possible, could you share the video with me ?
Comment 27 tradefor2points 2013-11-15 04:30:18 UTC
(In reply to comment #26)
> (In reply to comment #24)
> > I updated libva-intel-driver to the current:
> > 
> > libva-intel-driver 1.2.2.pre1-1017~46c4901-ppa1~saucy 
> > 
> > The video is now currupted. The color is off. Reds, blues, etc...are not
> > balanced but very bold on certain parts of the video. Kinda reminds me of
> > sepa for a photo but with color extremes.
> 
> The test video is a MPEG-2 video, right ? If possible, could you share the
> video with me ?

Yes it is a mpeg2 video but it is 5-6GB. I need to find a way to cut the first 5 minutes...this is the most repeatable failure.
Comment 28 tradefor2points 2013-11-15 20:33:34 UTC
I have reduced the video file size to 400 MB. Please let me know how I can get the file to you.
Comment 29 tradefor2points 2013-11-21 15:56:19 UTC
Posting relivent info:

I have downloaded the file and reproduced the issue on SNB. We will look into this issue.

Thanks
Haihao
Comment 30 haihao 2013-11-26 01:35:11 UTC
Created attachment 89802 [details] [review]
patch to fix the hang issue on SNB

some frames in the video are corrupted, such as frame 211, 1105 (in decoding order), which result in wroing parameters from codec layer.  I tested the patch with mplayer vaapi, could you give a try to the patch ?
Comment 31 tradefor2points 2013-11-26 16:02:34 UTC
(In reply to comment #30)
> Created attachment 89802 [details] [review] [review]
> patch to fix the hang issue on SNB
> 
> some frames in the video are corrupted, such as frame 211, 1105 (in decoding
> order), which result in wroing parameters from codec layer.  I tested the
> patch with mplayer vaapi, could you give a try to the patch ?

I'm not sure how to test the patch. Is there some update to the intel driver? Please advise my options on how to test the patch.
Thanks
Comment 32 haihao 2013-11-27 00:31:59 UTC
> I'm not sure how to test the patch. Is there some update to the intel
> driver? 

Yes,  you should apply the patch to the intel driver source code firstly, then build the driver and run your player again.
Comment 33 tradefor2points 2013-11-27 04:36:27 UTC
(In reply to comment #32)
> > I'm not sure how to test the patch. Is there some update to the intel
> > driver? 
> 
> Yes,  you should apply the patch to the intel driver source code firstly,
> then build the driver and run your player again.

Please provide me with a step by step set of instructions to do as you ask. Remember, I'm not a programmer but I will do what I can.
Comment 34 tradefor2points 2013-11-27 04:40:50 UTC
If this ppa for the libva-intel-driver has the patch update I can use this venue to test.

https://launchpad.net/~aap/+archive/intel-drivers/+packages

Please advise.
Thanks
Comment 36 tradefor2points 2013-12-03 14:59:13 UTC
(In reply to comment #35)
> Could you try with the following tarball
> http://www.freedesktop.org/software/vaapi/testing/libva-intel-driver/libva-
> intel-driver-1.2.2.pre1.tar.bz2

Please provide me with a step by step set of instructions to do as you ask. Remember, I'm not a programmer but I will do what I can.
Comment 37 haihao 2013-12-04 00:52:14 UTC
You should download the tarball, extract the tarball via tar -xvjf filename.bz2 , enter the extracted directory  then build the driver in the following steps

./configure —prefix=/usr && make && sudo make install
Comment 38 tradefor2points 2013-12-04 20:10:04 UTC
(In reply to comment #37)
> You should download the tarball, extract the tarball via tar -xvjf
> filename.bz2 , enter the extracted directory  then build the driver in the
> following steps
> 
> ./configure —prefix=/usr && make && sudo make install

The following is the process....
1. Added ppa: (couldn't use the existing version .33 in Ubuntu 13.10 or LM16,
   needed version .34)
   sudo add-apt-repository ppa:aap/intel-drivers
2. Installed new libva:
   sudo apt-get update && sudo apt-get upgrade
3. Used this url for compiling patch:
   https://help.ubuntu.com/community/CompilingEasyHowTo
   Installed these packages:
   sudo apt-get install build-essential checkinstall libva-dev libdrm-dev
4. Downloaded the patch and extracted.
5. Setup working location:
   sudo chown $USER /usr/local/src
   sudo chmod u+rwx /usr/local/src
6. Copied patch from ~/Download dir to /usr/local/src
7. cd /usr/local/src
8. ./configure--prefix=/usr && make && sudo make install
9. Rebooted computer
10. Tested
Comment 39 tradefor2points 2013-12-04 20:13:14 UTC
Created attachment 90278 [details]
12-4-13 test error from patch test

The attached file is for the resulting error from the patch test on 12-4-13.
Comment 40 tradefor2points 2013-12-04 20:20:23 UTC
Created attachment 90279 [details]
Screenshot while using ver 1.2.2.pre1

The attached screenshot is the problem I refferred to several weeks ago, that still exists today after using the 1.2.2.pre1 ppa for the patch test.
Comment 41 tradefor2points 2013-12-04 20:40:42 UTC
(In reply to comment #40)
> Created attachment 90279 [details]
> Screenshot while using ver 1.2.2.pre1
> 
> The attached screenshot is the problem I refferred to several weeks ago,
> that still exists today after using the 1.2.2.pre1 ppa for the patch test.

See comment 24 for the video problem.
Comment 42 haihao 2013-12-09 01:43:58 UTC
I can not find the picture in the video. Are you using the same video file for testing ? If not, maybe it is another issue.
Comment 43 tradefor2points 2013-12-09 03:25:06 UTC
What picture are you referring too? The one that I posted? If so...that picture is a snapshot of how the whole video looked throughout the duration while using your latest ppa for libva 1.2.2.pre1. If be more specific if this wasn't the correct answer.
Comment 44 haihao 2013-12-09 05:12:33 UTC
(In reply to comment #43)
> What picture are you referring too?
> The one that I posted? If so...that
> picture is a snapshot of how the whole video looked throughout the duration
> while using your latest ppa for libva 1.2.2.pre1. 

Yes,  I know the picture you posted is a snapshot.  I can reproduced the GPU hang issue with your video,  however  I can't find  the scenario  in your video. 

> If be more specific if
> this wasn't the correct answer.
Comment 45 tradefor2points 2013-12-09 14:45:08 UTC
(In reply to comment #44)
> (In reply to comment #43)
> > What picture are you referring too?
> > The one that I posted? If so...that
> > picture is a snapshot of how the whole video looked throughout the duration
> > while using your latest ppa for libva 1.2.2.pre1. 
> 
> Yes,  I know the picture you posted is a snapshot.  I can reproduced the GPU
> hang issue with your video,  however  I can't find  the scenario  in your
> video. 
> 
> > If be more specific if
> > this wasn't the correct answer.

Again I'm still confused as to what you are asking.
Comment 46 haihao 2013-12-10 01:13:00 UTC
> 
> Again I'm still confused as to what you are asking.

The picture in your screenshot shows one frame of the video, right ? There are two person in your posted picture and  there is a letter of R on one's coat . However I can't find a similar image in your shared video.  So I guess we are using  different vidoes for testing,  and the color issue is a different issue.

I can reproduce the original GPU hang issue you described in comment 1. The patch attached  at comment 30 is to fix the original GPU hang issue, not the color issue.  Do you still experience the GPU hang issue ?  If not, we can close this bug and file a new bug to track the color issue.
Comment 47 tradefor2points 2013-12-10 08:21:56 UTC
Thank you for the clarification.
1. The test video is the same and it has not changed. I do try to keep a controlled environment. Please refer back to comment 27...."Yes it is a mpeg2 video but it is 5-6GB. I need to find a way to cut the first 5 minutes...this is the most repeatable failure." I gave you a 5 minute sample that had the most possible bsd errors in the shortest amount of time. So the whole 60 minute or 5-6GB video is the test video. 
The snapshot (attached: Screenshot while using ver 1.2.2.pre1) I posted wasn't from the 5 minute video but was from the 60 minute video. The reason I posted a clip from the 60 minute video was due to: I wanted to test the libva 1.2.2.pre1 a little longer than the 5 min, I wanted to make sure the color issue from comment 24 happen throughout the 60 min video not just in the 5 min video. The testing proved that. So the color error happened in both videos (which are the same again) but I posted the snapshot from the 60 minute video since it was the last video I tested.

2. The original error still exists. Please see post 39:
"Created attachment 90278 [details]
12-4-13 test error from patch test

The attached file is for the resulting error from the patch test on 12-4-13."

This post was missed for some reason.

Summation:

1. The original bsd error still exists using the 5 min video test and your patch on my equipment. That information is supplied in the attachment "12-4-13 test error from patch test". Please review.

2. An addition problem / error has arisen in the pursuit of solving the original bsd problem: during bsd testing using the libva 1.2.2.pre1 the video output has color problems shown in the attachment "Screenshot while using ver 1.2.2.pre1". Please see comment 24 for further information:
"I updated libva-intel-driver to the current:

libva-intel-driver 1.2.2.pre1-1017~46c4901-ppa1~saucy 

The video is now currupted. The color is off. Reds, blues, etc...are not balanced but very bold on certain parts of the video. Kinda reminds me of sepa for a photo but with color extremes."
This issue has yet to be addressed.

I hope that this clarification will make matters earier to solve the two at hand.
Comment 48 tradefor2points 2013-12-10 21:15:33 UTC
The last line of comment 47 should read....
I hope that this clarification will make matters easier to solve the two problems at hand.
Comment 49 tradefor2points 2013-12-11 16:40:01 UTC
I see that your patch was added to libva 1.2.2.prel and pre2.

-  * [c4063375dd864cc90739603a3547b8b37b78e461]
-    dec/mpeg2: ignore slices which aren't in raster scan order on SNB
-    
-    Sometimes codec layer incorrectly fills slice parameters due to
-    the corrupted video
+  * [f03aca41c77f04e93f06ad91547d46ab3ab5b34f]
+    VPP: Use the right top/bottom field flag used for DI
     
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71276
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72518
     Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
     
 
- -- Andrey Pavlenko <andrey.a.pavlenko@gmail.com>  Sun, 08 Dec 2013 14:18:09 +0400
+ -- Andrey Pavlenko <andrey.a.pavlenko@gmail.com>  Wed, 11 Dec 2013 19:34:17 +0400
diff -Nru libva-intel-driver-1.2.2.pre1-1027~9d0bd94/src/gen75_vpp_vebox.c libva-intel-driver-1.2.2.pre2-1029~355ce94/src/gen75_vpp_vebox.c
--- libva-intel-driver-1.2.2.pre1-1027~9d0bd94/src/gen75_vpp_vebox.c	2013-12-08 10:17:36.000000000 +0000
+++ libva-intel-driver-1.2.2.pre2-1029~355ce94/src/gen75_vpp_vebox.c	2013-12-11 15:33:44.000000000 +0000
Comment 50 tradefor2points 2013-12-11 16:46:54 UTC
Created attachment 90613 [details]
i915 error 12-11-13 libva 1.2.2.pre2

I have attached the error file for 12-11-13 using libva 1.2.2.pre2.

I decided to test again since the patch was added to the libva 1.2.2.pre1. The test yielded the same error. Please see the error file attached
Comment 51 tradefor2points 2013-12-11 16:49:38 UTC
Created attachment 90614 [details]
Screenshot while using ver 1.2.2.pre2

I have attached a screenshot of the color issue while testing for the bsd error using libva 1.2.2.pre2. The issue still exists.
Comment 52 haihao 2013-12-12 00:56:32 UTC
Which player are you using , Mythtv or mplayer-vaapi ?
Comment 53 haihao 2013-12-12 00:58:15 UTC
Do other MPEG-2 videos have the same issues ?
Comment 54 tradefor2points 2013-12-12 01:31:37 UTC
(In reply to comment #52)
> Which player are you using , Mythtv or mplayer-vaapi ?
Mythtv, this hasn't changed. I want to keep things consistant.
Comment 55 tradefor2points 2013-12-12 01:32:04 UTC
(In reply to comment #53)
> Do other MPEG-2 videos have the same issues ?
Yes
Comment 56 haihao 2013-12-16 07:14:45 UTC
Could you enable libva trace in your environment  ? You can follow the steps below

1.  export LIBVA_TRACE=~/libva_trace
2.  View the video by Mythtv
3. You should can find a log file of libva_trace.xxx.xxx in your home.
4.  Please attach the log file to this bug.
Comment 57 tradefor2points 2013-12-18 15:40:16 UTC
For this trial I used the same setup as in the previous test.

I copied and pasted your command (export LIBVA_TRACE=~/libva_trace) in terminal and executed. I next started mythtv with the test video. After the test video was completed I searched for the libva_trace file in my home directory and my hard drive but it wasn't to be found.
Comment 58 haihao 2013-12-25 08:18:58 UTC
Maybe the color issue is caused by contrast/saturation,  could you give a try to the patch attached at https://bugs.freedesktop.org/show_bug.cgi?id=73016 ?
Comment 59 haihao 2013-12-30 05:31:16 UTC
Do you still have the color issue ? You can fetch code from git repo if you don't want to apply the patch.

git clone git://anongit.freedesktop.org/vaapi/intel-driver
Comment 60 tradefor2points 2014-01-03 17:54:47 UTC
I attempted to compile your source code but ran into problems. Please review the following:

1. Loaded libva 1.2.2 pre:
A. libva-1.2.2.pre1-959~73a11b3-ppa1~saucy
   libva-intel-driver-1.2.2.pre2-1029~355ce94-ppa1~saucy 
   sudo add-apt-repository ppa:aap/intel-drivers
B. Installed / removed packages
   removed: i965-va-driver libva-intel-vaapi-driver
   Added: libva-intel-driver
   Upgraded: libva1 libva-x11-1 libva-glx1

2. Reboot computer.

3. Used this previous guide for making the packages (also posted in comment 38):
   https://help.ubuntu.com/community/CompilingEasyHowTo
   sudo apt-get install build-essential checkinstall libva-dev libdrm-dev git

4. Use this guide to compile and install git source code for Building Vaapi Intel Driver.
   https://01.org/linuxgraphics/documentation/build-guide-0
A. Downloaded development tree:
   cd ~/Downloads/intel-git-vaapi
   git clone git://anongit.freedesktop.org/vaapi/intel-driver
B. The guide says to use these dependencies:
   Install Build dependencies:   libXfiles-devel, libXexet-devel, libva-devel, libdrm-devel, libpciaccess-devel, mesa-libGL-devel
   But they are vague and incorrect file names. This is what I was able to come up with:
   libxfixes-dev libxext-dev libva-dev libdrm-dev libpciaccess-dev libgl1-mesa-dev
C. Setup directories:
   export $MY_DISTRO_PREFIX=/usr
   export $MY_DISTRO_LIBDIR=/usr/lib/x86_64-linux-gnu
   I tried this but ran into problems:
   @CI5 ~/Downloads/intel-git-vaapi $ export $MY_DISTRO_PREFIX=/usr
   bash: export: `=/usr': not a valid identifier
   @CI5 ~/Downloads/intel-git-vaapi $ sudo export $MY_DISTRO_PREFIX=/usr
   [sudo] password for x: 
   sudo: export: command not found
   I decided to just bypass the variables and use:
   ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
D. cd ~/Downloads/intel-git-vaapi/intel-driver
   ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
   I ran into issues here and had to stop:
   @CI5 ~/Downloads/intel-git-vaapi/intel-driver $ ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
   ./autogen.sh: 3: ./autogen.sh: autoreconf: not found
   ./autogen.sh: 6: ./autogen.sh: ./configure: not found

I am again requesting that you not treat me as a programmer, I am a novice and will do what I can to help out. I just spent over six hours trying to complete your request but failed due to lack of knowledge. From this point forward please give full detailed instructions on how to complete your tasks. If that can not be accomplished on your part then please redirect me to someone who can. I have been very patient during this 2 month period which has not resulted in any real progress up to this point. I have spent many hours of my time in trying to resolve the gpu issue. If what I have requested can not be met I will further my efforts to have the cpu replaced by Intel since I purchased a product that was promoted to perform as such but has not to date.
Comment 61 haihao 2014-01-07 02:51:15 UTC
First sorry for bring you any inconvenience. You listed some commands in comment 38, so  I thought you were aware all commands needed for building package from source code.

> C. Setup directories:
>    export $MY_DISTRO_PREFIX=/usr
>    export $MY_DISTRO_LIBDIR=/usr/lib/x86_64-linux-gnu
>    I tried this but ran into problems:
>    @CI5 ~/Downloads/intel-git-vaapi $ export $MY_DISTRO_PREFIX=/usr
>    bash: export: `=/usr': not a valid identifier

The right command should be
 export MY_DISTRO_PREFIX=/usr 
 export MY_DISTRO_LIBDIR=/usr/lib/x86_64-linux-gnu

>    @CI5 ~/Downloads/intel-git-vaapi $ sudo export $MY_DISTRO_PREFIX=/usr
>    [sudo] password for x: 
>    sudo: export: command not found

export is a buildin command in your shell, so you can't run it with sudo.

>    I decided to just bypass the variables and use:
>    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
> D. cd ~/Downloads/intel-git-vaapi/intel-driver
>    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
>    I ran into issues here and had to stop:
>    @CI5 ~/Downloads/intel-git-vaapi/intel-driver $ ./autogen.sh
> --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
>    ./autogen.sh: 3: ./autogen.sh: autoreconf: not found
>    ./autogen.sh: 6: ./autogen.sh: ./configure: not found

You should install autoconf automake etc first.  

$> sudo apt-get install autoconf automake

BTW autoreconf is a command, you can use some APT tools such as apt-file to find the package which includes this command.

> 
> I am again requesting that you not treat me as a programmer, I am a novice
> and will do what I can to help out. I just spent over six hours trying to
> complete your request but failed due to lack of knowledge. From this point
> forward please give full detailed instructions on how to complete your
> tasks. If that can not be accomplished on your part then please redirect me
> to someone who can. I have been very patient during this 2 month period
> which has not resulted in any real progress up to this point. I have spent
> many hours of my time in trying to resolve the gpu issue. If what I have
> requested can not be met I will further my efforts to have the cpu replaced
> by Intel since I purchased a product that was promoted to perform as such
> but has not to date.
Comment 62 tradefor2points 2014-01-07 21:45:43 UTC
1-7-14
3. Installed autoconf and automake.
   sudo apt-get install autoconf automake
4.
C. Setup directories:
   export MY_DISTRO_PREFIX=/usr
   export MY_DISTRO_LIBDIR=/usr/lib/x86_64-linux-gnu

D. cd ~/Downloads/intel-git-vaapi/intel-driver
   ./autogen.sh --prefix=MY_DISTRO_PREFIX --libdir=MY_DISTRO_LIBDIR
   Ran into another error:
   @CI5 ~/Downloads/intel-git-vaapi/intel-driver $ ./autogen.sh --prefix=MY_DISTRO_PREFIX --libdir=MY_DISTRO_LIBDIR
   autoreconf: Entering directory `.'
   autoreconf: configure.ac: not using Gettext
   autoreconf: running: aclocal 
   autoreconf: configure.ac: tracing
   autoreconf: configure.ac: not using Libtool
   autoreconf: running: /usr/bin/autoconf
   configure.ac:59: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
   configure.ac:60: error: possibly undefined macro: AC_PROG_LIBTOOL
   autoreconf: /usr/bin/autoconf failed with exit status: 1
   configure: error: expected an absolute directory name for --prefix: MY_DISTRO_PREFIX
Comment 63 haihao 2014-01-09 02:02:30 UTC
Install libtool first:

$> sudo apt-get install libtool

step 4(d) should be  

$> ./autogen.sh --prefix=$MY_DISTRO_PREFIX --libdir=$MY_DISTRO_LIBDIR

(BTW you can specify prefix and libdir directly:
 $> ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu)
Comment 64 tradefor2points 2014-01-09 14:25:50 UTC
Here is the results of the patch installtion.

1-9-14
3. Installed libtool
   sudo apt-get install libtool

4.
D. cd ~/Downloads/intel-git-vaapi/intel-driver
   ./autogen.sh --prefix=$MY_DISTRO_PREFIX --libdir=$MY_DISTRO_LIBDIR
   Ran into another error:
   @CI5 ~/Downloads/intel-git-vaapi/intel-driver $ ./autogen.sh --prefix=$MY_DISTRO_PREFIX --libdir=$MY_DISTRO_LIBDIR
   autoreconf: Entering directory `.'
   autoreconf: configure.ac: not using Gettext
   autoreconf: running: aclocal 
   autoreconf: configure.ac: tracing
   autoreconf: running: libtoolize --copy
   libtoolize: putting auxiliary files in `.'.
   libtoolize: copying file `./ltmain.sh'
   libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
   libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
   libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
   autoreconf: running: /usr/bin/autoconf
   autoreconf: running: /usr/bin/autoheader
   autoreconf: running: automake --add-missing --copy --no-force
   configure.ac:60: installing './config.guess'
   configure.ac:60: installing './config.sub'
   autoreconf: Leaving directory `.'
   configure: error: expected an absolute directory name for --libdir: 

   Decided to use the non-variable command
   ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
@CI5 ~/Downloads/intel-git-vaapi/intel-driver $ ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether byte ordering is bigendian... no
checking for ANSI C header files... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for sin in -lm... yes
checking for log2f... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for DRM... yes
checking for GEN4ASM... no
checking for intel-gen4asm... no
checking for LIBVA_DEPS... yes
checking for LIBVA_DRM_DEPS... yes
checking drm_fourcc.h usability... yes
checking drm_fourcc.h presence... yes
checking for drm_fourcc.h... yes
checking for LIBVA_X11_DEPS... yes
checking for VA drivers path... /usr/lib/dri
checking for EGL... no
checking EGL/egl.h usability... no
checking EGL/egl.h presence... no
checking for EGL/egl.h... no
checking for eglGetDisplay in -lEGL... no
checking for WAYLAND... no
checking for LIBVA_WAYLAND_DEPS... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating debian.upstream/Makefile
config.status: creating src/Makefile
config.status: creating src/shaders/Makefile
config.status: creating src/shaders/h264/Makefile
config.status: creating src/shaders/h264/ildb/Makefile
config.status: creating src/shaders/h264/mc/Makefile
config.status: creating src/shaders/mpeg2/Makefile
config.status: creating src/shaders/mpeg2/vld/Makefile
config.status: creating src/shaders/post_processing/Makefile
config.status: creating src/shaders/post_processing/gen5_6/Makefile
config.status: creating src/shaders/post_processing/gen7/Makefile
config.status: creating src/shaders/post_processing/gen75/Makefile
config.status: creating src/shaders/render/Makefile
config.status: creating src/shaders/utils/Makefile
config.status: creating src/shaders/vme/Makefile
config.status: creating src/wayland/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands

libva-intel-driver configuration summary:

VA-API version ................... : 0.34.0
VA-API drivers path .............. : /usr/lib/dri
Windowing systems ................ : drm x11
Comment 65 tradefor2points 2014-01-09 14:40:10 UTC
Created attachment 91757 [details]
i915 error state - bsd ring

i915 error state - bsd ring (the file name is incorrect...reads i965 but is for i915)
Comment 66 tradefor2points 2014-01-09 14:42:27 UTC
I rebooted the computer and tested the color correction patch and the result was no change. The video output was the same as the previous photo. I also captured another bsd ring error that I attached.
Please advise.
Comment 67 tradefor2points 2014-01-09 15:19:03 UTC
Created attachment 91762 [details]
i915 error state 1-9-14 after color correction patch

UPDATE....PLEASE DISREGARD COMMENTS 65 AND 66 and attachment 91757 [details]. The make and sudo make install were not executed.

After properly completing the color correction patch the test result was a normal video picture. Also I captured a bsd ring error and attached as "i915 error state 1-9-14 after color correction patch".
Comment 68 tradefor2points 2014-01-16 09:35:41 UTC
Please give an update to the status of the BSD ring error issue.
Thanks
Comment 69 haihao 2014-01-20 02:25:12 UTC
I can't reproduce the issue by mplayer-vaapi and gstreamer-vaapi, maybe I need to build Mythtv to test it.
Comment 70 tradefor2points 2014-01-22 15:44:10 UTC
(In reply to comment #69)
> I can't reproduce the issue by mplayer-vaapi and gstreamer-vaapi, maybe I
> need to build Mythtv to test it.

The debian or ubuntu based distros will be the best option for mythtv. Ubuntu will be the most used but the 12.04 is current since it is only updated every 2 years. Let me know if you require any assistance.
Comment 71 tradefor2points 2014-01-28 15:18:09 UTC
I was able to reproduce the bsd ring error on XBMC for linux using debian unstable.
Comment 72 tradefor2points 2014-02-07 14:25:15 UTC
Please consider the bug closed at the current time unless someone else comes forward with the same issue. Intel has replaced my i5 2405S with a i7 3770S. This changes the video from HD3000 to HD4000 which "just works" as I explained early on. Thanks for your help!
Comment 73 Lizhong 2014-02-07 14:25:42 UTC
Annual Leave on Dec.30/31, 2013. Please expect delayed email response.
Comment 74 haihao 2014-03-28 06:48:57 UTC
I can not reproduce this issue and according to comment #72, the reporter has upgraded his machine. so Marked it as resolved. If someone else still experience the similar issue, feel free to reopen it or file a new bug to track your issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.