Bug 49391

Summary: [G33 SNA] Glyph and rendering corruption with SNA enabled, again
Product: xorg Reporter: Matti Hämäläinen <ccr>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Screenshot of the return of the glyph (cache(?)) corruption none

Description Matti Hämäläinen 2012-05-02 09:38:07 UTC
Created attachment 60909 [details]
Screenshot of the return of the glyph (cache(?)) corruption

The funny glyph problems and weird "looks-like-a-broken-wrapping/modulo" rendering in Firefox seem to have come back at some point. At least the latter was fixed by Chris earlier this year.

Unfortunately I am unable to bisect, as it seems the (somewhat) older checkouts of xf86-video-intel don't compile with this current Xorg/kernel/etc stack.

As an added bonus, some videos demonstrating the problems in Theora/OGV format:

http://tnsp.org/~ccr/intel-gfx/

Not a very helpful report, I know. :/

-- Window manager: WindowMaker 0.92 (also present with Compiz, so probably not WM related)
-- chipset: 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31
Express Integrated Graphics Controller (rev 10)
-- system architecture: i686 / 32bit
-- xf86-video-intel: (latest) GIT 7e09babb3e9e23882db30ee7d0c22c503962faa9
-- xserver: X.Org X Server 1.12.1 from Debian unstable
-- mesa: 8.0.2-2 from Debian unstable
-- libpixman: 0.25.2-1
-- libdrm version: 2.4.33-1
-- kernel version: 3.3.4 (vanilla from kernel.org)
-- Linux distribution: Debian Testing aka Wheezy
-- Machine or mobo model: Asus P5KPL-CM
-- Display connector: VGA
Comment 1 Chris Wilson 2012-05-02 10:11:14 UTC
Hi Matti, can you try and see whether this is the minimal required patch:

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index d519ed6..b3ac31f 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3978,7 +3978,7 @@ struct kgem_bo *kgem_create_buffer_2d(struct kgem *kgem,
        assert(width > 0 && height > 0);
        assert(ret != NULL);
        stride = ALIGN(width, 2) * bpp >> 3;
-       stride = ALIGN(stride, 4);
+       stride = ALIGN(stride, 64);
 
        DBG(("%s: %dx%d, %d bpp, stride=%d\n",
             __FUNCTION__, width, height, bpp, stride));
Comment 2 Chris Wilson 2012-05-02 11:22:01 UTC
commit f4c34e9ab32f31669896b8f626195827a85af337
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 2 19:09:10 2012 +0100

    sna: Bring back the minimum alignment for G33
    
    The underlying cause is still not fixed. It should be possible to use
    the much laxer alignment for single-stream linear. Still no idea how I
    fail to convince the GPU to drop the depth buffer.
    
    Reported-by: Matti Hamalainen <ccr@tnsp.org>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=49391
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 3 Matti Hämäläinen 2012-05-02 11:28:06 UTC
Fix confirmed. Thanks!

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.