Bug 33004 - Geode driver with video overlay causes significant overall image corruption
Summary: Geode driver with video overlay causes significant overall image corruption
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/geode (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: X.org Geode Mailing List
QA Contact: X.org Geode Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 11:04 UTC by Samuel Greenfeld
Modified: 2011-02-07 05:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Screenshot showing font corruption (without video overlay & cursor present) (32.15 KB, image/png)
2011-01-11 11:04 UTC, Samuel Greenfeld
no flags Details
Xorg.0.log from Fedora 14 XO-1 (16.27 KB, text/plain)
2011-01-11 11:12 UTC, Samuel Greenfeld
no flags Details
external screenshot taken of 2.11.11 build (96.58 KB, image/jpeg)
2011-01-14 08:24 UTC, Samuel Greenfeld
no flags Details

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.