Bug 33004

Summary: Geode driver with video overlay causes significant overall image corruption
Product: xorg Reporter: Samuel Greenfeld <greenfeld>
Component: Driver/geodeAssignee: X.org Geode Mailing List <xorg-driver-geode>
Status: RESOLVED FIXED QA Contact: X.org Geode Mailing List <xorg-driver-geode>
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Screenshot showing font corruption (without video overlay & cursor present)
none
Xorg.0.log from Fedora 14 XO-1
none
external screenshot taken of 2.11.11 build none

Description Samuel Greenfeld 2011-01-11 11:04:16 UTC
Created attachment 41891 [details]
Screenshot showing font corruption (without video overlay & cursor present)

Running a video overlay with build 2.11.10 of the Geode driver typically causes significant image corruption across everything shown.

Filed upstream per Daniel Drake.

------------

Reproduction (if possible on a non-XO-1):
1. Start X Windows on a Geode system with the 2.11.10 Geode driver and a web camera.

2. Run "/usr/bin/gst-launch v4l2src ! ffmpegcolorspace ! ximagesink" in an xterminal and open and close it a few times for testing.  While it is opened each time move the video window around, as well as any other windows you may have open in X Windows (I used the GNOME environment).   You should not see any corruption.

3. Run "/usr/bin/gst-launch v4l2src ! xvimagesink" and open and close it a few times for testing.  While it is opened each time move the video window around, as well as any other windows you may have open in X Windows (I used the GNOME environment).   

You should at the very least see your normal cursor become a bitmap of pseudo-random noise, and moving windows around may cause any background picture to become corrupted.

------------

Reproduction (on a XO-1, tends to results in more significant corruption):

1. Install the F14 build from http://build.laptop.org/F14/os4/xo-1/ using the instructions at http://wiki.laptop.org/go/F14_for_XO on an XO-1.
2. Install the Sugar-based Record activity from activities.sugarlabs.org.  Verify it can work properly in all modes (Picture Taking, Audio, and Video) using the 2.11.9 Geode driver included in this build.  Install the non-olpc-specific 2.11.9 driver if you want to double check that nothing special was added; I'm told the differences are minor.
3. Install the 2.11.10 Geode driver from http://koji.fedoraproject.org/koji/buildinfo?buildID=207221 .  Reboot the machine.
4. Run the record activity again and again go through its various modes and features.  Various cursor modes may corrupt, eventually newly updated text will have a corrupted font, while video recording the on-screen video display will show corruption.  The font/cursor corruption will persist until the X server is restarted.
Comment 1 Samuel Greenfeld 2011-01-11 11:12:58 UTC
Created attachment 41892 [details]
Xorg.0.log from Fedora 14 XO-1
Comment 2 Martin-Éric Racine 2011-01-11 11:18:30 UTC
Could you please check whether this issue applies to 2.11.11 also or not?
Comment 3 Samuel Greenfeld 2011-01-14 08:18:55 UTC
I tested the 2.11.11 driver available at http://koji.fedoraproject.org/koji/buildinfo?buildID=214034 and the issue still was present.
Comment 4 Samuel Greenfeld 2011-01-14 08:24:29 UTC
Created attachment 42038 [details]
external screenshot taken of 2.11.11 build

External screenshot taken with 2.11.11 build.  The dashed horizontal line across the video screen only appears while moving the mouse and may appear in different vertical locations.
Comment 5 billiboy 2011-01-16 02:54:12 UTC
FWIW, only a wild guess.
Is using the following option in xorg.conf a workaround?

---
Section "Device"
	Identifier "Videocard0"
	Option     "MigrationHeuristic" "greedy"
EndSection
---
Comment 6 Samuel Greenfeld 2011-01-16 07:59:44 UTC
Yes, adding Option "MigrationHeuristic" "greedy" was determined to be a workaround.

Speculation on Friday independently figured out on a few IRC channels centers around the exaOffscreenAlloc work, as well as if there is a problem reclaiming the video overlay buffer.
Comment 7 Daniel Drake 2011-01-18 13:15:24 UTC
I confirm the bug and the conditions to reproduce it.

I reproduced on git master, then reverted the suspected patch, and can confirm that the bug went away. The buggy commit is:

commit 5e72a00ad26f2052bb48fef041d6fbd14ba18153
Author: Hunk Cui <Hunk.Cui@amd.com>
Date:   Wed Oct 13 18:26:52 2010 +0800

    Allocate video memory with exaOffscreenAlloc
Comment 8 Daniel Drake 2011-01-18 13:20:12 UTC
Easier way to reproduce that doesn't require a webcam:

# gst-launch videotestsrc ! xvimagesink

However, the effects aren't as obvious. You might have to run it 2 or 3 times, moving mouse cursor in and out, dragging around. But with a little persistence the buggy behaviour is still obvious.

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.