Bug 1462 - Big pink line on right side of screen when playing high-res videos with mplayer using Xv on Radeon 9200
Summary: Big pink line on right side of screen when playing high-res videos with mplay...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 3226 12743 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-24 12:42 UTC by Bernhard Rosenkraenzer
Modified: 2007-10-09 05:24 UTC (History)
11 users (show)

See Also:
i915 platform:
i915 features:


Attachments
quick workaround (1.52 KB, patch)
2006-11-20 12:52 UTC, Roland Scheidegger
no flags Details | Splinter Review

Description Bernhard Rosenkraenzer 2004-09-24 12:42:32 UTC
Playing a HDTV 1920x1080 video on a Radeon 9200 using Xorg (tried 6.8.1 and 
CVS as of 2004/09/24) in 1024x768 works nicely [using mplayer -vo xv -ao alsa 
-fs test.mpg], but there's an approximately 100 pixels white pink line on the 
right side of the video. 
 
xvinfo reports the max. XvImage size as 2048x2048. 
 
I'm seeing the exact same result with both 16 bit and 24 bit depth, so it's 
not a short of videoram issue; the same video can be played perfectly on a box 
with a SiS 651 chipset, so it's not a corrupted video.
Comment 1 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-21 08:30:41 UTC
I report the same bug on Radeon 9200 and Radeon M9 in Xorg 6.8.2. The Xv clearly
has some problems handling the 1920x1080 overlay (in any screen resolution).
However this is not a hardware limitation, it works in XP with ATI drivers just
fine.
Comment 2 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-21 08:35:02 UTC
*** Bug 3226 has been marked as a duplicate of this bug. ***
Comment 3 Hanno Böck 2005-10-21 05:17:27 UTC
Still there in rc1. 
Can we make this a blocker for the 6.9/7.0-release? 
Comment 4 Hanno Böck 2005-10-29 00:48:47 UTC
> Außerdem war die Gewwerkschaft BCE noch nie für einen Atomausstieg.  
> Sowohl in Ahaus als auch in Gronau haben die gegen uns demonstriert, für  
> ihre Arbeitsplätze. Dumm wie Brot. 
 
Ich denke, es ist wichtig, dass wir uns jetzt nicht vor den Karren  
"Atomausstieg rot-grün verteidigen" spannen lassen... 
bis später, markus 
Comment 5 Hanno Böck 2005-11-22 11:06:25 UTC
Sorry for that comment above, just saw this, seems to be accidently pasted and 
clicked by me, no idea how. 
Comment 6 Michel Dänzer 2005-12-06 04:15:22 UTC
I'm not sure this deserves to be a blocker for 6.9/7.0. It's not a regression
over older releases, it's not even clear that it's not at least partly a
hardware limitation. Even ignoring that, it's a pretty exotic use case with a
pretty specific setup, so the affected user base should be fairly small.
Comment 7 Jared Johnson 2005-12-28 17:03:54 UTC
just chiming in, I get this bug on my radeon 9250 as well
Comment 8 Jared Johnson 2006-01-01 22:04:36 UTC
i'm just a noob, but i notice this bug was reported over a year ago.  any
progress at all?  i would gladly donate my 9250 to someone that would like to
fix this, since it is nearly worthless to me if it can't do high res playback
with XV :P
Comment 9 Stephen 2006-01-26 07:14:23 UTC
Michael, I don't think this is an exotic case at all.

It isn't a hardware limitation as I have used the same card (r9250) under Win XP
for 1080i and 1080p content without problems, where x.org and the radeon driver
give the pink band on either. 

Here's why it isn't an exotic case:
-the R92x0 cards are the best-performing (readily available) add-on cards with
open drivers, with full 3D support
-they are fanless, i.e. silent, which makes them perfect for HTPC setups such as
mythtv
-many MANY broadcasts are now in 1080i and more to come

