1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 2.6.36-ioctl.dpatch by <luca@tower>
4 ## All lines beginning with `## DP:' are a description of the patch.
8 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~
/drmP.h psb-kernel-source
/drmP.h
9 --- psb-kernel-source~
/drmP.h
2010-10-26 21:26:02.400681105 +0200
10 +++ psb-kernel-source
/drmP.h
2010-10-26 21:27:28.636681105 +0200
12 struct pci_device_id
*pciidlist
);
13 extern void psb_drm_exit
(struct drm_driver
*driver
);
14 extern void psb_drm_cleanup_pci
(struct pci_dev
*pdev
);
15 -extern int psb_drm_ioctl
(struct inode
*inode
, struct
file *filp
,
16 +extern long psb_drm_ioctl
(struct
file *filp
,
17 unsigned int cmd
, unsigned long arg
);
18 extern long psb_drm_unlocked_ioctl
(struct
file *filp
,
19 unsigned int cmd
, unsigned long arg
);
20 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~
/drm_drv.c psb-kernel-source
/drm_drv.c
21 --- psb-kernel-source~
/drm_drv.c
2010-10-26 21:26:02.388681105 +0200
22 +++ psb-kernel-source
/drm_drv.c
2010-10-26 21:26:40.996681104 +0200
24 * byte stack buffer to store the ioctl arguments
in kernel space. Should we
25 * ever need much larger ioctl arguments
, we may need to allocate memory.
27 -int psb_drm_ioctl
(struct inode
*inode
, struct
file *filp
,
28 +long psb_drm_ioctl
(struct
file *filp
,
29 unsigned int cmd
, unsigned long arg
)
31 return psb_drm_unlocked_ioctl
(filp
, cmd
, arg
);
32 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~
/i915_drv.c psb-kernel-source
/i915_drv.c
33 --- psb-kernel-source~
/i915_drv.c
2010-10-26 21:26:02.404681105 +0200
34 +++ psb-kernel-source
/i915_drv.c
2010-10-26 21:28:02.252681105 +0200
38 .release
= psb_drm_release
,
39 - .ioctl
= psb_drm_ioctl
,
40 + .unlocked_ioctl
= psb_drm_ioctl
,
43 .fasync
= psb_drm_fasync
,
44 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~
/i915_ioc32.c psb-kernel-source
/i915_ioc32.c
45 --- psb-kernel-source~
/i915_ioc32.c
2010-10-26 21:26:02.408681105 +0200
46 +++ psb-kernel-source
/i915_ioc32.c
2010-10-26 21:29:01.392681108 +0200
48 &batchbuffer-
>cliprects
))
51 - return psb_drm_ioctl
(file-
>f_dentry-
>d_inode
, file,
52 + return psb_drm_ioctl
(file,
53 DRM_IOCTL_I915_BATCHBUFFER
,
54 (unsigned long
) batchbuffer
);
57 &cmdbuffer-
>cliprects
))
60 - return psb_drm_ioctl
(file-
>f_dentry-
>d_inode
, file,
61 + return psb_drm_ioctl
(file,
62 DRM_IOCTL_I915_CMDBUFFER
, (unsigned long
) cmdbuffer
);
69 - return psb_drm_ioctl
(file-
>f_dentry-
>d_inode
, file,
70 + return psb_drm_ioctl
(file,
71 DRM_IOCTL_I915_IRQ_EMIT
, (unsigned long
) request
);
73 typedef struct drm_i915_getparam32
{
78 - return psb_drm_ioctl
(file-
>f_dentry-
>d_inode
, file,
79 + return psb_drm_ioctl
(file,
80 DRM_IOCTL_I915_GETPARAM
, (unsigned long
) request
);
84 &request-
>region_offset
))
87 - return psb_drm_ioctl
(file-
>f_dentry-
>d_inode
, file,
88 + return psb_drm_ioctl
(file,
89 DRM_IOCTL_I915_ALLOC
, (unsigned long
) request
);
94 ret
= (*fn
)(filp
, cmd
, arg
);
96 - ret
= psb_drm_ioctl
(filp-
>f_dentry-
>d_inode
, filp
, cmd
, arg
);
97 + ret
= psb_drm_ioctl
(filp
, cmd
, arg
);
101 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~
/psb_drv.c psb-kernel-source
/psb_drv.c
102 --- psb-kernel-source~
/psb_drv.c
2010-10-26 21:26:02.460681105 +0200
103 +++ psb-kernel-source
/psb_drv.c
2010-10-26 21:29:42.792681105 +0200
105 .owner
= THIS_MODULE
,
106 .open
= psb_drm_open
,
107 .release
= psb_release
,
108 - .ioctl
= psb_drm_ioctl
,
109 + .unlocked_ioctl
= psb_drm_ioctl
,
110 .mmap
= psb_drm_mmap
,
112 .fasync
= psb_drm_fasync
,