Bug 41769 - [GM965 SNA] Regression: Black background in Eclipse
Summary: [GM965 SNA] Regression: Black background in Eclipse
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 16:00 UTC by Roman Jarosz
Modified: 2011-10-31 12:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Black background (72.58 KB, image/png)
2011-10-13 16:00 UTC, Roman Jarosz
no flags Details
Grapher and broken redraw (180.54 KB, application/octet-stream)
2011-10-16 14:33 UTC, Roman Jarosz
no flags Details
Wrong rendering (38.56 KB, image/png)
2011-10-16 14:35 UTC, Roman Jarosz
no flags Details
Grapher souce code (36.78 KB, application/x-bzip2)
2011-10-17 04:42 UTC, Roman Jarosz
no flags Details
xserver debug full log (1.54 MB, application/x-bzip2)
2011-10-17 10:47 UTC, Roman Jarosz
no flags Details

Description Roman Jarosz 2011-10-13 16:00:10 UTC
Created attachment 52311 [details]
Black background

Since commit c5414ec992d935e10156a2b513d5ec2dded2f689
sna: Use BLT operations to avoid fallbacks in core glyph rendering
I see black background in eclipse, it was ok before.

I didn't bisect it, but IMHO it was ok before commit 1ec6a0e27753027a68beeaff0276ae65c658d468
sna: Move the source to the GPU if it is reused

00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated
Graphics Controller (rev 0c)
Linux kedge 3.1.0-rc9 #1 SMP Wed Oct 12 00:20:29 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz GenuineIntel GNU/Linux
Comment 1 Chris Wilson 2011-10-14 02:51:11 UTC
Checking eclipse on my 965gm I'm not seeing anything unusual. Can you narrow down a set of foolproof reproduction steps?
Comment 2 Roman Jarosz 2011-10-14 03:09:26 UTC
Create simple java class like on the screenshot, and move cursor with page up, page down, it also happens when you type but only sometimes.

If you want I can provide xtrace later.
Comment 3 Roman Jarosz 2011-10-16 14:33:34 UTC
Created attachment 52386 [details]
Grapher and broken redraw

I don't know if this is regression or not, because I didn't use grapher for long time, but in current SNA the graph screen isn't cleared correctly.

Steps to reproduce.
1. Run grapher (requires Qt 64bit, I have source if it will not work)
2. Press enter in the y=100*sin(x/5) input box and the sin will be drawn.
3. Left click into the graph area.
4. Press "left arrow" key to move the chart, and you will see that there will be the old sin and the moved one.
Comment 4 Roman Jarosz 2011-10-16 14:35:05 UTC
Created attachment 52387 [details]
Wrong rendering
Comment 5 Roman Jarosz 2011-10-16 14:36:10 UTC
Just to make it clear it works correctly in no SNA driver
Comment 6 Chris Wilson 2011-10-17 04:24:43 UTC
Hmm, I've checked grapher on an uncomposited gen4 and gen6 so far (those being the 64-bit setups to hand) and I'm not reproducing the overdraw.
Comment 7 Chris Wilson 2011-10-17 04:32:16 UTC
I'm interested into making grapher into a little benchmark as it has an unusual mix of rendering operations (a mix that I deliberately avoided optimising for so far) and so it would be valuable for me to find the bottlenecks in SNA. My idea of a benchmark is that it would draw the sine wave in a number of positions and give me the time it took to complete rendering (ideally the run time would be around 5 seconds, so probably render for a fixed time and report the number of frames). Note that it is important that each frame has completed rendering before starting the next (to avoid cheating ;-).
Comment 8 Roman Jarosz 2011-10-17 04:42:03 UTC
Created attachment 52411 [details]
Grapher souce code

I've attached the source code, the main code that starts parsing and drawing is in Window::slotParseExp where m_exec->text() is the input text.

The actual drawing is in RenderArea::paintEvent.

I can try to implement the benchmark later in the evening.
To compile:
qmake
make
Comment 9 Chris Wilson 2011-10-17 05:01:33 UTC
Thanks, just built it for oneric/32-bit, and that does show the overdraw. Hmm, the difference might be within libqt...
Comment 10 Chris Wilson 2011-10-17 06:27:14 UTC
Ok, found the grapher issue:

commit f1bb4ebfd8991f2f9eb9c38b9259792c11e7c86a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Oct 17 14:22:58 2011 +0100

    sna/damage: Clear damage->all when subtracting
    
    I missed clearing the all-damaged flag on the subtract fast paths,
    causing us to disregard further GPU damage and losing track of render
    coherency.
    
    Reported-by: Roman Jarosz <kedgedev@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41769
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Can you check with eclipse and see if it resolves that problem as well? Thanks.
Comment 11 Roman Jarosz 2011-10-17 07:33:25 UTC
Eclipse is still broken, actually the "black" background isn't black, but 292d2f.

Grapher is OK now.
Comment 12 Chris Wilson 2011-10-17 07:53:10 UTC
Let's try something different, as I'm still not hitting the right paths through Eclipse... Can you recompile sna with --enable-debug=full and attach the Xorg.log for when you see the issue? Be aware that this will slow down X greatly and with luck with hit an assert! ;-)
Comment 13 Roman Jarosz 2011-10-17 10:47:53 UTC
Created attachment 52434 [details]
xserver debug full log

Sadly I didn't hit assert, I've added mark
************************ PRESSED PAGE UP ******************************
when I've pressed page up and the black background was drawn, right before this mark is blinking cursor rendering.
I've killed xserver right after so there shouldn't be any rendering after. apart from the blinking cursor.
Comment 14 Roman Jarosz 2011-10-19 02:05:09 UTC
Chris did you get the edited grapher with FPS counting that I've sent to your mail?
Comment 15 Chris Wilson 2011-10-19 02:18:41 UTC
(In reply to comment #14)
> Chris did you get the edited grapher with FPS counting that I've sent to your
> mail?

Yes, thanks! Apologies for not replying sooner, it's on my list of things to play with after I've cleared up a few more bugs.
Comment 16 Roman Jarosz 2011-10-31 12:10:05 UTC
Cannot reproduce anymore, looks like it's fixed


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.