Bug 26745

Summary: mach64 driver missing 32-bit ioctl compatibility routines
Product: DRI Reporter: matt m <matt__m>
Component: libdrmAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: XOrg git   
Hardware: SPARC   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.log showing issue with mach64 dri on 64bit sparc kernel / 32bit userland none

Description matt m 2010-02-24 20:09:44 UTC
Created attachment 33548 [details]
Xorg.log showing issue with mach64 dri on 64bit sparc kernel / 32bit userland

i've run into some issues trying to get dri going using mach64.ko and drm.ko from libdrm-2.4.14 and 2.4.15.

hardware versions:
sunblade 2000, 2x ultrasparc 1.05ghz
ati pgx64 graphics (pci bus id: 1002:4752)

software versions:
kernel 2.6.32.8, 64-bit sparc64 (gentoo)
xorg server 1.6.5, 32bit
xf86-video-mach64 6.8.2 32bit
libdrm 2.4.15 32bit
mesa 7.5.2 32bit

libdrm kernel module builds and loads using sparc64 gcc version 4.3.4

any attempt to use the interface provided via /dev/dri/card0 results in:
[92201.864512] [drm] Initialized drm 1.1.0 20060810
[92203.149358] [drm] Initialized mach64 2.0.0 20060718 on minor 0
[92203.149394] [drm] Used old pci detect: framebuffer loaded
[92220.481429] ioctl32(X:20584): Unknown cmd fd(6) cmd(c0246400){t:'d';sz:36} arg(001ec180) on /dev/dri/card0
[92220.481627] ioctl32(X:20584): Unknown cmd fd(6) cmd(c0246400){t:'d';sz:36} arg(001ec180) on /dev/dri/card0
[92220.486733] ioctl32(X:20584): Unknown cmd fd(6) cmd(c0106407){t:'d';sz:16} arg(ffe37378) on /dev/dri/card0
[92220.486759] ioctl32(X:20584): Unknown cmd fd(6) cmd(c0086401){t:'d';sz:8} arg(ffe37380) on /dev/dri/card0
[93697.163487] ioctl32(drmstat:20956): Unknown cmd fd(3) cmd(c0246400){t:'d';sz:36} arg(00026008) on /dev/dri/card0
[93697.163608] ioctl32(drmstat:20956): Unknown cmd fd(3) cmd(c0106407){t:'d';sz:16} arg(ff9e6d00) on /dev/dri/card0
[93697.163630] ioctl32(drmstat:20956): Unknown cmd fd(3) cmd(c0086401){t:'d';sz:8} arg(ff9e6d08) on /dev/dri/card0

also attached is an Xorg.log displaying the issue.

the card's (PGX64) pci bus id (is listed in libdrm's shared-core/drm_pciids.txt under the mach64 driver: 0x1002 0x4752 0 "Rage XL"

i've spotted a couple other bugs related to using these drivers with 64bit kernel and 32bit userland:
http://bugs.freedesktop.org/show_bug.cgi?id=22271
http://bugs.freedesktop.org/show_bug.cgi?id=23816

most of the other modules have been adjusted, using something like: '.compat_ioctl = radeon_compat_ioctl' and radeon_ioc32.c, though this is missing for the mach64 module.

sparc/linux has very few options for graphics, and it seems like fixing this driver's ioctl32 compatibility could help a couple other archs as well.

thanks for your consideration,
-matt
Comment 1 Adam Jackson 2019-05-29 17:20:08 UTC
This is probably still true, but we haven't had a mach64 driver in 7+ years.

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.