Bug 30500 - [SNB] XVideo crashes the GPU
Summary: [SNB] XVideo crashes the GPU
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: All Linux (All)
: medium critical
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 35394 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-30 07:45 UTC by Matthias Hopf
Modified: 2011-03-17 18:01 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Disable XVideo on SandyBridge by default (1.95 KB, patch)
2010-09-30 07:47 UTC, Matthias Hopf
no flags Details | Splinter Review
Xorg.0.log (24.43 KB, text/plain)
2010-10-04 15:45 UTC, roberth
no flags Details
xf86-video-intel-fix-8784c4f.diff (657 bytes, patch)
2010-10-05 18:43 UTC, Stefan Dirsch
no flags Details | Splinter Review

Description Matthias Hopf 2010-09-30 07:45:34 UTC
Trying to display anything via XVideo crashes SandyBridge, bringing the Xserver to a halt.

I understand that XVideo isn't supported yet, but it shouldn't freeze the system until it's working.
Comment 1 Matthias Hopf 2010-09-30 07:47:36 UTC
Created attachment 39070 [details] [review]
Disable XVideo on SandyBridge by default

We will be using this patch until XVideo is working fine on SandyBridge.
It re-adds the XVideo option (why had it been removed in the first place?) and defaults to Enable on all platforms but SandyBridge.

Please consider this for the next release :-)
Comment 2 Chris Wilson 2010-10-01 13:47:03 UTC
In the short-term there is nothing we can do but to disable XVideo on Sandybridge -- the shaders have not yet been written. :(

commit 8784c4f5a1524fb979b00c7ce7981cbc1dcf0ec0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Oct 1 21:40:36 2010 +0100

    video: Disable TextureAdaptor for Sandybridge
    
    The acceleration code does not yet exist, so we try to use gen4 shaders
    which hangs the chip and makes everybody upset. Disable it until such a
    time as support is written for Sandybridge XVideo.
    
    Reported-by: Matthias Hopf <mhopf@suse.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30500
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 3 roberth 2010-10-04 15:43:15 UTC
(In reply to comment #2)
> In the short-term there is nothing we can do but to disable XVideo on
> Sandybridge -- the shaders have not yet been written. :(
> 
> commit 8784c4f5a1524fb979b00c7ce7981cbc1dcf0ec0
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Fri Oct 1 21:40:36 2010 +0100
> 
>     video: Disable TextureAdaptor for Sandybridge
> 
>     The acceleration code does not yet exist, so we try to use gen4 shaders
>     which hangs the chip and makes everybody upset. Disable it until such a
>     time as support is written for Sandybridge XVideo.
> 
>     Reported-by: Matthias Hopf <mhopf@suse.de>
>     Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30500
>     Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I don't think this commit is actually working? gstreamer still tries to use Xv and is hanging. The patch attached to this bug works.


X-Video Extension version 2.2
screen #0
  Adaptor #0: "Intel(R) Textured Video"
    number of ports: 16
    port base: 81
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x21
    number of attributes: 3
      "XV_BRIGHTNESS" (range -128 to 127)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range 0 to 255)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_SYNC_TO_VBLANK" (range -1 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
    maximum XvImage size: 2048 x 2048
    Number of image formats: 5
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x59565955 (UYVY)
        guid: 55595659-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x434d5658 (XVMC)
        guid: 58564d43-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
Comment 4 roberth 2010-10-04 15:45:47 UTC
Created attachment 39160 [details]
Xorg.0.log

Xorg.0.log from an xf86-video-intel git checkout from 455f2939a661764 on a sandybridge-m GT2 device.
Comment 5 roberth 2010-10-04 20:38:38 UTC
After the sandybridge shadow changes it is working.

[    75.441] (WW) intel(0): Disabling Xv because no adaptors could be initialized.
Comment 6 Stefan Dirsch 2010-10-04 22:43:32 UTC
(In reply to comment #5)
> After the sandybridge shadow changes it is working.
> 
> [    75.441] (WW) intel(0): Disabling Xv because no adaptors could be
> initialized.

--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -363,7 +363,7 @@ void I830InitVideo(ScreenPtr screen)
         * supported hardware.
         */
        if (scrn->bitsPerPixel >= 16 &&
-           (IS_I9XX(intel) || IS_I965G(intel)) &&
+           (IS_I9XX(intel) || (IS_I965G(intel) && !IS_GEN6(intel))) &&
            !intel->use_shadow) {
                texturedAdaptor = I830SetupImageVideoTextured(screen);
                if (texturedAdaptor != NULL) {

The reason is that && has a higher precedence than || in C. I guess we want
to fix commit 8784c4f5a1524fb979b00c7ce7981cbc1dcf0ec0 instead. ;-)
Comment 7 Ian Romanick 2010-10-05 17:25:41 UTC
Using [SNB] as the tag for bugs specific to Sandybridge hardware.
Comment 8 Stefan Dirsch 2010-10-05 18:36:19 UTC
I didn't read the code carefully. The issue is not the operator precedence, but
the problem is that IS_965G(...) is already part of IS_9XX(...). I'm going to attach a fix.
Comment 9 Stefan Dirsch 2010-10-05 18:43:58 UTC
Created attachment 39201 [details] [review]
xf86-video-intel-fix-8784c4f.diff

fix for commit #8784c4f
Comment 10 Chris Wilson 2010-10-07 05:37:26 UTC
"Fixed" for good, I hope!

commit 4083197a44d1a1a05d33654b3c7d6e96d7472fe7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 7 12:45:02 2010 +0100

    Include a chipset generation number to clarify device specific paths.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 11 Gordon Jin 2011-03-17 18:01:28 UTC
*** Bug 35394 has been marked as a duplicate of this bug. ***


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.