Bug 9636 - blue window using xv on XGI XP5 SE (ECS 532)
Summary: blue window using xv on XGI XP5 SE (ECS 532)
Status: RESOLVED DUPLICATE of bug 2528
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Trident (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-13 06:46 UTC by David Palacio
Modified: 2008-01-06 12:28 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Palacio 2007-01-13 06:46:49 UTC
Hello,
When Xv are used as video output the window is all blue. xvinfo shows the
following output.
$ xvinfo 
X-Video Extension version 2.2
screen #0
  Adaptor #0: "Trident Backend Scaler"
    number of ports: 1
    port base: 65
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x23
      depth 24, visualID 0x24
      depth 24, visualID 0x25
      depth 24, visualID 0x26
    number of attributes: 5
      "XV_COLORKEY" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66046)
      "XV_SATURATION" (range 0 to 187)
              client settable attribute
              client gettable attribute (current value is 80)
      "XV_BRIGHTNESS" (range 0 to 63)
              client settable attribute
              client gettable attribute (current value is 45)
      "XV_HUE" (range 0 to 360)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range 0 to 7)
              client settable attribute
              client gettable attribute (current value is 4)
    maximum XvImage size: 1024 x 1024
    Number of image formats: 3
      id: 0x36315652 (RV16)
        guid: 52563136-0000-0000-0000-000000000000
        bits per pixel: 16
        number of planes: 1
        type: RGB (packed)
        depth: 16
        red, green, blue masks: 0xf800, 0x7e0, 0x1f
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
Thanks
Comment 1 Alex Deucher 2007-01-17 07:11:55 UTC
Are you using EXA or XAA?
Comment 2 David Palacio 2007-01-17 12:00:31 UTC
I probe the two options with the same result.
Comment 3 Jarod Wilson 2007-02-21 11:25:53 UTC
I'm seeing the same with an XGI card, but only with 1920x1080i source material at the moment. Output display is a 1280x1024 LCD, and 1280x720p material plays back fine, as does 720x480i material. Its only the 1920x1080i stuff that results in blue where the video ought to be. Xv scaling bug? Not enough offscreen memory being allocated for that big an Xv surface?
Comment 4 Alex Deucher 2007-02-21 12:56:06 UTC
(In reply to comment #3)
> I'm seeing the same with an XGI card, but only with 1920x1080i source material
> at the moment. Output display is a 1280x1024 LCD, and 1280x720p material plays
> back fine, as does 720x480i material. Its only the 1920x1080i stuff that
> results in blue where the video ought to be. Xv scaling bug? Not enough
> offscreen memory being allocated for that big an Xv surface?
> 

I'm not sure what the actual overlay limits are but the driver currently only announces a 1024x1024 overlay:

    maximum XvImage size: 1024 x 1024

That's probably why you are getting the colorkey rather than the overlay data.  Also there may be slight differences in the overlay on the XP5 which could cause problems as well.  I don't know that alanh messed with the overlay when he added XP5 support.
Comment 5 Jarod Wilson 2007-02-21 13:00:02 UTC
I was *just* about to add these comments when you commented, Alex.

I saw the 1024x1024 max xv texture size, and that prompted me to look at my own output. Its 1920x1080 here. I'd have to double-check, but I'm pretty sure the video was 1920x1080, and not 1920x1088, which some broadcasters do to combat overscan issues. (In either case, upping the max xv texture size a bit would be good).

Additional info:

$ /sbin/lspci -v -s 02:00.0
02:00.0 VGA compatible controller: XGI - Xabre Graphics Inc Volari V3XT/V5/V8 (prog-if 00 [VGA])
        Subsystem: XGI - Xabre Graphics Inc Volari V3XT/V5/V8
        Flags: bus master, 66MHz, medium devsel, latency 39, IRQ 5
        BIST result: 00
        Memory at c0000000 (32-bit, prefetchable) [size=256M]
        Memory at d9000000 (32-bit, non-prefetchable) [size=256K]
        I/O ports at c000 [size=128]
        [virtual] Expansion ROM at d8000000 [disabled] [size=64K]
        Capabilities: <access denied>

$ xvinfo
X-Video Extension version 2.2
screen #0
  Adaptor #0: "SIS 300/315/330 series Video Overlay"
    number of ports: 1
    port base: 60
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x22
      depth 24, visualID 0x23
      depth 24, visualID 0x24
      depth 24, visualID 0x25
    number of attributes: 20
      "XV_COLORKEY" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66046)
      "XV_BRIGHTNESS" (range -128 to 127)
              client settable attribute
              client gettable attribute (current value is 10)
      "XV_CONTRAST" (range 0 to 7)
              client settable attribute
              client gettable attribute (current value is 2)
      "XV_SATURATION" (range -7 to 7)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_HUE" (range -8 to 7)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_AUTOPAINT_COLORKEY" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 1)
      "XV_SET_DEFAULTS" (range 0 to 0)
              client settable attribute
      "XV_TVXPOSITION" (range -32 to 32)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_TVYPOSITION" (range -32 to 32)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_GAMMA_RED" (range 100 to 10000)
              client settable attribute
              client gettable attribute (current value is 1000)
      "XV_GAMMA_GREEN" (range 100 to 10000)
              client settable attribute
              client gettable attribute (current value is 1000)
      "XV_GAMMA_BLUE" (range 100 to 10000)
              client settable attribute
              client gettable attribute (current value is 1000)
      "XV_DISABLE_GRAPHICS" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_DISABLE_GRAPHICS_LR" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_DISABLE_COLORKEY" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_USE_CHROMAKEY" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_INSIDE_CHROMAKEY" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CHROMAMIN" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66046)
      "XV_CHROMAMAX" (range 0 to 16777215)
              client settable attribute
              client gettable attribute (current value is 66047)
      "XV_SWITCHCRT" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
    maximum XvImage size: 1920 x 1080
    Number of image formats: 9
      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: 0x59565955 (UYVY)
        guid: 55595659-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x35315652 (RV15)
        guid: 52563135-0000-0000-0000-000000000000
        bits per pixel: 16
        number of planes: 1
        type: RGB (packed)
        depth: 15
        red, green, blue masks: 0x7c00, 0x3e0, 0x1f
      id: 0x36315652 (RV16)
        guid: 52563136-0000-0000-0000-000000000000
        bits per pixel: 16
        number of planes: 1
        type: RGB (packed)
        depth: 16
        red, green, blue masks: 0xf800, 0x7e0, 0x1f
      id: 0x55595659 (YVYU)
        guid: 59565955-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x3231564e (NV12)
        guid: 4e563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 2
        type: YUV (planar)
      id: 0x3132564e (NV21)
        guid: 4e563231-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 2
        type: YUV (planar)
