Bug 27449 - [945] Large window corruption with 2.11 + 2.6.32.10
Summary: [945] Large window corruption with 2.11 + 2.6.32.10
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 27608 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-04 05:21 UTC by Clemens Eisserer
Modified: 2010-07-03 01:00 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot (62.05 KB, image/png)
2010-04-04 05:21 UTC, Clemens Eisserer
no flags Details
xorg log (21.25 KB, application/octet-stream)
2010-04-04 05:22 UTC, Clemens Eisserer
no flags Details
Screenshot (265.47 KB, image/png)
2010-04-04 05:23 UTC, Clemens Eisserer
no flags Details
Firefox tries to display huge pixmap (415.88 KB, image/png)
2010-04-10 11:32 UTC, Alexander Lam
no flags Details
kernel patch: fix tiling limits (1.49 KB, patch)
2010-04-14 11:01 UTC, Daniel Vetter
no flags Details | Splinter Review
fresh xorg log with intel-2.11.901 + linux-2.6.34 (22.29 KB, text/plain)
2010-06-23 10:01 UTC, Clemens Eisserer
no flags Details
corruption with large window (112.60 KB, image/png)
2010-06-23 10:01 UTC, Clemens Eisserer
no flags Details

Description Clemens Eisserer 2010-04-04 05:21:12 UTC
Created attachment 34658 [details]
Screenshot

Hi,

I am running Fedora 12 + updates testing, and self-compiled intel-2.11 on an i945GM.

With 2.11, windows larger than 2048 pixels aren't rendered properly. Looks somehow tiling related. (screenshot attached)

- Clemens
Comment 1 Clemens Eisserer 2010-04-04 05:22:10 UTC
Created attachment 34659 [details]
xorg log
Comment 2 Clemens Eisserer 2010-04-04 05:23:48 UTC
Created attachment 34660 [details]
Screenshot
Comment 3 Alexander Lam 2010-04-10 11:32:36 UTC
Created attachment 34879 [details]
Firefox tries to display huge pixmap

This bug also occurs when Firefox tries to show a huge pixmap (so I guess OP is using compiz which has to convert the window into a pixmap too?)

Attachment shows image http://jwcxz.com/pictures/desktop/10-03/screenshot.png (2720x1024 pixels)
Comment 4 Clemens Eisserer 2010-04-10 12:02:39 UTC
just for the record, I am nt using a composition-manager.

