Bug 11682

Summary: Nouveau DDX cannot get DRM version
Product: DRI Reporter: Pekka Paalanen <ppaalanen>
Component: DRM/otherAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: DRI git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log with no DRM version error
none
build fix for linux modules
none
Bug fixes none

Description Pekka Paalanen 2007-07-21 03:02:24 UTC
After the recent large patches by Eric Anholt, the Nouveau DDX cannot get the DRM version and X fails to start. Xorg log will be attached.

git-bisect lead me to two commits:
c1119b1b092527fbb6950d0b5e51e076ddb00f29 Replace filp in ioctl arguments with drm_file *file_priv.
5b38e134163cc375e91424c4688cc9328c6e9082 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.

Neither of these commits compile. For the last one I made a fix (will be attached), then it compiles, and X fails to start as described.

I have Xorg server 1.3, and xf86-video-nouveau and DRM from git master. Gentoo, amd64, kernel 2.6.20-gentoo.
Comment 1 Pekka Paalanen 2007-07-21 03:05:00 UTC
Created attachment 10828 [details]
Xorg log with no DRM version error
Comment 2 Pekka Paalanen 2007-07-21 03:06:51 UTC
Created attachment 10829 [details] [review]
build fix for linux modules

I can push this patch myself, if it is deemed correct.
Comment 3 Pekka Paalanen 2007-07-21 08:15:28 UTC
Created attachment 10830 [details] [review]
Bug fixes

airlied fixed a couple of bugs. This here is my patch that fixes the rest of the bugs that prevented Nouveau from working. Again, I can push this myself, if someone gives me the green light.

One thing is that (ioctl->cmd != cmd) check in drm_ioctl(), which I fixed so that DRM core ioctls and driver private ioctls have their own checks. This is because ioctl->cmd includes the direction bits and stuff for the core ioctls, but not for the driver private ioctls. And then there's the issue with DRM_COMMAND_BASE.
Comment 4 Pekka Paalanen 2007-07-21 13:30:44 UTC
Ok, I talked with Anholt and pushed some fixes. Should work now, at least for Nouveau. The ioctl->cmd check was just disabled for now, all drivers need fixing, not the check.

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.