Comment 6 Alex Deucher 2007-02-21 14:34:36 UTC
(In reply to comment #5)
> I was *just* about to add these comments when you commented, Alex.
> 
> I saw the 1024x1024 max xv texture size, and that prompted me to look at my own
> output. Its 1920x1080 here. I'd have to double-check, but I'm pretty sure the
> video was 1920x1080, and not 1920x1088, which some broadcasters do to combat
> overscan issues. (In either case, upping the max xv texture size a bit would be
> good).
> 
> Additional info:
> 
> $ /sbin/lspci -v -s 02:00.0
> 02:00.0 VGA compatible controller: XGI - Xabre Graphics Inc Volari V3XT/V5/V8
> (prog-if 00 [VGA])

<snip>

> 
> $ xvinfo
> X-Video Extension version 2.2
> screen #0
>   Adaptor #0: "SIS 300/315/330 series Video Overlay"
>     number of ports: 1

Your card is one of the sis based xgi chips. the XP5 is trident based.  These are actually separate issues as they involve different drivers (sis vs. trident).  In your case I would guess the overlay is on the wrong crtc.  Try toggling the XV_SWITCHCRT attribute or if you are using dualhead try the other crtc.
Comment 7 Jarod Wilson 2007-02-21 15:49:45 UTC
(In reply to comment #6)
> Your card is one of the sis based xgi chips. the XP5 is trident based.  These
> are actually separate issues as they involve different drivers (sis vs.
> trident).

Whoops, saw "XGI" and somehow ignored the trident bit. In that case, I'll open a new bug once I do a bit more poking...

> In your case I would guess the overlay is on the wrong crtc.  Try
> toggling the XV_SWITCHCRT attribute or if you are using dualhead try the other
> crtc.

Single-head only. I'll double-check that Xv is on the right crtc, but I'm pretty sure the 720p and 480i playback that worked fine was using Xv on this display.
Comment 8 Jarod Wilson 2007-02-23 06:45:41 UTC
...and I'm actually not going to bother with opening a bug, my situation turned out to be application-specific. Application is question tries to use a multiple of 16 for its Xv surface sizes, thus was trying 1920x1088, which was indeed bigger than the max supported surface (1920x1080). Sorry for the noise. :)
Comment 9 Alex Deucher 2007-02-23 07:03:00 UTC
(In reply to comment #8)
> ...and I'm actually not going to bother with opening a bug, my situation turned
> out to be application-specific. Application is question tries to use a multiple
> of 16 for its Xv surface sizes, thus was trying 1920x1088, which was indeed
> bigger than the max supported surface (1920x1080). Sorry for the noise. :)
> 

You could try bumping the limit to 1088 in the driver. It may actually support 2048 or something like that, but was limited to 1080 since that is a common HDTV size.
Comment 10 Jarod Wilson 2007-02-23 14:00:27 UTC
(In reply to comment #9)
> (In reply to comment #8)
> You could try bumping the limit to 1088 in the driver. It may actually support
> 2048 or something like that, but was limited to 1080 since that is a common
> HDTV size.

Just nudging up to 1088 works, and I filed bug 10075 to track it. Thanks much!
Comment 11 Daniel Stone 2007-02-27 01:35:41 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 12 Alan Hourihane 2008-01-06 12:28:53 UTC
See bug 

*** This bug has been marked as a duplicate of bug 2528 ***


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.