Bug 24301 - Corruption using texture_from_pixmap with r600
Summary: Corruption using texture_from_pixmap with r600
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-04 01:41 UTC by Thomas
Modified: 2009-10-07 14:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Corruptions around windows. (264.11 KB, image/png)
2009-10-04 01:41 UTC, Thomas
no flags Details
Corruptions within neverball (124.21 KB, image/png)
2009-10-04 05:42 UTC, Thomas
no flags Details
Xorg.0.log file (39.08 KB, text/plain)
2009-10-05 08:00 UTC, Thomas
no flags Details
dmesg of my system (35.58 KB, text/plain)
2009-10-05 08:01 UTC, Thomas
no flags Details
patch against xf86-video-ati (939 bytes, patch)
2009-10-06 08:51 UTC, Alex Deucher
no flags Details | Splinter Review
patch for drm-next (5.20 KB, patch)
2009-10-06 10:51 UTC, Alex Deucher
no flags Details | Splinter Review
generic patch for xf86-video-ati (757 bytes, patch)
2009-10-06 14:45 UTC, Alex Deucher
no flags Details | Splinter Review

Description Thomas 2009-10-04 01:41:05 UTC
Created attachment 30033 [details]
Corruptions around windows.

Hello

I get corruptions around windows and some text, when using composite in kde 4, with the mode, texture from pixmap (See attachment).

My dmesg is spammed with:
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset

It happens in a non-kms / dri1 environment.

Some version infos:
dri2proto-git 20091002-1
glproto-git 20091002-1
kernel26-drm-next 20091003-1
libdrm-git 20091002-1
libgl-git 20091002-1
libgphoto2 2.4.6-2.
mesa-git 20091003-1
xf86-video-ati-git 20091004-1

I get nothing unusual in my Xorg.0.log.

Thx for this great driver.
Comment 1 Thomas 2009-10-04 05:42:58 UTC
Created attachment 30034 [details]
Corruptions within neverball

I even get corruptions in 3d applications. See attachement, for a picture of neverball.

When I start the 3d-app, as I said before, I get alot of spam in dmesg:
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset

This bug also concern opengl wine applications.
Comment 2 Thomas 2009-10-04 05:54:15 UTC
I just updated today, so I could get the git strings for you.
Today (04/10-09), the git versions which contain this bug, have thiese git strings:

dri2proto-git 66c56ab10d917e3f47f93178d7eac6430970d3c4
glproto-git 2f13449c987e3d58555e030f887736d67e2fe62d
kernel26-drm-next f0ed1f655aa0375e2abba84cc4e8e6c853d48555
libdrm-git ac34f599eabcfc414d4d3300063988d4749813f4
libgl-git f194d2737b059cf6b99caa18f8ec2d46a55ada88
libgphoto2 2.4.6
mesa-git f194d2737b059cf6b99caa18f8ec2d46a55ada88
xf86-video-ati-git 7968e1fb89f6b59d1654df48249bf4b81990c008


thx again
Comment 3 Alex Deucher 2009-10-05 07:57:22 UTC
The drm is not actually copying the texture because userspace is giving it bogus addresses.  Can you attach your xorg log and dmesg?
Comment 4 Thomas 2009-10-05 08:00:38 UTC
Created attachment 30081 [details]
Xorg.0.log file
Comment 5 Thomas 2009-10-05 08:01:26 UTC
Created attachment 30083 [details]
dmesg of my system
Comment 6 Thomas 2009-10-05 10:20:17 UTC
I have written out the tex values

[drm:r600_cp_dispatch_texture] *ERROR* Invalid destination offset
[drm] tex->offset, tex->height, tex->pitch
[drm] 0xe2ac2000, 0x00000001, 0x00040000
Comment 7 Alex Deucher 2009-10-06 08:33:12 UTC
does it work ok with my drm tree?  First back up your existing drm modules (drm.ko, radeon.ko) from 
/lib/modules/`uname -r`/kernel/drivers/gpu/drm/ and
/lib/modules/`uname -r`/kernel/drivers/gpu/drm/radeon
then:
git clone git://anongit.freedesktop.org/~agd5f/drm
cd drm
git checkout -b r6xx-r7xx-3d origin/r6xx-r7xx-3d
cd linux-core
make drm.o radeon.o
cp drm.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/
cp radeon.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/radeon
Comment 8 Alex Deucher 2009-10-06 08:51:32 UTC
Created attachment 30112 [details] [review]
patch against xf86-video-ati

Can you try this patch against the ddx (xf86-video-ati)?
Comment 9 Thomas 2009-10-06 10:13:00 UTC
Your patch worked :-)
Comment 10 Alex Deucher 2009-10-06 10:51:23 UTC
Created attachment 30115 [details] [review]
patch for drm-next

Does the attached drm patch also fix the issue (in place of the ddx patch)?
Comment 11 Thomas 2009-10-06 12:36:37 UTC
With the latest patch for drm-next instead of the ddx patch, the issue is back.
For now the ddx patch is the only solution.
Comment 12 Alex Deucher 2009-10-06 14:45:13 UTC
Created attachment 30130 [details] [review]
generic patch for xf86-video-ati

This patch doesn't hardcode the fb size like the previous one.
Comment 13 Thomas 2009-10-07 13:59:21 UTC
The generic patch works fine.
Comment 14 Alex Deucher 2009-10-07 14:07:48 UTC
Pushed to master and stable branch:
5f846360c46f5a989f5d0fde6d251cdbd61d4968


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.