Bug 18491 - [945GM FBC] FBC causes video playback underruns & display failure
Summary: [945GM FBC] FBC causes video playback underruns & display failure
Status: RESOLVED DUPLICATE of bug 19304
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
Keywords: NEEDINFO
Depends on:
Reported: 2008-11-11 15:39 UTC by Martin Klein
Modified: 2009-07-09 16:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Xorg Logfile (99.82 KB, text/plain)
2008-11-11 15:39 UTC, Martin Klein
no flags Details
lspci Output (19.97 KB, text/plain)
2008-11-11 15:41 UTC, Martin Klein
no flags Details
allocate video overlay FIFO entries (1.73 KB, patch)
2009-01-06 12:18 UTC, Jesse Barnes
no flags Details | Splinter Review
set conservative FIFO watermark values (2.63 KB, patch)
2009-01-28 12:59 UTC, Jesse Barnes
no flags Details | Splinter Review
after reboot without x (7.98 KB, text/plain)
2009-02-23 10:14 UTC, Martin Klein
no flags Details
after reboot with x (7.92 KB, text/plain)
2009-02-23 10:15 UTC, Martin Klein
no flags Details
after reboot without x (7.98 KB, text/plain)
2009-02-23 10:16 UTC, Martin Klein
no flags Details
set proper watermark values (7.22 KB, patch)
2009-03-19 16:58 UTC, Jesse Barnes
no flags Details | Splinter Review
patch against 2.5.0 (7.69 KB, patch)
2009-03-30 13:35 UTC, Jesse Barnes
no flags Details | Splinter Review
xorg log patch-5 (23.48 KB, text/plain)
2009-04-04 08:56 UTC, Martin Klein
no flags Details

Description Martin Klein 2008-11-11 15:39:16 UTC
Created attachment 20232 [details]
Xorg Logfile

Bug description:
When Playing Video with XBMC or mplayer
the connected DVI Monitor goes Blank.
The System ist still responsive the video
is still playing (I can hear the sound and
stop the video via keyboard). I can switch to 
Console and Back without change. Even restarting
the X server does not help. The Console still 
shows a picture but only a reboot makes X usable
again. I tried a lot of settings in xorg.conf
xaa/exa, xv-textured/xv-overlay nothing seems to help.
I switched Displays too.  

System environment: 
-- chipset: i945GME
-- system architecture: 32-bit
-- xf86-video-intel: Git Clone from 11.11.2008
-- xserver: 7.4~5ubuntu3 / 1.5.2-2ubuntu3
-- mesa: 7.2-1ubuntu2
-- drm: libdrm2 2.3.1+git+20081002-1
-- kernel: 2.6.27-7-generic
-- Linux distribution: Ubuntu 8.10
-- Machine or mobo model: ASUS Eee Box b202
-- Display connector: DVI 
-- Display : Samsung 42"

Reproducing steps:
Play Video and wait for 1 to 20 Minutes.

Additional info:
I tried fresh Installs of Ubuntu 8.04 (driver 2.2)
and Ubuntu 8.10 (driver 2.4) and I compiled the 
latest git all with the same Result Screen goes
Black( sometimes Blue or White).
On The Stock Ubuntu 8.10 driver I got the Folowing:

(EE) intel(0): First SDVOB output reported failure to sync
(EE) intel(0): underrun on pipe A! (<- Repeated a lot as soon
as screen goes blank)

Complete Log from latest git / lspci is attached
Comment 1 Martin Klein 2008-11-11 15:41:16 UTC
Created attachment 20233 [details]
lspci Output
Comment 2 Martin Klein 2008-11-11 15:49:29 UTC
My xorg.conf :

Section "Device"
        Identifier      "Configured Video Device"
        Driver "intel"
        Option "Monitor-TMDS-1" "plasma"
        Option "ModeDebug" "yes"

Section "Extensions"
        Option          "AllowGLXWithComposite" "true"
        Option  "Composite" "Enable"

