Bug 84108

Summary: [ILK] [sna gen 5] Delayed drawing of strings and characters.
Product: xorg Reporter: Mihail Kasadjikov <hamer.mk>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED DUPLICATE QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Restoration of one hunk from fb51ec4
none
Patch not applied and no «"PageFlip" "false"» in xorg.conf.
none
Patch not applied and «"PageFlip" "false"» in xorg.conf.
none
Patch applied and no «"PageFlip" "false"» in xorg.conf.
none
Patch applied and «"PageFlip" "false"» in xorg.conf.
none
KDE4 kwin settings
none
DRI2. Patch not applied and no «"PageFlip" "false"» in xorg.conf. none

Description Mihail Kasadjikov 2014-09-19 21:35:11 UTC
Created attachment 106568 [details]
Restoration of one hunk from fb51ec4

I have Lenovo ThinkPad X201 tablet with Intel Core i7 L-620 (Intel HD Graphics gen 5).

Somewhere around version 2.99.912 of xf86-video-intel I got a strange bug: when I scroll page in browser the refreshing of screen is delayed or when I type text the symbols appear not after each one but after every second symbol.

I found that problem starts after commit:
commit fb51ec44f4b6069ab854233d5d0da34eb79f754c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 09:07:13 2014 +0100

    sna: Rename IGNORE_CPU to IGNORE_DAMAGE to better reflect its purpose
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I found that if I restore only one hunk (4th hunk in file «src/sna/sna_accel.c») from this commit the bug disappears. By this hunk the one line in «src/sna/sna_accel.c» was changed but not just renamed:
from: (flags & REPLACES || !priv->gpu_damage.....
to: (flags & (REPLACES | IGNORE_DAMAGE) || !priv->gpu_damage.....

But according to bug #79993 this maybe not a root cause. But I don't know why my patch works...

Please see video here: http://youtu.be/JjAScg4MZNk
On «test 1» and «test 2» I use clean driver from git and symbols printed with delay.
On «test 3» and «test 4» I use attached patch and symbols printed normally.
Comment 1 Chris Wilson 2014-09-20 06:17:00 UTC
Can you please also attach your Xorg.0.log? What's the PageFlip setting you are changing there?
Comment 2 Mihail Kasadjikov 2014-09-20 20:36:13 UTC
Created attachment 106582 [details]
Patch not applied and no «"PageFlip" "false"» in xorg.conf.

Patch not applied and no «"PageFlip" "false"» in xorg.conf.

$ cat /etc/X11/xorg.conf.d/10-intel.conf | grepv
Section "Device"
        Identifier      "Intel HD"
        Driver          "intel"
        Option          "FallbackDebug" "true"
        Option          "AccelMethod" "sna"
EndSection

This is for «test 1».
Comment 3 Mihail Kasadjikov 2014-09-20 20:37:34 UTC
Created attachment 106583 [details]
Patch not applied and «"PageFlip" "false"» in xorg.conf.

Patch not applied and «"PageFlip" "false"» in xorg.conf.

$ cat /etc/X11/xorg.conf.d/10-intel.conf | grepv
Section "Device"
        Identifier      "Intel HD"
        Driver          "intel"
        Option          "FallbackDebug" "true"
        Option          "PageFlip" "false"
        Option          "AccelMethod" "sna"
EndSection

This is for «test 2».
Comment 4 Mihail Kasadjikov 2014-09-20 20:39:30 UTC
Created attachment 106584 [details]
Patch applied and no «"PageFlip" "false"» in xorg.conf.

Patch applied and no «"PageFlip" "false"» in xorg.conf.

$ cat /etc/X11/xorg.conf.d/10-intel.conf | grepv
Section "Device"
        Identifier      "Intel HD"
        Driver          "intel"
        Option          "FallbackDebug" "true"
        Option          "AccelMethod" "sna"
EndSection

This is for «test 3».
Comment 5 Mihail Kasadjikov 2014-09-20 20:41:16 UTC
Created attachment 106585 [details]
Patch applied and «"PageFlip" "false"» in xorg.conf.

Patch applied and «"PageFlip" "false"» in xorg.conf.

$ cat /etc/X11/xorg.conf.d/10-intel.conf | grepv
Section "Device"
        Identifier      "Intel HD"
        Driver          "intel"
        Option          "FallbackDebug" "true"
        Option          "PageFlip" "false"
        Option          "AccelMethod" "sna"
EndSection

This is for «test 4».
Comment 6 Chris Wilson 2014-09-21 06:32:53 UTC
Is KDE using DRI3? Could you try Option "DRI" "2" to check?
Comment 7 Mihail Kasadjikov 2014-09-21 08:09:07 UTC
Created attachment 106598 [details]
KDE4 kwin settings

KDE uses «OpenGL 2.0» instead of «XRender» for compositing.
Qt uses «raster» engine instead of «native».
But I don't know how and where to see which DRI type KDE uses...
Comment 8 Mihail Kasadjikov 2014-09-21 08:32:02 UTC
Created attachment 106599 [details]
DRI2. Patch not applied and no «"PageFlip" "false"» in xorg.conf.

With «Option DRI 2» the both problems has gone.

$ cat /etc/X11/xorg.conf.d/10-intel.conf | grepv
Section "Device"
        Identifier      "Intel HD"
        Driver          "intel"
        Option          "DRI" "2"
        Option          "FallbackDebug" "true"
        Option          "AccelMethod" "sna"
EndSection

Does it mean that DRI3 support is not so good for daily use?
Comment 9 Chris Wilson 2014-09-21 12:36:05 UTC
The delayed rendering then makes sense. Currently DRI3 implements fences in only one direction, leaving the question of how to sync rendering to a texture (i.e. the compositor reading pixmaps rendered by X) completely unanswered.
Comment 10 Chris Wilson 2014-12-09 08:09:44 UTC

*** This bug has been marked as a duplicate of bug 81551 ***

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.