This means this is a serious problem for a significant proportion of users.
Please give this bug some love and care!!
Comment 10 Alex Deucher 2006-01-26 08:32:37 UTC
(In reply to comment #7)
> Michael, I don't think this is an exotic case at all.
> 
> It isn't a hardware limitation as I have used the same card (r9250) under Win XP
> for 1080i and 1080p content without problems, where x.org and the radeon driver
> give the pink band on either. 

windows may not be using the video overlay.  it may be using a blitter interface
or YUV textured rectangles.  It's still possible that this is at least partly a
hardware limitation.
Comment 11 Stephen 2006-01-26 09:50:50 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Michael, I don't think this is an exotic case at all.
> > 
> > It isn't a hardware limitation as I have used the same card (r9250) under Win XP
> > for 1080i and 1080p content without problems, where x.org and the radeon driver
> > give the pink band on either. 
> 
> windows may not be using the video overlay.  it may be using a blitter interface
> or YUV textured rectangles.  It's still possible that this is at least partly a
> hardware limitation.
> 

Is there anything that makes you think that this is a hardware limitation
though? It seems like an easy way to ignore the bug, and this is not an old
card. It has what should be enough RAM (128Mb), and like Bernhard said in the
first place, FWIW xvinfo suggests it's capable of 2048x2048.
Comment 12 Alex Deucher 2006-01-26 13:23:40 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Michael, I don't think this is an exotic case at all.
> > > 
> > > It isn't a hardware limitation as I have used the same card (r9250) under
Win XP
> > > for 1080i and 1080p content without problems, where x.org and the radeon
driver
> > > give the pink band on either. 
> > 
> > windows may not be using the video overlay.  it may be using a blitter interface
> > or YUV textured rectangles.  It's still possible that this is at least partly a
> > hardware limitation.
> > 
> 
> Is there anything that makes you think that this is a hardware limitation
> though? It seems like an easy way to ignore the bug, and this is not an old
> card. It has what should be enough RAM (128Mb), and like Bernhard said in the
> first place, FWIW xvinfo suggests it's capable of 2048x2048.

I'm not sure what the limits of the overlay are off hand, but as you and others
have noted, it doesn't seem to work for especially large videos.  I don't see
anything off hand in the source or the radeon documentation indicating that
anything special needs to be done for very large overlays, hence it seems like a
hardware issue.  The texture engine should be able to handle it, so that may be
what windows does.
Comment 13 Doug Lee 2006-02-23 00:06:36 UTC
I have the same problem on my radeon VE and 9250 with 64 bit chip to memory  
bus. Has anyone verified that this bug shows up on the more expensive cards  
with 128 bit buswidth. Maybe xvinfo is indicating the chips capabilities 
correctly only if fast-wide ram is attached.  
Comment 14 Jerry Vonk 2006-03-12 05:43:55 UTC
I have the sam problem on the X800 the fglrx driver from ATI does this ok.
Comment 15 Jerry Vonk 2006-03-12 05:47:38 UTC
(In reply to comment #12)
> I have the sam problem on the X800 the fglrx driver from ATI does this ok.

(must be late)

I have the same problem on the RADEON X600,  the fglrx driver from ATI does 
this ok (but has worse problems).

Comment 16 Benjamin Herrenschmidt 2006-03-13 13:50:22 UTC
Ok, there seem to be some dodgy code in there indeed. Can you guys try    
changing those few bits and tell me if that helps ? Try both changes    
separately then together and tell me if anything helps.    
    
In radeon_video.c, find RADEONAllocAdaptor() function. The first bit to change    
looks like that:    
    
     /* overlay scaler line length differs for different revisions    
       this needs to be maintained by hand  */   
    switch(info->ChipFamily){   
    	case CHIP_FAMILY_R200:   
	case CHIP_FAMILY_R300:   
		pPriv->overlay_scaler_buffer_width=1920;   
		break;   
	default:   
		pPriv->overlay_scaler_buffer_width=1536;   
    	}   
   
As an experiment, can you try removing it and forcing that:   
   
	pPriv->overlay_scaler_buffer_width=1920;   
   
I suspect the list of chip families in that list is very incomplete.   
   
Another one that might help the 92xx is this bit:   
   
    if (IS_R300_VARIANT ||   
        (info->ChipFamily == CHIP_FAMILY_R200))   
	x_off = 0;   
   
Try changing it to:   
   
   
    if (IS_R300_VARIANT ||   
        info->ChipFamily == CHIP_FAMILY_R200 ||  
        info->ChipFamily == CHIP_FAMILY_RV280)  
	x_off = 0;   
   
Then let me know the results. 
 
 
Comment 17 Hanno Böck 2006-03-14 03:54:33 UTC
Tried both separately and together, no change at all. 
Comment 18 Roland Scheidegger 2006-03-16 00:43:35 UTC
FWIW, fglrx can't handle that neither (8.23.7, rv250). Exactly the same pink
line (which is just the colorkey) is seen.
Comment 19 Roland Scheidegger 2006-03-20 13:14:38 UTC
Some more tests. Interestingly, this actually works on my old radeon (7200).
I've also increased the buffer_width there to 1920 and it STILL worked (I can
output it only downscaled, but the resulting step_by values were indeed
different (1 instead of 2) when doing that).
I have no idea why it doesn't work with the rv250, ati's spec page even mentions
it should be possible to do 1920 (mentioned under video features, along with
deinterlacing and such). Maybe that's a misprint, or it's a chip bug, or it
needs some different setup (is the overlay setup really 100% identical between
r100 and r200 chips?).
Comment 20 Jan Schmidt 2006-04-12 07:27:58 UTC
Just to chime in with an AOL, I also see this bug on a Radeon 9000M, with X.org
7.0.0 (Ubuntu Dapper)

Here's an easy way to reproduce it:

gst-launch-0.10 videotestsrc ! video/x-raw-yuv,width=1536 ! xvimagesink

Change the width to anything larger to see the pink (which doesn't actually
appear to be the color key here)
Comment 21 Michel Dänzer 2006-04-12 17:48:48 UTC
(In reply to comment #18)

Thanks for the easy way to reproduce. I don't see the pink line, running on an
M9 as well, but I'm running more or less current CVS, maybe Roland's Xv fixes
fixed this? 
Comment 22 Jan Schmidt 2006-04-12 19:21:42 UTC
(In reply to comment #19)
> (In reply to comment #18)
> 
> Thanks for the easy way to reproduce. I don't see the pink line, running on an
> M9 as well, but I'm running more or less current CVS, maybe Roland's Xv fixes
> fixed this? 

Is it possible for me to build that module and expect it to run against the
installed dapper Xorg I have, or will I need to build a whole stack?
Comment 23 Michel Dänzer 2006-04-12 20:02:50 UTC
The CVS ati-1-0-branch should build on dapper.
Comment 24 Roland Scheidegger 2006-04-12 20:53:35 UTC
(In reply to comment #21)
> The CVS ati-1-0-branch should build on dapper.
A snapshot should do too. That said, I still get that pink line, the xv fixes
didn't change that. Using native yuv9 planar hw overlay format instead of
converting to packed yv12 (not in cvs as it's a bit broken) doesn't help neither.
btw, that easy to reproduce way doesn't work for me at all, dunno if that's a
problem with the gstreamer build (0.10.4)
gst-launch-0.10 videotestsrc ! video/x-raw-yuv,width=1536 ! xvimagesink
FEHLER: Leitung konnte nicht konstruiert werden: Kein Element »videotestsrc«.
Comment 25 Jan Schmidt 2006-04-12 21:01:50 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > The CVS ati-1-0-branch should build on dapper.
> A snapshot should do too. That said, I still get that pink line, the xv fixes
> didn't change that. Using native yuv9 planar hw overlay format instead of
> converting to packed yv12 (not in cvs as it's a bit broken) doesn't help neither.

It turns out that the current dapper package has current CVS of the
ati-1-0-branch anyway.

> btw, that easy to reproduce way doesn't work for me at all, dunno if that's a
> problem with the gstreamer build (0.10.4)
> gst-launch-0.10 videotestsrc ! video/x-raw-yuv,width=1536 ! xvimagesink
> FEHLER: Leitung konnte nicht konstruiert werden: Kein Element »videotestsrc«.

You're missing the videotestsrc GStreamer element, which probably means you
don't have most of GStreamer installed. On dapper, that element (as well as
xvimagesink) is in the gstreamer0.10-plugins-base package.

Comment 26 Jan Schmidt 2006-04-12 21:44:20 UTC
Oh and while I remember, atipciids.h seems to have been added recently, but
isn't yet disted in the Makefile.am. Doesn't seem worth filing an extra bug over:

Index: src/Makefile.am
===================================================================
RCS file: /cvs/xorg/driver/xf86-video-ati/src/Makefile.am,v
retrieving revision 1.10
diff -r1.10 Makefile.am
125a126
>       atipciids.h \
Comment 27 Michel Dänzer 2006-11-20 02:22:12 UTC
Could this be a similar problem as bug 6548, i.e. an integer overflow of some kind?
Comment 28 Ken Mandelberg 2006-11-20 06:41:47 UTC
I am also getting a big pink bar on the right side at 1080I. My hardware and
software is a bit different though. The hardware is a Dell Latitude C640 with

>Device "ATI Technologies, Inc. Radeon Mobility M7 LW [Radeon Mobility 9000]"

I'm running on Ubuntu Edgy with

X Window System Version 7.1.1
 ATI: ATI driver (version 6.6.2) for chipsets: ati, ativga 
 R128: Driver for ATI Rage 128 chipsets:
 RADEON: Driver for ATI Radeon chipsets: ATI Radeon QD (AGP)
Module radeon: vendor="X.Org Foundation"
        compiled for 7.1.1, module version = 4.2.0
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 1.0

The Bios shows 32MB of video memory and xvinfo shows 2048x2048.

All of vlc,xine and mplayer show the big pink bar covering the right 1/3 of the
image. Mythtv shows nothing, just a blue screen with sound.

At 720P its ok,

Any suggestions?




Comment 29 Roland Scheidegger 2006-11-20 10:58:38 UTC
(In reply to comment #25)
> Could this be a similar problem as bug 6548, i.e. an integer overflow of some
kind?
Considering the same code works on r100, I don't think so. Looks more like a hw
limitation to me (too small buffer for the overlay scaler), it may be possible
to handle this by configuring the overlay differently, though last time I
checked fglrx couldn't handle it neither (on rv250). Textured video would avoid
that problem for sure.
Comment 30 Roland Scheidegger 2006-11-20 11:06:54 UTC
(In reply to comment #26)
> I am also getting a big pink bar on the right side at 1080I. My hardware and
> software is a bit different though. The hardware is a Dell Latitude C640 with
> 
> >Device "ATI Technologies, Inc. Radeon Mobility M7 LW [Radeon Mobility 9000]"
Where the heck did you get that device string? Would be good to know if it'a M7
LW (aka mobility 7500) or a m9 (mobility 9000).

> The Bios shows 32MB of video memory and xvinfo shows 2048x2048.
the driver will always report this resolution regardless of the chip capabilities.

> All of vlc,xine and mplayer show the big pink bar covering the right 1/3 of the
> image.
This looks like exactly this issue - I think the pink line starts at video pixel
1536.

> Mythtv shows nothing, just a blue screen with sound.
Looks like a different bug to me. Maybe a problem with your mythtv version.
Comment 31 Roland Scheidegger 2006-11-20 12:52:01 UTC
Created attachment 7847 [details] [review]
quick workaround

Here's a quick patch which fixes the problem for me. However, this will result
in sub-optimal quality, as you'd basically get scaled 960x1080 content instead
of the full scaled 1920x1080 (though I'm not exactly sure how the chip
pre-downscales). Not sure if it's possible to do any better with these chips?
btw, the list which chips support overlay width 1920 and which 1536 is likely
very bogus, someone knows which chip supports what? At least original r100
apparently seems to do 1920 just fine.
Comment 32 Roland Scheidegger 2006-11-23 03:36:19 UTC
(In reply to comment #29)
> quick workaround
> 
> Here's a quick patch which fixes the problem for me. However, this will result
> in sub-optimal quality, as you'd basically get scaled 960x1080 content instead
> of the full scaled 1920x1080 (though I'm not exactly sure how the chip
> pre-downscales).
Any comment on this? If nobody thinks the chips really can do this better I'm
going to check in something along these lines. It would be good if someone from
ATI could at least tell which chips have a scale buffer good enough for 1536 and
which for 1920 pixels, but in absence of that maybe we should make it possible
to override that setting in xorg.conf.
Comment 33 Roland Scheidegger 2006-11-29 07:54:37 UTC
Ok, fixed in git. It definitely reduces quality (but so would the non-working
previous code for dealing with videos which don't fit into the scaler) if you
compare it directly (at least if you don't downscale anyway). Scalar buffer
width is even user-configurable so you can override it if the driver gets it
wrong (which is probably likely for r350 at least). I do not think it's possible
to do better (unless you use textured video).
Comment 34 Giacomo Perale 2007-02-14 09:32:36 UTC
If I'm not experiencing the pink area in a 1920x816 video with xf86-video-ati 6.6.3 does this mean that my video card (Radeon X550 RV370 5B63 PCIE) has a scalar buffer width >= 1920?
Comment 35 Roland Scheidegger 2007-10-08 18:12:54 UTC
*** Bug 12743 has been marked as a duplicate of this bug. ***
Comment 36 Wade Berrier 2007-10-08 21:13:41 UTC
Shouldn't have this been included in 7.2?  (I'm still seeing the problem in suse 10.3 running xorg 7.2, but it's with 'radeonold').

Or, is #12744 preventing me from seeing this fix?

Also, any plans to have textured video?  If so, will this interface be available as an xvideo interface?
Comment 37 Roland Scheidegger 2007-10-09 05:24:35 UTC
(In reply to comment #34)
> Shouldn't have this been included in 7.2?  (I'm still seeing the problem in
> suse 10.3 running xorg 7.2, but it's with 'radeonold').
Well, 6.6.3 is a year old - just very slightly older than that fix...

> Or, is #12744 preventing me from seeing this fix?
Yes, the fix would be in 6.6.193. #12744 looks unrelated (unless it would only happen with hd video - there's always the possibility some bits change from chip to chip).

> Also, any plans to have textured video?
I don't think anyone is currently working on it. It will be required for the avivo-based chips (r5xx and newer), but certainly someone could implement it for the older chips.

> If so, will this interface be
> available as an xvideo interface?
Yes, should be (same as the intel driver handles this).


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.