Section "Monitor"
        Identifier      "plasma"

Section "Monitor"
        Identifier      "Configured Monitor"

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"

Section "ServerLayout"
    Identifier    "Default Layout"
    Screen        "Default Screen"
Comment 3 Martin Klein 2008-11-13 05:07:59 UTC
Some more Infos:

I tried to connect the Screen via VGA cable
but it did not Change anything, the screen goes 
Blank also when playing video.

I updated my Kernel to 2.6.28-rc4 and got a new 
effect: now the screen is flickering very badly 
when X is running, it gets better when the video 
starts but does not disapear completely(the flickering)
but the black screen remains.

And I found another way of getting the screen back:
Switching from console to X does not help but 
putting the maschine in Suspend-To-Ram and waking 
gives me the screen back.
Comment 4 Wang Zhenyu 2008-11-16 18:58:47 UTC
Which xv port do you use for mplayer? xvinfo will give you the available list. Could you try if this problem is with 'overlay' port or does it exist for 'textured video' as well?
Comment 5 Martin Klein 2008-11-17 03:51:44 UTC
I tried both but I think I found the solution for 
me. When I set Framebuffercompresssion off the Problem 
disappears. So maybe something in the framebuffer 
code is broken.

Comment 6 Jesse Barnes 2008-12-17 15:57:14 UTC
Hm, sounds like we're not setting DSPARB up correctly for your configuration.  More than that, we shouldn't be enabling FBC at all if both pipes are active (do you have both your local panel and an external DVI connected?)
Comment 7 Martin Klein 2008-12-18 03:25:03 UTC
I use an EEE-Box b202 not the eee-pc nettop so it does not
have an internal panel it only has an dvi out which is active.
One thing I observed is:
The video works fine now but a few times an hour
the display drops black for half a second then comes 
back again.

Hoping to be of Help

Comment 8 Jesse Barnes 2009-01-06 12:18:27 UTC
Created attachment 21732 [details] [review]
allocate video overlay FIFO entries

Can you give this patch a try?  It should allow you to keep framebuffer compression enabled (which saves power) and still watch videos w/o flicker.
Comment 9 Martin Klein 2009-01-14 14:42:51 UTC
Thank you for the patch but unfortuntely 
the situation did not change.

with compression enabled the screen goes black 
after a random interval between 5 and 200 minutes
but the flickering is gone.

without frambuffer compression the screen flickers
(drops black for about a second then comes back)

the only thing that changed is:

with the patch i can recover the screen by putting 
the pc to sleep (suspend to ram) and waking it up again.
without the patch i had to reboot the machine.

Comment 10 Jesse Barnes 2009-01-28 12:59:54 UTC
Created attachment 22319 [details] [review]
set conservative FIFO watermark values

Ok, so the patch is helping a little in that your display doesn't become totally hosed and that you don't see flicker, but you still eventually end up with a blank display.  I wonder if the FIFO watermark values are also too aggressive on your platform.  Can you try this patch and also attach the output of intel_reg_dumper?
Comment 11 Jesse Barnes 2009-01-28 13:13:54 UTC
Oh and please attach the intel_reg_dumper output from a fresh boot before starting the patched driver.  Thanks.
Comment 12 Michael Fu 2009-02-22 21:21:19 UTC
ping for response....Martin
Comment 13 Martin Pitt 2009-02-23 02:46:55 UTC
@Martin Klein: If you test the patch as well, you should replace

+   uint32_t watermark = (3 << 8) | 0x3f;


+   uint32_t watermark = (3 << 8) | 1;

This patch already has been tested quite extensively in bug 19304, and 0x3f totally breaks it (and was a typo, according to Jesse Barnes).
Comment 14 Martin Klein 2009-02-23 10:13:05 UTC
Sorry for the long delay I have applied your
new patch with the same results.

Screen blank but working after standby/resume.

attached are the regdumper outputs.

thank you so far 

