Bug 47559

Summary: [sna] 'Wheel' color selector in inkscape appears corrupt
Product: xorg Reporter: Da Fox <da.fox.mail>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED NOTOURBUG QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: ben, chris, daniel, jbarnes
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Image showing the wrong rendering of the wheel.
none
miarc.c compiled with -O2 (gcc-4.6.0)
none
miarc.c compiled with -O3 (gcc-4.6.0)
none
miarc.c compiled with -O3 and debug symbols (gcc-4.6.0)
none
miarc.c compiled with -O2 and debug symbols (gcc-4.6.0) none

Description Da Fox 2012-03-20 02:36:38 UTC
Created attachment 58734 [details]
Image showing the wrong rendering of the wheel.

The 'wheel' type color selector in inkscape:
draw an object (a square)
object menu -> fill and stroke (new window opens) 
set 'fill' to 'flat color'
select the 'wheel' color selector

Actual result:
See it look like in the attachment.

Expected result:
It should render without the black lines and edge around the circle.

Tested with Inkscape media-gfx/inkscape-0.48.2 and xf86-video-intel git @ fe8866d6112c3e187d6682e9e4610325668427a0 with SNA enable. I'm using XFCE 4.8 with compositing disabled.

My hardware is a Dell XPS 15 (L502x) laptop with:
00:02.0 VGA compatible controller: Intel Corporation Device 0116 (rev 09)
[    13.803] (II) intel(0): Integrated Graphics Chipset: Intel(R) Sandybridge
Mobile (GT2)
Comment 1 Chris Wilson 2012-03-24 15:02:52 UTC
I haven't yet seen this for myself, so I'm presuming that the theme may be a factor for reproducing the bug. Can you confirm whether or not changing the theme makes any difference?
Comment 2 Da Fox 2012-03-26 03:04:13 UTC
(In reply to comment #1)
> I haven't yet seen this for myself, so I'm presuming that the theme may be a
> factor for reproducing the bug. Can you confirm whether or not changing the
> theme makes any difference?


Different theme, same issue: www.zimagez.com/zimage/screenshot-03262012-110120am.php

This is with 'old' xf86-video-intel git 168ecd96f23756e185af627f814f81b8a4c0c529 , and kernel 3.3.0-00166-g95bcd04 (vanilla 3.3.0 + last-weeks danvet/drm-intel-next).
Comment 3 Chris Wilson 2012-04-09 05:18:28 UTC
Can you please retest following the tor_inplace() bug fix?
Comment 4 Da Fox 2012-04-10 00:30:02 UTC
(In reply to comment #3)
> Can you please retest following the tor_inplace() bug fix?

I've just tried this with 14f70559b516030d141cce09db54cf49d11df9b2 , however the issue is still present. 

Did you notice that this appears to be some kind of (edge?) 'mask' which is not being rendered properly? I mean, sometimes you can see parts of the wheel edge rendered with distorted curvature/rotation in the black gunk. I made another screenshot which more clearly shows what I mean:
http://www.zimagez.com/zimage/screenshot-04102012-092128am.php

Also when testing this the first time after updating the driver and ctrl-alt-bkspc'ing X I got an overflowing EQ, but after a reboot I could move the color wheel without further hangs (until now).

---8<---------
X server debugging script started at Tue Apr 10 09:08:53 CEST 2012
Pruning logs '/X.org log - dafox - Mon Apr  2 06:44:24 CEST 2012/'
Starting X under gdb...
[Thread debugging using libthread_db enabled]

X.Org X Server 1.11.2
Release Date: 2011-11-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0 x86_64 Gentoo
Current Operating System: Linux rakka 3.2.6 #2 SMP Sun Feb 19 02:01:34 CET 2012 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.6 root=/dev/sda3 ro quiet pcie_aspm=force i915.i915_enable_rc6=1 splash=silent,theme:haibane.rakka i915.i915_enable_fbc=0
Build Date: 10 January 2012  09:09:59AM
 
Current version of pixman: 0.25.3
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 10 09:08:53 2012
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) intel(0): failed to get plane resources: Invalid argument
(EE) intel(0): failed to get plane resources: Invalid argument
(EE) Query no Synaptics: 6003C8
(EE) SynPS/2 Synaptics TouchPad Unable to query/initialize Synaptics hardware.
(EE) PreInit returned 11 for "SynPS/2 Synaptics TouchPad"
[mi] EQ overflowing. The server is probably stuck in an infinite loop.

Backtrace:
0: /usr/bin/X (xorg_backtrace+0x26) [0x58f556]
1: /usr/bin/X (mieqEnqueue+0x181) [0x56d861]
2: /usr/bin/X (QueuePointerEvents+0x5d) [0x45176d]
3: /usr/bin/X (xf86PostMotionEventP+0x37) [0x490337]
4: /usr/lib64/xorg/modules/input/evdev_drv.so (0x7f9f3c706000+0x5eed) [0x7f9f3c70beed]
5: /usr/bin/X (0x400000+0x7ad87) [0x47ad87]
6: /usr/bin/X (0x400000+0xa29fe) [0x4a29fe]
7: /lib64/libpthread.so.0 (0x36b8c00000+0x10be0) [0x36b8c10be0]
8: /lib64/libc.so.6 (ioctl+0x7) [0x36b80d39f7]
9: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7f9f3de46e38]
10: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x4d2a8) [0x7f9f3d9202a8]
11: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x47c69) [0x7f9f3d91ac69]
12: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x518c9) [0x7f9f3d9248c9]
13: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x58a0e) [0x7f9f3d92ba0e]
14: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x5ed9e) [0x7f9f3d931d9e]
15: /usr/bin/X (miCopyRegion+0x18a) [0x56bada]
16: /usr/bin/X (miDoCopy+0x3a4) [0x56bff4]
17: /usr/lib64/xorg/modules/drivers/intel_drv.so (0x7f9f3d8d3000+0x5f75a) [0x7f9f3d93275a]
18: /usr/bin/X (0x400000+0x113b4f) [0x513b4f]
19: /usr/bin/X (0x400000+0xe2b9a) [0x4e2b9a]
20: /usr/bin/X (0x400000+0xe40f5) [0x4e40f5]
21: /usr/bin/X (0x400000+0x383a9) [0x4383a9]
22: /usr/bin/X (0x400000+0x25e4d) [0x425e4d]
23: /lib64/libc.so.6 (__libc_start_main+0xed) [0x36b802441d]
24: /usr/bin/X (0x400000+0x261d1) [0x4261d1]
--->8---------
Comment 5 Da Fox 2012-04-10 00:33:18 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Can you please retest following the tor_inplace() bug fix?
> 
> I've just tried this with 14f70559b516030d141cce09db54cf49d11df9b2 , however
> the issue is still present. 

