Bug 80215 - Periodic garbage on KDE System Load Viewer widget
Summary: Periodic garbage on KDE System Load Viewer widget
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 07:43 UTC by Ildar Nurislamov
Modified: 2014-06-23 09:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
garbage on KDE System Load Viewer widget (22.26 KB, image/png)
2014-06-19 07:43 UTC, Ildar Nurislamov
no flags Details

Description Ildar Nurislamov 2014-06-19 07:43:50 UTC
Created attachment 101334 [details]
garbage on KDE System Load Viewer widget

Widget updates itself every 2s. Sometimes it draws garbage on the background, rarely it draws background twice (which is half-transparent)
Garbage affects only background even it set to 100% translucency.
Started to happen somewhere in between 17-18 June. I've noticed it at the morning of 18 June but i forget to make a git pull before compile a driver. So i cant say exactly which commit i was on.
Comment 1 Chris Wilson 2014-06-19 07:50:57 UTC
Note, that

commit 51a0559b120dd0a57a938b300bccefbf1142e495
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 18 20:55:02 2014 +0100

    sna: Do not treat both src/dst having no clones as being the same
    
    Fixes regression from
    commit 62aaf2ff4f8597067cf387865707baa00ed9a123
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Wed Jun 18 18:41:15 2014 +0100
    
        sna: Skip redundant copies when already cloned
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

was a stupendously stupid commit. Please double check that the failure is still there this morning.
Comment 2 Chris Wilson 2014-06-19 07:51:34 UTC
Nevermind:

"It was before both of them and it still present in
 c257c936b42b92827b784cee0b7caa54e6040364."
Comment 3 Ildar Nurislamov 2014-06-19 09:07:39 UTC
Interesting thing. when i started http://ie.microsoft.com/testdrive/Performance/ParticleAcceleration/ in Firefox garbage became orange :)
Comment 4 Chris Wilson 2014-06-19 09:24:33 UTC
What is the name of the widget? And how do I install it?
Comment 5 Ildar Nurislamov 2014-06-19 09:50:42 UTC
System Load Viewer.
http://kde-look.org/content/show.php/System+Status?content=74891
But i already had it installed with kde.
Oh it happened right now - instead of garbade it drew exact copy of clock that i have on panel below - without distortions )
Comment 6 Chris Wilson 2014-06-19 15:22:46 UTC
Sorry, I haven't succeeded in getting that widget up and running yet. Is that the only corruption you've spotted?
Comment 7 Ildar Nurislamov 2014-06-19 16:05:00 UTC
Sometimes it happened in dropdown menus. But easily to notice in combination with Kwin vsync bug - it makes menu drawing kind of slower
Comment 8 Chris Wilson 2014-06-20 20:36:37 UTC
I have been focusing on other bugs, and haven't reproduced this. Would it be possible for you to bisect this?
Comment 9 Ildar Nurislamov 2014-06-23 07:48:51 UTC
Yep. Bug was introduced in:
322e51a3a552d89e5e5ecbb82a9243f134c8d36f sna: Relax PREFER_GPU so that we don't needless create small GPU bo
Comment 10 Chris Wilson 2014-06-23 07:55:05 UTC
Oh boy. Just to confirm the same bug is still on master:

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 78f5fed..1feea14 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3504,7 +3504,7 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box,
        }
        if ((flags & FORCE_GPU) == 0 && priv->gpu_bo == NULL && sna_pixmap_choose_tiling(pixmap, DEFAULT_TILING) == I915_TILING_NONE) {
                DBG(("%s: no gpu bo and linear, discard PREFER_GPU\n", __FUNCTION__));
-               flags &= ~PREFER_GPU;
+               //flags &= ~PREFER_GPU;
        }
 
        if ((flags & (PREFER_GPU | IGNORE_CPU)) == IGNORE_CPU) {
Comment 11 Ildar Nurislamov 2014-06-23 08:05:49 UTC
Bug is still on master. But this patch fixes it.
Comment 12 Chris Wilson 2014-06-23 08:08:34 UTC
How about

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index f481c19..409ae70 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3824,6 +3824,8 @@ cpu_fail:
 
                if (!sna->kgem.can_blt_cpu)
                        goto move_to_gpu;
+
+               goto move_to_gpu;
        }
 
        if (!sna->kgem.can_blt_cpu)

?
Comment 13 Ildar Nurislamov 2014-06-23 08:28:39 UTC
No. This patch doesn't fix.
Comment 14 Ildar Nurislamov 2014-06-23 08:54:54 UTC
But if fixes scrolling bug. Didn't test 1st patch for scrolling though.
Comment 15 Chris Wilson 2014-06-23 09:20:43 UTC
The actual line in question was removed in

commit 416c223861aaeb61c6408e6537315b78e908df43
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 09:20:55 2014 +0100

    sna: Do not set CAN_CREATE_GPU flag for untiled allocations
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

but in theory we should still take the same path. There are two possible causes here:

1. We discard damage that we shouldn't

2. The client assumes that Pixmaps are zeroed on initialisation (they aren't).

Hmm, I think I'll try concocting a debug patch to initialise all Pixmaps to magenta, but first I have to rule out (1).
Comment 16 Chris Wilson 2014-06-23 09:21:20 UTC
(In reply to comment #14)
> But if fixes scrolling bug. Didn't test 1st patch for scrolling though.

Interesting. Please try

commit bb4c057620fb0558a77a9b7db538786ffda7cf13
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 09:22:13 2014 +0100

    sna: Prefer to render over damage into the GPU bo
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

for the scrolling bug.
Comment 17 Ildar Nurislamov 2014-06-23 09:28:00 UTC
garbage bug is fixed.
scrolling bug is not.
Comment 18 Ildar Nurislamov 2014-06-23 09:30:15 UTC
I believed that i made a comment that:
"But if fixes scrolling bug. Didn't test 1st patch for scrolling though."
was not correct. It seemed so for a quite while. But then it's gone
Comment 19 Chris Wilson 2014-06-23 09:34:43 UTC
Ok, thanks for the update on the scrolling bug. Every time I think I have a lead it evapourates! :)
Comment 20 Chris Wilson 2014-06-23 09:35:17 UTC
Let's mark this as resolved, even though I am sure I haven't fixed the underlying cause...


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.