Bug 11533 - solid lock-up with BCIforXv
Summary: solid lock-up with BCIforXv
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/savage (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: https://bugs.launchpad.net/bugs/153873
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-10 14:03 UTC by Tormod Volden
Modified: 2008-02-04 15:17 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot from locked-up pc running Rhythmbox (15.97 KB, image/jpeg)
2007-07-10 14:06 UTC, Tormod Volden
no flags Details
my xorg.conf (in Debian) (3.02 KB, text/plain)
2007-07-10 14:07 UTC, Tormod Volden
no flags Details
log from the crashed server (BCIforXv enabled by default) (41.32 KB, text/plain)
2007-07-10 14:08 UTC, Tormod Volden
no flags Details
log from stable server (BCIforXv disabled) (40.95 KB, text/plain)
2007-07-10 14:09 UTC, Tormod Volden
no flags Details
Restrict BCI to multiples of 16 pixels (1.86 KB, patch)
2008-01-12 20:27 UTC, Alex Villacís Lasso
no flags Details | Splinter Review

Description Tormod Volden 2007-07-10 14:03:51 UTC
If I turn on the "Visualization" effects in Rhythmbox, the window gets filled with mostly pink colours and I see a couple of mouse pointers and the machine is completely locked up (no network, no sysrq possible).

If I use Option "BCIforXv" "false" there is no problem.
Comment 1 Tormod Volden 2007-07-10 14:06:38 UTC
Created attachment 10652 [details]
screenshot from locked-up pc running Rhythmbox

On the screenshot some pink distortions can be seen. Other times the whole Visualization window is immediately and completely filled with pinkish trash.
Comment 2 Tormod Volden 2007-07-10 14:07:36 UTC
Created attachment 10653 [details]
my xorg.conf (in Debian)
Comment 3 Tormod Volden 2007-07-10 14:08:32 UTC
Created attachment 10654 [details]
log from the crashed server (BCIforXv enabled by default)
Comment 4 Tormod Volden 2007-07-10 14:09:31 UTC
Created attachment 10655 [details]
log from stable server (BCIforXv disabled)
Comment 5 Tormod Volden 2007-07-10 14:11:01 UTC
BTW, this is with up-to-date Debian Lenny or Ubuntu Gutsy.
Comment 6 Alex Villacís Lasso 2008-01-11 16:11:21 UTC
I have seen this lockup too on my home machine. My machine reports the following on lspci -v:

01:00.0 VGA compatible controller: S3 Inc. VT8375 [ProSavage8 KM266/KL266]
(prog-if 00 [VGA])
        Subsystem: S3 Inc. VT8375 [ProSavage8 KM266/KL266]
        Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11
        Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
        Memory at d0000000 (32-bit, prefetchable) [size=128M]
        Expansion ROM at dfe70000 [disabled] [size=64K]
        Capabilities: [dc] Power Management version 2
        Capabilities: [80] AGP version 2.0

If you have gstreamer-tools installed, this bug can be reproduced (at least in my case) as follows (with BCIforXv enabled):

The following command works correctly:
gst-launch videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YV12,width=320 ! xvimagesink

The following command causes diagonal colored corruption to be displayed in the xv window:
gst-launch videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YV12,width=328 ! xvimagesink

The following command locks up the machine hard:
gst-launch videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YV12,width=321 ! xvimagesink

The following command does not use BCI and runs correctly regardless of the value of width (note: it specifies YUY2 instead of YV12):
gst-launch videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YUY2,width=320 ! xvimagesink

The cause seems to be that the BCI code in the driver is unable to handle pixel widths that are not multiples of 16. With multiples of 8, the corruption manifests itself as diagonal ghost images (a real-world example video where the ghost images appear is the "What is Ubuntu" example video that comes with the Ubuntu 7.04 and 7.10 LiveCDs). With non-multiples of 8, the machine locks up. 

Fortunately, I have a patch that fixes the problem, at least in my case (applied on top of current git). It restricts the use of BCI to just the cases where the pixel width is a multiple of 16 pixels. Other widths are handled by software, bypassing the BCI (as is the cas with BCIForXV=off).

I have the patches at home, so I need to get there first.
Comment 7 Alex Villacís Lasso 2008-01-12 20:27:31 UTC
Created attachment 13684 [details] [review]
Restrict BCI to multiples of 16 pixels

Applies on top of commit 7da1a03d4b8b40483001b1f6e56dae655a1797f4 (with commit 846a69f70d189c486448df269a512b8d42fab0c2 cherry-picked).
Comment 8 Alex Villacís Lasso 2008-01-31 07:57:05 UTC
Patch has been committed to current git for driver. If you can, please recompile current git head and check whether the commit fixes things for you.
Comment 9 Tormod Volden 2008-02-04 10:16:28 UTC
Alex, it works very well. Thanks a lot! Finally, after all these years with pink trash... Even the "What is Ubuntu" looks good, I always wondered why they shipped such a crappy-looking video for demo purposes :)

Thanks also to Alex D. for sustained service of these old cards.
Comment 10 Alex Deucher 2008-02-04 15:17:21 UTC
(In reply to comment #9)
> Alex, it works very well. Thanks a lot! Finally, after all these years with
> pink trash... Even the "What is Ubuntu" looks good, I always wondered why they
> shipped such a crappy-looking video for demo purposes :)
> 
> Thanks also to Alex D. for sustained service of these old cards.
> 

Don't thank me, thank Alex Villacís Lasso.  He fixed it, I just committed the patches :)


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.