Correction: I tried it with dd093eafb9b94b8e4cd8853d74078c3aa7e72f57 .
That commit is from the va-intel-driver.
Comment 6 Chris Wilson 2012-04-19 15:00:43 UTC
I've not spotted any reason for this to affect you and not reproduced this on any of my machines... So still happens?
Comment 7 Da Fox 2012-04-20 02:58:45 UTC
(In reply to comment #6)
> I've not spotted any reason for this to affect you and not reproduced this on
> any of my machines... So still happens?

Just tested with cb6a3dc2edf3cd612f833bc9a4656166735ee856 and the wheel still shows these errors.
Comment 8 Chris Wilson 2012-04-20 06:18:06 UTC
This seems to be due to garbage spans being generated by miPolyArc:

sna_poly_arc(n=1, lineWidth=1
sna_poly_arc: extents=(30, 30), (62, 62)
sna_poly_arc: fallback -- unattached
sna_poly_arc -- fallback
sna_gc_move_to_cpu, changes=7fffff
sna_gc_move_to_cpu: flushing stipple pixmap
drawable_gc_flags: try operating on drawable inplace [hint? 1]
drawable_gc_flags: partial write
sna_drawable_move_region_to_cpu(pixmap=1781 (92x238), [(30, 30), (62, 62)], flags=7)
sna_drawable_move_region_to_cpu: not attached to 0x2e3b220
sna_poly_arc -- fbPolyArc
sna_fill_spans__cpu x 62
sna_fill_spans__cpu: (42, 30) + 8
sna_fill_spans__cpu: (42, 61) + 8
sna_fill_spans__cpu: (39, 31) + 3
sna_fill_spans__cpu: (50, 734) + 3
sna_fill_spans__cpu: (-26912, 60) + -1204256120
sna_fill_spans__cpu: (0, 0) + 54
sna_fill_spans__cpu: (37, 32) + 2
sna_fill_spans__cpu: (53, 0) + 2
sna_fill_spans__cpu: (0, 59) + 117252
sna_fill_spans__cpu: (0, 0) + 0
sna_fill_spans__cpu: (36, 33) + 2
sna_fill_spans__cpu: (54, 0) + 2
sna_fill_spans__cpu: (0, 58) + 16777215
sna_fill_spans__cpu: (1, 0) + 0
sna_fill_spans__cpu: (35, 34) + 1
sna_fill_spans__cpu: (56, 0) + 1
sna_fill_spans__cpu: (0, 57) + 16777215
sna_fill_spans__cpu: (0, 0) + 0
sna_fill_spans__cpu: (34, 35) + 1
sna_fill_spans__cpu: (57, 0) + 1
sna_fill_spans__cpu: (0, 56) + 0
sna_fill_spans__cpu: (0, 0) + 0
sna_fill_spans__cpu: (33, 36) + 1
sna_fill_spans__cpu: (58, 0) + 1
sna_fill_spans__cpu: (0, 55) + 0
sna_fill_spans__cpu: (0, 0) + 0
sna_fill_spans__cpu: (32, 37) + 2
sna_fill_spans__cpu: (58, 0) + 2
sna_fill_spans__cpu: (0, 54) + 8388607
sna_fill_spans__cpu: (0, -16191) + 0
sna_fill_spans__cpu: (32, 38) + 1
sna_fill_spans__cpu: (59, 0) + 1
sna_fill_spans__cpu: (0, 53) + 8377376
sna_fill_spans__cpu: (0, 0) + 0
sna_fill_spans__cpu: (31, 39) + 1
sna_fill_spans__cpu: (60, 39) + 1
sna_fill_spans__cpu: (31, 52) + 1
sna_fill_spans__cpu: (60, 52) + 1
sna_fill_spans__cpu: (31, 40) + 1
sna_fill_spans__cpu: (60, 40) + 1
sna_fill_spans__cpu: (31, 51) + 1
sna_fill_spans__cpu: (60, 51) + 1
sna_fill_spans__cpu: (31, 41) + 1
sna_fill_spans__cpu: (60, 41) + 1
sna_fill_spans__cpu: (31, 50) + 1
sna_fill_spans__cpu: (60, 50) + 1
sna_fill_spans__cpu: (30, 42) + 1
sna_fill_spans__cpu: (61, 42) + 1
sna_fill_spans__cpu: (30, 49) + 1
sna_fill_spans__cpu: (61, 49) + 1
sna_fill_spans__cpu: (30, 43) + 1
sna_fill_spans__cpu: (61, 43) + 1
sna_fill_spans__cpu: (30, 48) + 1
sna_fill_spans__cpu: (61, 48) + 1
sna_fill_spans__cpu: (30, 44) + 1
sna_fill_spans__cpu: (61, 44) + 1
sna_fill_spans__cpu: (30, 47) + 1
sna_fill_spans__cpu: (61, 47) + 1
sna_fill_spans__cpu: (30, 45) + 1
sna_fill_spans__cpu: (61, 45) + 1
sna_fill_spans__cpu: (30, 46) + 1
sna_fill_spans__cpu: (61, 46) + 1
Comment 9 Da Fox 2012-04-20 06:49:50 UTC
Created attachment 60386 [details]
miarc.c compiled with -O2 (gcc-4.6.0)
Comment 10 Da Fox 2012-04-20 06:50:58 UTC
Created attachment 60387 [details]
miarc.c compiled with -O3 (gcc-4.6.0)
Comment 11 Da Fox 2012-04-20 06:59:41 UTC
Created attachment 60388 [details]
miarc.c compiled with -O3 and debug symbols (gcc-4.6.0)
Comment 12 Da Fox 2012-04-20 07:08:25 UTC
Created attachment 60389 [details]
miarc.c compiled with -O2 and debug symbols (gcc-4.6.0)
Comment 13 Chris Wilson 2012-04-20 07:10:09 UTC
gcc bug in moving from the SSE registers back onto the heap.

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.