Bug 13685 - front buffer relocation not handled correctly
Summary: front buffer relocation not handled correctly
Status: RESOLVED WONTFIX
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-16 02:35 UTC by Lukas Hejtmanek
Modified: 2008-06-20 10:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
memory corruption output. (88.23 KB, text/plain)
2008-03-20 01:24 UTC, Lukas Hejtmanek
no flags Details

Description Lukas Hejtmanek 2007-12-16 02:35:43 UTC
I've tried latest git head of DRM on i965GM chipset. After several suspend/resume cycles the framebuffer begins at incorrect offset (I cannot see top of the screen and the screen is shifted to to right by 200 pixels approx). Adding vbetool post does not help. If I revert DRM to the default kernel, it is OK across suspend/resume cycles. The same happens if I just start another X server on different screen. Similarly, built in kernel driver is OK.
Comment 1 Jesse Barnes 2007-12-17 08:34:06 UTC
I've got a 965GM test machine I can use, I'll try to reproduce this.
Comment 2 Lukas Hejtmanek 2008-01-15 08:42:37 UTC
The suspend/resume does not actually make display corruption, the VT switch does. 

Steps to reproduce:
use latest drm/dri kernel modules
use Xserver 1.4.1
start the Xserver
run any movie via textured video
do VT switch
display is corrupted.
Comment 3 Lukas Hejtmanek 2008-01-17 07:35:39 UTC
I noticed that DSPBSURF gets changed on VT switch if a movie has been played.

VT switch without movie does not change DSPBSURF value.
Comment 4 Hong Liu 2008-02-04 19:03:44 UTC
The patch (commit id 9536515d7717969795edc1b80d6e6a36820dd575) seems to fix this problem according to the bug reporter. So close it now.

Thanks,
hong
Comment 5 Hong Liu 2008-02-13 22:37:12 UTC
From Lukas:

Today, I discovered that the bug is still present, it just does not occur so
often. I.e., some random bo_list corruption is still present in driver/dri.
Comment 6 Jesse Barnes 2008-03-06 14:45:11 UTC
Hong, didn't you already fix the bo_list corruption?  If so, is this bug actually fixed?
Comment 7 Lukas Hejtmanek 2008-03-06 14:49:27 UTC
(In reply to comment #6)
> Hong, didn't you already fix the bo_list corruption?  If so, is this bug
> actually fixed?
> 

I can test it as soon as drm git will compile with 2.6.25-rc kernels.
Comment 8 Jesse Barnes 2008-03-06 14:55:05 UTC
You should be able to just use the 2.6.25-rc bits directly, the DRM suspend/resume code is upstream as of 2.6.25-rc1 iirc.
Comment 9 Lukas Hejtmanek 2008-03-06 14:58:06 UTC
(In reply to comment #8)
> You should be able to just use the 2.6.25-rc bits directly, the DRM
> suspend/resume code is upstream as of 2.6.25-rc1 iirc.
> 

but stock DRM does not contain TTM code, does it? I saw the bo_list corruption only with TTM enabled DRM which is in git only.
Comment 10 Jesse Barnes 2008-03-06 15:01:51 UTC
Oh right, yeah they don't contain the TTM bits.  dri-devel may have patches to fix the DRM build with recent kernels...
Comment 11 Jesse Barnes 2008-03-06 15:02:18 UTC
Oops, accidentally reassigned.
Comment 12 Lukas Hejtmanek 2008-03-15 03:43:28 UTC
(In reply to comment #7)
> I can test it as soon as drm git will compile with 2.6.25-rc kernels.

It seems that the latest git of xorg intel driver and dri driver fix this bug. So I guess it can be closed.

Comment 13 Jesse Barnes 2008-03-15 10:18:01 UTC
Ok, thanks for testing Lukas.  Sounds like things are slowly becoming solid & reliable for you. :)
Comment 14 Lukas Hejtmanek 2008-03-20 01:23:53 UTC
(In reply to comment #13)
> Ok, thanks for testing Lukas.  Sounds like things are slowly becoming solid &
> reliable for you. :)
> 

Unfortunately, I have seen this bug again today. I noticed that before suspend and before any other previous suspend, the frame buffer location was:
(II) intel(0): 0x01f00000-0x02a7bfff: front buffer (11760 kB) X tiled

After resume that do not have the bug the front buffer location is the same. However, if the display is corrupted, the allocation looks like:
(II) intel(0): 0x02000000-0x02b7bfff: front buffer (11760 kB) X tiled

The complete layout is the following:
(bad one)
(II) intel(0): BO memory allocation layout:
(II) intel(0): 0x0077f000:            start of memory manager
(II) intel(0): 0x0077f000-0x0083afff: xv buffer (752 kB)
(II) intel(0): 0x0083b000-0x013b6fff: depth buffer (11760 kB) Y tiled
(II) intel(0): 0x013b7000-0x01f32fff: back buffer (11760 kB) X tiled
(II) intel(0): 0x02000000-0x02b7bfff: front buffer (11760 kB) X tiled
(II) intel(0): 0x02b7c000-0x02b7cfff: overlay registers (4 kB)
(II) intel(0): 0x02b7d000-0x02b8cfff: exa G965 state buffer (64 kB)
(II) intel(0): 0x02b8d000-0x02b94fff: logical 3D context (32 kB)
(II) intel(0): 0x02b95000-0x02b9efff: HW cursors (40 kB)
(II) intel(0): 0x0bd8c000:            end of memory manager

(good one)
(II) intel(0): BO memory allocation layout:
(II) intel(0): 0x0077f000:            start of memory manager
(II) intel(0): 0x0077f000-0x012fafff: depth buffer (11760 kB) Y tiled
(II) intel(0): 0x012fb000-0x01e76fff: back buffer (11760 kB) X tiled
(II) intel(0): 0x01f00000-0x02a7bfff: front buffer (11760 kB) X tiled
(II) intel(0): 0x02a7c000-0x02a7cfff: overlay registers (4 kB)
(II) intel(0): 0x02a7d000-0x02a8cfff: exa G965 state buffer (64 kB)
(II) intel(0): 0x02a8d000-0x02a94fff: logical 3D context (32 kB)
(II) intel(0): 0x02a95000-0x02a9efff: HW cursors (40 kB)
(II) intel(0): 0x0bd8c000:            end of memory manager


So there is the xv buffer as an addition in the bad one. It looks like Xserver does not handle front buffer relocation correctly?

Also there is serious memory corruption resulted from this, see the attached dmesg.
Comment 15 Lukas Hejtmanek 2008-03-20 01:24:27 UTC
Created attachment 15329 [details]
memory corruption output.
Comment 16 Jesse Barnes 2008-03-21 09:28:26 UTC
Yeah, it looks like movement isn't handled properly with the new TTM bits.  Could be a DRM, 2D or server problem...
Comment 17 Jesse Barnes 2008-06-20 10:28:31 UTC
I've been sitting on this because the TTM & mode setting stuff has been in so much flux.  Now we're moving to a new memory manager, so I think we can safely mark this as wontfix...


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.