Bug 26993 - [i965 bisected] Incorrect texture rendering in ut2004 with drm-intel-next
Summary: [i965 bisected] Incorrect texture rendering in ut2004 with drm-intel-next
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
: 26766 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-10 02:38 UTC by fangxun
Modified: 2010-04-07 02:45 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot of incorrect text rendering (83.77 KB, image/jpeg)
2010-03-10 02:38 UTC, fangxun
Details
Xorg log (23.33 KB, text/plain)
2010-03-10 02:39 UTC, fangxun
Details
release_mmap when changing from untiled to tiled (796 bytes, application/octet-stream)
2010-03-17 14:56 UTC, Daniel Vetter
Details

Description fangxun 2010-03-10 02:38:33 UTC
Created attachment 33918 [details]
screenshot of incorrect text rendering 

System Environment:
--------------------------
Arch:           x86_64
Platform:       G45
Libdrm:         (master)04fd3872ee8bd8d5e2c27740508c67c2d51dbc11
Mesa:           (master)6f4ce4a4fed9f0f0f0ee89a63e406ab86dae7150
Xserver:        (master)bbae92795c7eab062e6722c42fa7915e0cee5d69
Xf86_video_intel:  (master)318aa9ed799197810e2039dbe3ec51559dcc888c
Kernel:  (drm-intel-next)338d762fc2dc2c1493813123fc4cea998bb3e683


Bug detailed description:
-------------------------
Texture rendering in ut2004 is incorrect(as shown in the attached screenshot).
This issue is regression. It happens on i965 platform with current unstable kernel. It works fine with current stable kernel. 


Reproduce steps:
----------------
1.xinit&
2.ut2004
Comment 1 fangxun 2010-03-10 02:39:16 UTC
Created attachment 33919 [details]
Xorg log
Comment 2 Eric Anholt 2010-03-10 12:58:51 UTC
If it's a regression, then a bisect is required.
Comment 3 Gordon Jin 2010-03-10 16:57:24 UTC
unblocking Q1 release
Comment 4 Yi Sun 2010-03-16 02:48:14 UTC
with bisect I found the first bad commit is 
commit 10ae9bd25acf394c8fa2f9d795dfa9cec4d19ed6
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Feb 1 13:59:17 2010 +0100

    drm/i915: blow away userspace mappings before fence change

    This aligns it with the other user of i915_gem_clear_fence_reg,
    which blows away the mapping before changing the fence reg.

    Only affects userspace if it races against itself when changing
    tiling parameters, i.e. behaviour is undefined, anyway.

    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Eric Anholt <eric@anholt.net>
Comment 5 Daniel Vetter 2010-03-17 01:02:19 UTC
Can you please try http://bugs.freedesktop.org/attachment.cgi?id=33877 which reverts the effects of this patch? Just reverting this commit as-is is gona break stuff elsewhere.
Comment 6 Eric Anholt 2010-03-17 14:44:11 UTC
The obvious problem with this commit when I look at it now is how does the appropriate fence get installed when going untiled -> tiled and the object is already bound at an appropriate location and is already GTT mapped untiled?
Comment 7 Daniel Vetter 2010-03-17 14:56:55 UTC
Created attachment 34164 [details]
release_mmap when changing from untiled to tiled

Thanks for the hint, Eric. I'm just feeling embarrassingly stupid now ;)

Please test this patch (and forget about the other one I've mentioned).
Comment 8 Shawn Starr 2010-03-17 16:59:20 UTC
Daniel's patch seems to fix my corruption also

http://www.sh0n.net/spstarr/intel-corruption.png
Comment 9 Yi Sun 2010-03-17 18:53:25 UTC
verified with this patch.
Comment 10 Gordon Jin 2010-03-17 20:30:36 UTC
let's keep this open until the fix is committed.
Comment 11 Daniel Vetter 2010-03-19 01:04:55 UTC
*** Bug 26766 has been marked as a duplicate of this bug. ***
Comment 12 Eric Anholt 2010-03-19 13:56:45 UTC
commit fe305198d4bf481d6dd017df35c566c9d477fada
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Mar 18 09:22:12 2010 +0100

    drm/intel: fix up set_tiling for untiled->tiled transition
Comment 13 Gordon Jin 2010-04-01 00:24:14 UTC
(In reply to comment #12)
> commit fe305198d4bf481d6dd017df35c566c9d477fada
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Thu Mar 18 09:22:12 2010 +0100
> 
>     drm/intel: fix up set_tiling for untiled->tiled transition
> 

Eric, can you put this fix to drm-intel-next?
Comment 14 fangxun 2010-04-07 02:45:35 UTC
verified with drm-intel-next.


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.