Cursor code broken
Hi Chris!
The intel xorg driver cursor code is broken, at least on my system. The last good commit is 3810cff42bca1badc5844002694a6f582c0f423.
Hardware: AOpen i915GMm-hfs with Pentium-M Dothan cpu
Software: openSuSE 13.1, kernel 3.14, xorg git master, kde
Expected behavior:
===============
If the mouse cursor hits a window border, it changes it appearance and stays at the same location. If the left mouse button
is depressed the window might be resized.
Current behavior:
=============
The mouse cursor hits a window border, it does not change its appearance and is relocated a few pixels instead. If the mouse cursor is moved a bit further there is a second unexpected relocation to the opposite direction. This new behavior of the mouse cursor has been implemented for both axes. Resizing is impossible as the mouse cursor cannot be put exactly on the window border.
After I realized that the intel driver is the cause of the problem, I bisected. During bisecting I realized that there are two cursor problems after 3810cff42, the one described above that is still present in current git HEAD and a problem with a totally distorted cursor image that already has been solved. In the bisect log below "good" means "cursor handling completely ok", "bad" means "one or both of the cursor problems present".
git bisect start
# good: [220accd828c5a0054ae9e3b491a434f7a6c750e0] sna: Only enable cursor support if the hw cursor is supported git bisect good 220accd828c5a0054ae9e3b491a434f7a6c750e0
# bad: [3310ee89c1f1a663de5f5b12b8125809a213996f] sna: Avoid discarding damage when applying WHOLE hint to pixmap migration git bisect bad 3310ee89c1f1a663de5f5b12b8125809a213996f
# bad: [80792a3f490578735065d9f67ca6ebac00b5bb75] sna: Our cursors are always square.
git bisect bad 80792a3f490578735065d9f67ca6ebac00b5bb75
# good: [e3810cff42bca1badc5844002694a6f582c0f423] sna: Move cursor reload into crtc notify
git bisect good e3810cff42bca1badc5844002694a6f582c0f423
# bad: [e07f8e2e625fb34f9ad795ca8fffc9a9e88e25b2] sna: Fix 2-color to ARGB cursor conversion
git bisect bad e07f8e2e625fb34f9ad795ca8fffc9a9e88e25b2
# bad: [e8be2a438d7a413ba6c64005971ce814b0076fc7] sna: Clear the surrounding areas of small cursors
git bisect bad e8be2a438d7a413ba6c64005971ce814b0076fc7
# bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors
git bisect bad 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2
# first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors # bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors git bisect bad 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2 # first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors # bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors git bisect bad 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2 # first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors
cu,
Knut
Quoted 4 lines · Knut Petersen
Hi Chris!
The intel xorg driver cursor code is broken, at least on my system. The last good commit is
3810cff42bca1badc5844002694a6f582c0f423.
Hm, you mean
commit 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2
Author: Chris Wilson <[email protected]> Date: Thu Mar 27 14:15:30 2014 +0000
sna: Support variable sized cursors
Iirc Chris already fixed this in latest git.
-Daniel
Quoted 55 lines
Hardware: AOpen i915GMm-hfs with Pentium-M Dothan cpu
Software: openSuSE 13.1, kernel 3.14, xorg git master, kdeExpected behavior:
===============If the mouse cursor hits a window border, it changes it appearance and stays at the same location. If the left mouse button
is depressed the window might be resized.Current behavior:
=============The mouse cursor hits a window border, it does not change its appearance and is relocated a few pixels instead. If the mouse cursor is moved a bit further there is a second unexpected relocation to the opposite direction. This new behavior of the mouse cursor has been implemented for both axes. Resizing is impossible as the mouse cursor cannot be put exactly on the window border.
After I realized that the intel driver is the cause of the problem, I bisected. During bisecting I realized that there are two cursor problems after
3810cff42, the one described above that is still present in current git HEAD and a problem with a totally distorted cursor image that already has been solved. In the bisect log below "good" means "cursor handling completely ok", "bad" means "one or both of the cursor problems present".git bisect start
# good: [220accd828c5a0054ae9e3b491a434f7a6c750e0] sna: Only enable cursor support if the hw cursor is supported git bisect good220accd828c5a0054ae9e3b491a434f7a6c750e0
# bad: [3310ee89c1f1a663de5f5b12b8125809a213996f] sna: Avoid discarding damage when applying WHOLE hint to pixmap migration git bisect bad3310ee89c1f1a663de5f5b12b8125809a213996f
# bad: [80792a3f490578735065d9f67ca6ebac00b5bb75] sna: Our cursors are always square.
git bisect bad80792a3f490578735065d9f67ca6ebac00b5bb75
# good: [e3810cff42bca1badc5844002694a6f582c0f423] sna: Move cursor reload into crtc notify
git bisect goode3810cff42bca1badc5844002694a6f582c0f423
# bad: [e07f8e2e625fb34f9ad795ca8fffc9a9e88e25b2] sna: Fix 2-color to ARGB cursor conversion
git bisect bade07f8e2e625fb34f9ad795ca8fffc9a9e88e25b2
# bad: [e8be2a438d7a413ba6c64005971ce814b0076fc7] sna: Clear the surrounding areas of small cursors
git bisect bade8be2a438d7a413ba6c64005971ce814b0076fc7
# bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors
git bisect bad25ca8f136cef9e1bdf06967bf8e78c87b54ffce2# first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors # bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors git bisect bad 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2 # first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors # bad: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursors git bisect bad 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2 # first bad commit: [25ca8f136cef9e1bdf06967bf8e78c87b54ffce2] sna: Support variable sized cursorscu,
Knut_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Knut Petersen
Hi Chris!
The intel xorg driver cursor code is broken, at least on my system. The last good commit is
3810cff42bca1badc5844002694a6f582c0f423.Hm, you mean
Quoted 7 lines
commit
25ca8f136cef9e1bdf06967bf8e78c87b54ffce2Author: Chris Wilson <[email protected]> Date: Thu Mar 27 14:15:30 2014 +0000sna: Support variable sized cursors
Iirc Chris already fixed this in latest git.
Ah, no. This is a phys cursor artifact. Special hardware, extra special code.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 13 lines · Chris Wilson
Quoted 12 lines · Daniel Vetter
Quoted 4 lines · Knut Petersen
Hi Chris!
The intel xorg driver cursor code is broken, at least on my system. The last good commit is
3810cff42bca1badc5844002694a6f582c0f423.Hm, you mean
commit
25ca8f136cef9e1bdf06967bf8e78c87b54ffce2Author: Chris Wilson <[email protected]> Date: Thu Mar 27 14:15:30 2014 +0000
Quoted 6 lines
Quoted 3 lines
sna: Support variable sized cursors
Iirc Chris already fixed this in latest git.
Ah, no. This is a phys cursor artifact. Special hardware, extra special code.
Should be fixed with
commit dba43d370b984e262f6fe5920b38b433f4bd392b
Author: Chris Wilson <[email protected]> Date: Wed Apr 9 16:11:26 2014 +0100
sna: Use pwrite to update physical cursors
Older hardware uses physical addresses for its cursor, which are implemented by the kernel in an incoherent fashion. Maybe with stolen support this would be different...
Fixes regression on [845g, 945g] from commit 25ca8f136cef9e1bdf06967bf8e78c87b54ffce2
Author: Chris Wilson <[email protected]>
Date: Thu Mar 27 14:15:30 2014 +0000
sna: Support variable sized cursors
It just so happens that the older hardware I tested on (845g and pnv) doesn't use physical cursors!
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 15 lines · Chris Wilson
Quoted 14 lines · Chris Wilson
Quoted 13 lines · Daniel Vetter
Quoted 4 lines · Knut Petersen
Hi Chris!
The intel xorg driver cursor code is broken, at least on my system. The last good commit is
3810cff42bca1badc5844002694a6f582c0f423.Hm, you mean
commit
25ca8f136cef9e1bdf06967bf8e78c87b54ffce2Author: Chris Wilson <[email protected]> Date: Thu Mar 27 14:15:30 2014 +0000sna: Support variable sized cursors
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Iirc Chris already fixed this in latest git.
Ah, no. This is a phys cursor artifact. Special hardware, extra special code.
Should be fixed with
commit
dba43d370b984e262f6fe5920b38b433f4bd392bAuthor: Chris Wilson <[email protected]> Date: Wed Apr 9 16:11:26 2014 +0100
Yes indeed. Thanks!
cu,
Knut
Quoted 22 lines
sna: Use pwrite to update physical cursors
Older hardware uses physical addresses for its cursor, which are implemented by the kernel in an incoherent fashion. Maybe with stolen support this would be different...
Fixes regression on [845g, 945g] from commit
25ca8f136cef9e1bdf06967bf8e78c87b54ffce2
Author: Chris Wilson <[email protected]>
Date: Thu Mar 27 14:15:30 2014 +0000sna: Support variable sized cursors
Reported-by Knut Petersen <[email protected]>Signed-off-by Chris Wilson <[email protected]>It just so happens that the older hardware I tested on (845g and pnv) doesn't use physical cursors!
-Chris