Funny, if I open your screenshot I see garbage when the image is re-sized to browser-window-size, however when viewing it in its original size (simply click on it) everything is fine.
Comment 5 Alexander Lam 2010-04-10 15:21:16 UTC
(In reply to comment #4)
> just for the record, I am nt using a composition-manager.
Huh. Something of KDE doing something funky I guess then.

> Funny, if I open your screenshot I see garbage when the image is re-sized to
> browser-window-size, however when viewing it in its original size (simply click
> on it) everything is fine.
Same here.
Comment 6 Daniel Vetter 2010-04-14 11:01:15 UTC
Created attachment 35023 [details] [review]
kernel patch: fix tiling limits

This patch fixes the issue on my i945. Please test. Should apply to any reasonable new kernel.
Comment 7 Alexander Lam 2010-04-14 22:16:35 UTC
(In reply to comment #6)
> Created an attachment (id=35023) [details]
> kernel patch: fix tiling limits
> 
> This patch fixes the issue on my i945. Please test. Should apply to any
> reasonable new kernel.

Thanks, this patch fixes the issue with firefox and large pictures
Comment 8 Carl Worth 2010-05-05 10:46:37 UTC
(In reply to comment #6)
> Created an attachment (id=35023) [details]
> kernel patch: fix tiling limits
> 
> This patch fixes the issue on my i945. Please test. Should apply to any
> reasonable new kernel.

Hi Daniel,

Thanks for the patch.

Want to submit a complete commit with a commit message for this one?

-Carl
Comment 9 Chris Wilson 2010-05-05 10:57:44 UTC
commit c36a2a6de59e4a141a68b7575de837d3b0bd96b3
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Apr 17 15:12:03 2010 +0200

    drm/i915: fix tiling limits for i915 class hw v2
    
    Current code is definitely crap: Largest pitch allowed spills into
    the TILING_Y bit of the fence registers ... :(
    
    I've rewritten the limits check under the assumption that 3rd gen hw
    has a 3d pitch limit of 8kb (like 2nd gen). This is supported by an
    otherwise totally misleading XXX comment.
    
    This bug mostly resulted in tiling-corrupted pixmaps because the kernel
    allowed too wide buffers to be tiled. Bug brought to the light by the
    xf86-video-intel 2.11 release because that unconditionally enabled
    tiling for pixmaps, relying on the kernel to check things. Tiling for
    the framebuffer was not affected because the ddx does some additional
    checks there ensure the buffer is within hw-limits.
    
    v2: Instead of computing the value that would be written into the
    hw fence registers and then checking the limits simply check whether
    the stride is above the 8kb limit. To better document the hw, add
    some WARN_ONs in i915_write_fence_reg like I've done for the i830
    case (using the right limits).
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27449
    Tested-by: Alexander Lam <lambchop468@gmail.com>
    Cc: stable@kernel.org
    Signed-off-by: Eric Anholt <eric@anholt.net>
Comment 10 Carl Worth 2010-05-05 16:53:23 UTC
(In reply to comment #9)
> commit c36a2a6de59e4a141a68b7575de837d3b0bd96b3
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Sat Apr 17 15:12:03 2010 +0200
> 
>     drm/i915: fix tiling limits for i915 class hw v2

Thanks, Chris.

I had looked for a committed fix, but missed this one.

-Carl
Comment 11 Chris Wilson 2010-05-11 09:28:04 UTC
*** Bug 27608 has been marked as a duplicate of this bug. ***
Comment 12 Clemens Eisserer 2010-06-17 17:13:52 UTC
Its probably another bug, but I see the same sympthoms with linux-2.6.34 + intel-2.11.901
Comment 13 Chris Wilson 2010-06-22 02:47:50 UTC
Clemens, do you mind double checking your libraries and uploading a fresh x.log and screenshot? As you probably know, we've had a fair number of tiling bugs across the stack that I want to be certain that we are not chasing an old bug first. Thanks.
Comment 14 Clemens Eisserer 2010-06-23 10:01:09 UTC
Created attachment 36439 [details]
fresh xorg log with intel-2.11.901 + linux-2.6.34
Comment 15 Clemens Eisserer 2010-06-23 10:01:46 UTC
Created attachment 36440 [details]
corruption with large window
Comment 16 Clemens Eisserer 2010-06-23 10:02:21 UTC
ok, done. I also see problems when loading huge images in firefox.
Comment 17 Chris Wilson 2010-06-23 10:12:27 UTC
(In reply to comment #16)
> ok, done. I also see problems when loading huge images in firefox.

Definitely a tiling issue and definitely not the same as the original bug. Perhaps even worse since it can be hit in firefox on the LVDS with i945.
Comment 18 Alexander Lam 2010-06-23 12:22:40 UTC
(In reply to comment #17)

> Definitely a tiling issue and definitely not the same as the original bug.
> Perhaps even worse since it can be hit in firefox on the LVDS with i945.

I don't know if this changes anything, but FYI, the original bug was hit in "firefox on the LVDS with i945" also.
Comment 19 Chris Wilson 2010-06-23 12:56:01 UTC
I want your laptop! :)
Comment 20 Chris Wilson 2010-06-23 13:39:46 UTC
I found one possibly tiling related issue:

commit 6d33e578de4e23336ac69cc3c5d0935a65d4dda1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 23 21:28:50 2010 +0100

    Limit maximum tiled stride to 8k and untiled to 32k.
    
    Tiling on gen 2/3 hardware is only supported for pitches up to 8192
    bytes, so above this limit the surface will be untiled and we will no
    longer have to comply with the power-of-two pitch alignment. So
    disabling tiling for these too wide surface should ~halve the memory
    requirement for the full surface.
    
    Also the absolute limit for the 2D blitter is 32,768 bytes. The
    documentation says "up to 32,768 bytes" and my PineView box was
    malfunction with a surface stride of 32,768 so set the limit to be
    32,767.
    
    References:
    
      Bug 28497 - Graphics corruption after opening a specific website
      https://bugs.freedesktop.org/show_bug.cgi?id=28497
Comment 21 Chris Wilson 2010-06-24 03:44:14 UTC
Another one, in drm:

commit 726210f87d558d558022f35bc8c839e798a19f0c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jun 24 11:38:00 2010 +0100

    intel: Limit tiled pitches to 8192 on pre-i965.
    
    Fixes:
    
      Bug 28515 - Failed to allocate framebuffer when exceed 2048 width
      https://bugs.freedesktop.org/show_bug.cgi?id=28515
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 22 Chris Wilson 2010-07-02 11:17:35 UTC
Ok, I just tried a 4kx4k virtual desktop on my PineView. Can't say I was impressed. I'll ping this bug when I have it working...
Comment 23 Chris Wilson 2010-07-03 01:00:54 UTC
I went back and checked 2.12 with 2.6.35-rc3 and drm.git, that works. So the corruption I was seeing is just in my development tree. Sorry for the noise.

I have firefox rendering correctly in a 4kx4k window on i915-class hardware, so unless you can show me otherwise I think this bug can be closed.


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.