Created attachment 26754 [details] My kernel configuration I'm using jglisse kernel: git://people.freedesktop.org/~glisse/drm-next drm-next-radeon 52c34724734132e7d416ce5ab5e934d702e8f179. For now I have tested only KMS setup. libdrm branch: modesetting-gem 1edb70f1b909d06f1c0ee7c9c794aec99454e488. Bug is reproducible even without X running. Running 32bit version of drmstat: drmstat -v -O /dev/dri/card0: Produces this kernel error: [ 2446.945430] ioctl32(lt-drmstat:14975): Unknown cmd fd(3) cmd(c0246400){t:'d';sz:36} arg(08213008) on /dev/dri/card0 [ 2446.945458] ioctl32(lt-drmstat:14975): Unknown cmd fd(3) cmd(c0106407){t:'d';sz:16} arg(fffab5e0) on /dev/dri/card0 [ 2446.945464] ioctl32(lt-drmstat:14975): Unknown cmd fd(3) cmd(c0086401){t:'d';sz:8} arg(fffab5ec) on /dev/dri/card0 Starting 32bit glxinfo: libGL: OpenDriver: trying /emul/ia32-linux/usr/lib/dri/r300_dri.so libGL error: failed to get magic with kernel error: [ 2694.804332] ioctl32(glxinfo:15042): Unknown cmd fd(4) cmd(80046402){t:'d';sz:4} arg(ff938800) on /dev/dri/card0 I hope this is only error in my kernel configuration.
I have also tested it without KMS(radeon modeset=0) and it worked well. There was no ioctl32 error and 32bit glxinfo showed direct rendering: yes. I think this problem is connected with KMS.
, memory management or something else.
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon X1650 Pro [1002:71c1] (rev 9e)
Same problem on 2.6.31-rc3. Jul 23 14:06:26 localhost kernel: [ 396.992905] ioctl32(ia32-glxinfo:7752): Unknown cmd fd(4) cmd(80046402){t:'d';sz:4} arg(ffb5ba50) on /dev/dri/card0 Jul 23 14:07:01 localhost kernel: [ 431.536462] ioctl32(ia32-glxinfo:7755): Unknown cmd fd(4) cmd(80046402){t:'d';sz:4} arg(fff10340) on /dev/dri/card0
Does setting .compat_ioctl = radeon_compat_ioctl for KMS as well in drivers/gpu/drm/radeon/radeon_drv.c fix the problem?
Setting .compat_ioctl = radeon_compat_ioctl for KMS make 32bit ioctls work. But there is still problem that stops ia32-glxinfo from working. After starting ia32-glxinfo: libGL: OpenDriver: trying /usr/lib32/dri/r300_dri.so drm_radeon_getparam_t (RADEON_PARAM_DEVICE_ID): -14 libGL error: failed to create dri screen [...] In dmesg I only get this: [10664.708003] [drm:radeon_info_ioctl] *ERROR* copy_to_user I will check what drm debug=1 prints. For now I thin that 32bit DRM_RADEON_INFO(radeon_kms.c:radeon_info_ioctl) fails here: " if (DRM_COPY_TO_USER(value_ptr, &value, sizeof(uint32_t))) { DRM_ERROR("copy_to_user\n"); return -EFAULT; } " 64bit one works as excepted.
excepted->expected
Created attachment 28353 [details] Log with drm debug=1 on kernel 2.6.31-rc5 Full log is really long so I post only relevant part. I will post full version if needed.
Created attachment 28354 [details] Config file for kernel 2.6.31-rc5
Mesa commit: c3374bf97ecd82b915fb29c7c04951e2b75d4dbc fixed radeonGetParam problem. I'm still unable to run any 32bit binary that uses opengl. Every time I try to start it I got something like this: " ./fbo_firecube Allocating 512 x 512 radeon RBO (pitch 512) Depth renderbuffer size = 16 bits drmRadeonCmdBuffer: -14 "
For "drmRadeonCmdBuffer: -14" bug I have created separate bug #23626
*** Bug 23816 has been marked as a duplicate of this bug. ***
There was a patch made to libdrm that corrects the drmRadeonCmdBuffer: -14 and setting .compat_ioctl = radeon_compat_ioctl in drm-next completes the fix.
It looks like commit 70ba2a374704e00df8868a7ac3d7350329d28924 in drm-next(drm-2.6) fixed this bug. I will close it, after merging of this commit into main tree.
Commit migrated into main tree. I'm closing this bug.
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.