Bug 90138 - minor font corruption on baytrail since sna: Enable blitting with Y-tiled surfaces
Summary: minor font corruption on baytrail since sna: Enable blitting with Y-tiled sur...
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: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 12:54 UTC by Andy Furniss
Modified: 2015-04-23 10:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg log (23.38 KB, text/plain)
2015-04-22 12:55 UTC, Andy Furniss
no flags Details
screen shot (52.12 KB, image/png)
2015-04-22 12:55 UTC, Andy Furniss
no flags Details

Description Andy Furniss 2015-04-22 12:54:49 UTC
On J1900 baytrail dri2 with Xorg 1.16 (xserver 1.16.4), recent git kernel/mesa.

Since ddx commit 

75d87762471e195dddd73056fc6a06e17db1c8b0 
sna: Enable blitting with Y-tiled surfaces

I get some minor corruption on fluxbox menus sometimes also on toolbar. Fonts in xterms are not affected.

xorg log + screen attached
Comment 1 Andy Furniss 2015-04-22 12:55:20 UTC
Created attachment 115268 [details]
xorg log
Comment 2 Andy Furniss 2015-04-22 12:55:58 UTC
Created attachment 115269 [details]
screen shot
Comment 3 Chris Wilson 2015-04-22 15:39:50 UTC
I hope

commit 4fdd3a714d380afd3d6425aedbbf2ae20180638b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 22 14:08:17 2015 +0100

    sna/gen6+: Discourage use of the BLT with Y-tiling
    
    Somewhere, somehow the first glyph character upload into the Y-tiled
    glyph cache is corrupt since
    
    commit 75d87762471e195dddd73056fc6a06e17db1c8b0
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri Apr 17 10:29:28 2015 +0100
    
        sna: Enable blitting with Y-tiled surfaces
    
    I have not spotted whether it is a missing magic bit or a bad GTT path,
    but ideally we don't want to switch to BLT along that path anyway (since
    we are in the middle of rendering with the other engine).
    
    Reported-by: Andy Furniss <adf.lists@gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=90138
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

sweeps it back under the carpet.
Comment 4 Andy Furniss 2015-04-22 16:20:37 UTC
(In reply to Chris Wilson from comment #3)
> I hope
> 
> commit 4fdd3a714d380afd3d6425aedbbf2ae20180638b
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Wed Apr 22 14:08:17 2015 +0100
> 
>     sna/gen6+: Discourage use of the BLT with Y-tiling
>     
>     Somewhere, somehow the first glyph character upload into the Y-tiled
>     glyph cache is corrupt since
>     
>     commit 75d87762471e195dddd73056fc6a06e17db1c8b0
>     Author: Chris Wilson <chris@chris-wilson.co.uk>
>     Date:   Fri Apr 17 10:29:28 2015 +0100
>     
>         sna: Enable blitting with Y-tiled surfaces
>     
>     I have not spotted whether it is a missing magic bit or a bad GTT path,
>     but ideally we don't want to switch to BLT along that path anyway (since
>     we are in the middle of rendering with the other engine).
>     
>     Reported-by: Andy Furniss <adf.lists@gmail.com>
>     References: https://bugs.freedesktop.org/show_bug.cgi?id=90138
>     Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> sweeps it back under the carpet.

I am still getting the corruption with this.
Comment 5 Chris Wilson 2015-04-22 16:51:06 UTC
That's kind of a relief, since I knew I hadn't fixed it :)

A useful test will be:

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 76e6913..110091d 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -84,7 +84,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
 #define DBG_NO_HANDLE_LUT 0
 #define DBG_NO_WT 0
 #define DBG_NO_WC_MMAP 0
-#define DBG_NO_BLT_Y 0
+#define DBG_NO_BLT_Y 1
 #define DBG_NO_SCANOUT_Y 0
 #define DBG_NO_DETILING 0
 #define DBG_DUMP 0

that should filter out the use of the new magic bit.
Comment 6 Andy Furniss 2015-04-22 17:22:37 UTC
(In reply to Chris Wilson from comment #5)
> That's kind of a relief, since I knew I hadn't fixed it :)
> 
> A useful test will be:
> 
> diff --git a/src/sna/kgem.c b/src/sna/kgem.c
> index 76e6913..110091d 100644
> --- a/src/sna/kgem.c
> +++ b/src/sna/kgem.c
> @@ -84,7 +84,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int
> num_pages, unsigned flags);
>  #define DBG_NO_HANDLE_LUT 0
>  #define DBG_NO_WT 0
>  #define DBG_NO_WC_MMAP 0
> -#define DBG_NO_BLT_Y 0
> +#define DBG_NO_BLT_Y 1
>  #define DBG_NO_SCANOUT_Y 0
>  #define DBG_NO_DETILING 0
>  #define DBG_DUMP 0
> 
> that should filter out the use of the new magic bit.

This one does fix it.
Comment 7 Chris Wilson 2015-04-22 17:27:32 UTC
Ok, that more or less narrows it down to the magic bit setting.
Comment 8 Chris Wilson 2015-04-23 07:46:22 UTC
commit 52bc0b119cab977b82cbbd96f689b7376b83d6f2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 22 19:45:16 2015 +0100

    sna/gen6: Do not force a blt switch onto a Y-tiled surface
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

fixes the culprit for sending the glyph via the blitter when I wanted to use the render engine.

commit 64e45993cf9d13b5900dc6b8afacffdfea14fa7f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Apr 22 20:15:38 2015 +0100

    sna: Fix interpretation of SWCTRL
    
    Bspec says it is an override for the source format, irrespective of
    the tiling bit supplied in the command packet. So we need to apply the
    FLUSH+LRI more often.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

brings the magic bits into line with later bspec. But I can still reproduce the issue on byt if I force it use the blitter an Y. :|

And finally,

commit 09d8e5e1b3215c0e58c2ce44048458152c523270
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Apr 23 08:35:52 2015 +0100

    sna/gen6+: Fix BLT src/dst tiling checks
    
    In a couple of the copy paths, src/dst parameters were reversed,
    inverting the direction of the tiling flags.
    
    Reported-by: Andy Furniss <adf.lists@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90138
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 9 Andy Furniss 2015-04-23 10:22:34 UTC
Confirm working OK for me with the latest changes


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.