Bug 89291 - [uxa ivb] graphical glitches in the circulating symbol while waiting for an application
Summary: [uxa ivb] graphical glitches in the circulating symbol while waiting for an a...
Status: NEEDINFO
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 03:37 UTC by tim
Modified: 2015-03-07 16:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
example empathy (9.85 KB, text/plain)
2015-02-24 03:40 UTC, tim
no flags Details
example empathy (2) (9.85 KB, image/png)
2015-02-24 03:42 UTC, tim
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim 2015-02-24 03:37:54 UTC
This problem affects multiple application. E.g. Empathy:

Connecting to an account takes a while. The process is visualized by two circulating symbols in the empathy window. The normal behaviour should be that these symbols integrate well in the background of the window. But instead of this they have a little black square background (see pictures).

After generating /usr/share/X11/xorg.conf.d/20-intel.conf with the
following content...

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
EndSection

...the problem is solved. This workaround results in little tearing.
Adding the tearfree option doesn't help and results in stuttering.

Anyway: It would be nice to have a real fix instead of this workaround. The driver in Debian is old. Perhaps it exists a fix that I couldn't find.

Package: xserver-xorg-video-intel
Version: 2:2.21.15-2+b2
Debian Jessie
Comment 1 tim 2015-02-24 03:40:06 UTC
Created attachment 113779 [details]
example empathy
Comment 2 tim 2015-02-24 03:42:22 UTC
Created attachment 113780 [details]
example empathy (2)
Comment 3 Chris Wilson 2015-02-24 08:03:58 UTC
2.21.15 is very old at this point. Could you please try -intel from either testing or experimental (or just build from source if you don't want extra dependencies) and test uxa, sna, sna+tearfree?
Comment 4 tim 2015-02-25 03:07:44 UTC
Now I have installed the xserver-xorg-video-intel from debian experimental. No improvement. I will test tearfree.
Comment 5 tim 2015-02-25 03:34:15 UTC
The situation with sna and tearfree is better with the recent driver.
Comment 6 tim 2015-02-25 04:17:46 UTC
To clarify: Still strange circulating symbols with the recent driver and uxa. No significant difference with sna between the new (experimental) and the older driver (jessie). Much improvement with the combination sna and tearfree.
Comment 7 Chris Wilson 2015-02-25 07:47:27 UTC
To recap, with -intel-2.99.917:

uxa: transparency glitch around the busy animation
sna: tearing
sna+tearfree: you haven't noticed anything wrong yet...
Comment 8 tim 2015-02-25 19:46:11 UTC
The strange thing is: The problem disappears after a time and appears after restart.

Perhaps this problem is similar?

https://code.google.com/p/tint2/issues/detail?id=432
Comment 9 Chris Wilson 2015-02-25 19:51:02 UTC
Probably all the same, yes. Useful point to have it narrowed to ivb.
Comment 10 Chris Wilson 2015-02-25 20:00:03 UTC
Could you please try:

diff --git a/src/uxa/i965_render.c b/src/uxa/i965_render.c
index c1943fb..80b3c64 100644
--- a/src/uxa/i965_render.c
+++ b/src/uxa/i965_render.c
@@ -2255,6 +2255,7 @@ i965_composite(PixmapPtr dest, int srcX, int srcY, int maskX, int maskY,
 	if (intel->needs_render_state_emit) {
 		i965_bind_surfaces(intel);
 
+		intel_batch_emit_flush(scrn);
 		if (INTEL_INFO(intel)->gen >= 060)
 			gen6_emit_composite_state(intel);
 		else
diff --git a/src/uxa/intel_batchbuffer.c b/src/uxa/intel_batchbuffer.c
index a29e443..d48c1cf 100644
--- a/src/uxa/intel_batchbuffer.c
+++ b/src/uxa/intel_batchbuffer.c
@@ -208,9 +208,10 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn)
 			} else {
 				BEGIN_BATCH(4);
 				OUT_BATCH(BRW_PIPE_CONTROL | (4 - 2));
-				OUT_BATCH(BRW_PIPE_CONTROL_WC_FLUSH |
+				OUT_BATCH(BRW_PIPE_CONTROL_NOWRITE |
+					  BRW_PIPE_CONTROL_WC_FLUSH |
 					  BRW_PIPE_CONTROL_TC_FLUSH |
-					  BRW_PIPE_CONTROL_NOWRITE);
+					  BRW_PIPE_CONTROL_CS_STALL);
 				OUT_BATCH(0); /* write address */
 				OUT_BATCH(0); /* write data */
 				ADVANCE_BATCH();
Comment 11 tim 2015-02-27 04:18:31 UTC
Thanks! I will try it this weekend.
Comment 12 tim 2015-02-27 13:19:51 UTC
Is this patch for -intel-2.21.15 too? 

-intel-2.99.917 is only in "experimental", so Debian won't include it in stable. Thanks!
Comment 13 Chris Wilson 2015-02-27 14:00:05 UTC
Yes, it should apply against 2.21.15 as well.
Comment 14 tim 2015-02-28 04:23:24 UTC
After installing: No problems with the patch but also no success.
Comment 15 tim 2015-02-28 04:37:41 UTC
I'm using quilt and that is the diff for -video-intel-2.21.15 based on your diff: (Perhaps I do something wrong...)

--- a/src/uxa/i965_render.
+++ b/src/uxa/i965_render.c
@@ -2252,6 +2252,7 @@
        if (intel->needs_render_state_emit) {
                i965_bind_surfaces(intel);
 
+               intel_batch_emit_flush(scrn);
                if (INTEL_INFO(intel)->gen >= 060)
                        gen6_emit_composite_state(intel);
                else
--- a/src/uxa/intel_batchb
+++ b/src/uxa/intel_batchbuffer
@@ -199,9 +199,10 @@
                        } else {
                                BEGIN_BATCH(4);
                                OUT_BATCH(BRW_PIPE_CONTROL | (4 - 2));
-                               OUT_BATCH(BRW_PIPE_CONTROL_WC_FLUSH |
+                               OUT_BATCH(BRW_PIPE_CONTROL_NOWRITE |
+                                         BRW_PIPE_CONTROL_WC_FLUSH |
                                          BRW_PIPE_CONTROL_TC_FLUSH |
-                                         BRW_PIPE_CONTROL_NOWRITE);
+                                         BRW_PIPE_CONTROL_CS_STALL);
                                OUT_BATCH(0); /* write address */
Comment 16 Chris Wilson 2015-02-28 09:21:19 UTC
Your patch looks fine. Ok, so that is not the problem.
Comment 17 tim 2015-03-01 20:37:49 UTC
If I can do anything else...

Perhaps I can reproduce when the problem disappears.
Comment 18 tim 2015-03-01 23:45:40 UTC
Perhaps it helps:

The problem appears only after reboot and not after suspend or restart x via alt+f2+r.

The problem disappers randomly (?) after a few minutes after normal using. Disappearing seems not be related to a specific app or the number of open windows.
Comment 19 tim 2015-03-02 03:07:57 UTC
And it disappears with -video-intel-2.99.917 (uxa) much faster than with -video-intel-2.21.15-2 (uxa).
Comment 20 tim 2015-03-07 11:57:37 UTC
Hi, I think it's related to Debian. No Problem with Arch Linux and -intel-2.99.917-3. Thanks for your help.
Comment 21 Chris Wilson 2015-03-07 16:00:08 UTC
Hmm. It could just be that the rendering patterns are different enough between the shells that you don't see it on Arch. Or it could be a kernel difference etc. Or it could just be an application bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.