Bug 94432 - [SKL] highlighting doesn't always work properly in aterm
Summary: [SKL] highlighting doesn't always work properly in aterm
Status: NEW
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-07 20:02 UTC by Ilia Mirkin
Modified: 2016-03-08 17:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
screenshot of the bad highlight (55.34 KB, image/png)
2016-03-07 20:03 UTC, Ilia Mirkin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilia Mirkin 2016-03-07 20:02:38 UTC
When I try to highlight things, sometimes only the bits of the aterm that have characters get highlighted, spaces in those lines are left alone. When forcing a redraw, it's all rendered as expected.

This also has unfortunate usability implications wrt cursor rendering as focus comes in/out of the aterm.

00:02.0 VGA compatible controller [0300]: Intel Corporation Sky Lake Integrated Graphics [8086:1912] (rev 06)

[   545.138] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20151010
[   545.139] (--) intel(0): gen9 engineering sample
[   545.139] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2; using a maximum of 4 threads

Note that I have dual rotated displays, one on HDMI1, one on DP1. DDX is at commit d1672806a.

Window manager: WindowMaker, no TearFree, no compositor. A very similar configuration works fine on HSW.
Comment 1 Ilia Mirkin 2016-03-07 20:03:09 UTC
Created attachment 122151 [details]
screenshot of the bad highlight
Comment 2 Ilia Mirkin 2016-03-07 20:23:10 UTC
BTW, enabling TearFree causes the following errors:

[  6156.955] (EE) intel(0): failed to set mode: Invalid argument [22]
[  6156.974] (EE) intel(0): failed to set mode: Invalid argument [22]

and both screens go to sleep. (This happened several times.) This is with xorg 1.18.1 and kernel 4.4.4.
Comment 3 Chris Wilson 2016-03-08 16:50:24 UTC
Maybe this attempt at skipping clear glyphs is mistaken for when the op is special:

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 71a6207..9dcccfa 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -16263,7 +16263,7 @@ sna_reversed_glyph_blt(DrawablePtr drawable, GCPtr gc,
                                goto skip;
                        }
 
-                       {
+                       if (0) {
                                int clear = 1, j = h;
                                uint8_t *g = glyph;
Comment 4 Chris Wilson 2016-03-08 16:56:10 UTC
If that is indeed the issue (and it seems likely), then the right fix will be

-                       {
+                       if (rop == ROP_S) {
Comment 5 Ilia Mirkin 2016-03-08 17:10:42 UTC
As mentioned on IRC, this does not appear to resolve the issue. A very unscientific observation is that selecting things works the first few times in the session, but then stops working. Could be coincidence.

In addition to the patch in comment #3, I also tried to return false at the top of sna_reversed_glyph_blt.


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.