Comment 15 Martin Klein 2009-02-23 10:14:03 UTC
Created attachment 23215 [details]
after reboot without x
Comment 16 Martin Klein 2009-02-23 10:15:57 UTC
Created attachment 23216 [details]
after reboot with x
Comment 17 Martin Klein 2009-02-23 10:16:39 UTC
Created attachment 23217 [details]
after reboot without x
Comment 18 Jesse Barnes 2009-03-16 12:05:26 UTC
Martin, can you try removing the lines that do OUTREG(DSPARB..)?  With my last patch applied that should just leave you with FW writes, and will tell us if the DSPARB writes are the root cause of your problem.
Comment 19 Jesse Barnes 2009-03-19 16:58:20 UTC
Created attachment 24061 [details] [review]
set proper watermark values

How about this patch?  It tries to set "proper" watermark values, and hopefully will allow you to use fbc again...
Comment 20 Martin Klein 2009-03-25 12:18:43 UTC
Hi, I have tried your last patch,
but it wouldn't apply cleanly.
I tried a clean 2.5.0 download.
unfortunately i cannot build the new
2.6.0 on my system yet could you 
provide a patch against 2.5.0 ?

Comment 21 Martin Klein 2009-03-25 14:25:38 UTC
...can you try removing the lines that do OUTREG(DSPARB..)?  ...

Yes I did that unfortunately no changes at all.
Comment 22 Jesse Barnes 2009-03-30 13:35:19 UTC
Created attachment 24376 [details] [review]
patch against 2.5.0

This one's not well tested, but it's against 2.5.0 so should be easier for you to apply.
Comment 23 Martin Klein 2009-03-30 13:51:45 UTC
With This patch I only get a 
very unstable picture like vsync is gone 
on a vga connection ...
Comment 24 Jesse Barnes 2009-03-30 14:01:55 UTC
Can you attach your X log?
Comment 25 Martin Klein 2009-04-04 08:56:00 UTC
Ok I tried your patch i830-fifo-wm-only-5.patch
against the driver and get the flickering 
and after a short time the display goes solid grey 
yorg log attached ..
Comment 26 Martin Klein 2009-04-04 08:56:38 UTC
Created attachment 24565 [details]
xorg log patch-5
Comment 27 Jesse Barnes 2009-04-10 10:06:46 UTC
I fixed some of the calculations in the last patch and added back some debugging code, can you give it a try?

Comment 28 Martin Klein 2009-04-10 13:21:59 UTC
sorry no changes still flickering...

relevant xorg.log:

(II) intel(0): EDID vendor "SAM", prod id 233
(II) intel(0): FIFO entries - A: 5, B: 0
(II) intel(0): FIFO size - A: 28, B: 59
(II) intel(0): Setting FIFO watermarks - A: 21, B: 1, C: 2, SR 68
(EE) intel(0): First SDVOB output reported failure to sync
(EE) intel(0): underrun on pipe A!
(EE) intel(0): underrun on pipe A!
(EE) intel(0): underrun on pipe A!
(EE) intel(0): underrun on pipe A!
Comment 29 Jesse Barnes 2009-04-10 13:29:50 UTC
Hm that pipe A watermark looks way off...  What's the modeline for the mode on pipe A?
Comment 30 Martin Klein 2009-04-10 14:11:30 UTC
(II) intel(0): Modeline "848x480"x0.0   31.50  848 872 952 1056  480 483 488 500 -hsync +vsync (29.8 kHz)

Comment 31 Jesse Barnes 2009-07-01 15:13:48 UTC
commit 7662c8bd6545c12ac7b2b39e4554c3ba34789c50
Author: Shaohua Li <shaohua.li@intel.com>
Date:   Fri Jun 26 11:23:55 2009 +0800

    drm/i915: add FIFO watermark support

just got pushed to the kernel.  Can you try with a recent stack using KMS?
Comment 32 Jesse Barnes 2009-07-09 16:03:41 UTC
Duping to the main FIFO programming bug.

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

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.