diff options
author | Eric Anholt <eric@anholt.net> | 2007-09-02 22:06:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-14 20:38:20 -0400 |
commit | c153f45f9b7e30289157bba3ff5682291df16caa (patch) | |
tree | 33f21e1ebd83ec548751f3d490afe6230ab99972 /drivers/char/drm/drmP.h | |
parent | b589ee5943a9610ebaea6e4e3433f2ae4d812b0b (diff) |
drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to t
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures. This also means that XFree86 4.2.0 support for i810 DR
is lost.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 219 |
1 files changed, 114 insertions, 105 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 9c53b8883139..9dd0760dd87a 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -34,8 +34,6 @@ | |||
34 | #ifndef _DRM_P_H_ | 34 | #ifndef _DRM_P_H_ |
35 | #define _DRM_P_H_ | 35 | #define _DRM_P_H_ |
36 | 36 | ||
37 | struct drm_file; | ||
38 | |||
39 | /* If you want the memory alloc debug functionality, change define below */ | 37 | /* If you want the memory alloc debug functionality, change define below */ |
40 | /* #define DEBUG_MEMORY */ | 38 | /* #define DEBUG_MEMORY */ |
41 | 39 | ||
@@ -82,6 +80,9 @@ struct drm_file; | |||
82 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) | 80 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) |
83 | #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) | 81 | #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) |
84 | 82 | ||
83 | struct drm_file; | ||
84 | struct drm_device; | ||
85 | |||
85 | #include "drm_os_linux.h" | 86 | #include "drm_os_linux.h" |
86 | #include "drm_hashtab.h" | 87 | #include "drm_hashtab.h" |
87 | 88 | ||
@@ -233,12 +234,13 @@ struct drm_file; | |||
233 | * \param dev DRM device. | 234 | * \param dev DRM device. |
234 | * \param filp file pointer of the caller. | 235 | * \param filp file pointer of the caller. |
235 | */ | 236 | */ |
236 | #define LOCK_TEST_WITH_RETURN( dev, filp ) \ | 237 | #define LOCK_TEST_WITH_RETURN( dev, file_priv ) \ |
237 | do { \ | 238 | do { \ |
238 | if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ | 239 | if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ |
239 | dev->lock.filp != filp ) { \ | 240 | dev->lock.file_priv != file_priv ) { \ |
240 | DRM_ERROR( "%s called without lock held\n", \ | 241 | DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\ |
241 | __FUNCTION__ ); \ | 242 | __FUNCTION__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\ |
243 | dev->lock.file_priv, file_priv ); \ | ||
242 | return -EINVAL; \ | 244 | return -EINVAL; \ |
243 | } \ | 245 | } \ |
244 | } while (0) | 246 | } while (0) |
@@ -263,8 +265,8 @@ do { \ | |||
263 | * \param cmd command. | 265 | * \param cmd command. |
264 | * \param arg argument. | 266 | * \param arg argument. |
265 | */ | 267 | */ |
266 | typedef int drm_ioctl_t(struct inode *inode, struct drm_file *file_priv, | 268 | typedef int drm_ioctl_t(struct drm_device *dev, void *data, |
267 | unsigned int cmd, unsigned long arg); | 269 | struct drm_file *file_priv); |
268 | 270 | ||
269 | typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd, | 271 | typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd, |
270 | unsigned long arg); | 272 | unsigned long arg); |
@@ -273,10 +275,18 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd, | |||
273 | #define DRM_MASTER 0x2 | 275 | #define DRM_MASTER 0x2 |
274 | #define DRM_ROOT_ONLY 0x4 | 276 | #define DRM_ROOT_ONLY 0x4 |
275 | 277 | ||
276 | typedef struct drm_ioctl_desc { | 278 | struct drm_ioctl_desc { |
279 | unsigned int cmd; | ||
277 | drm_ioctl_t *func; | 280 | drm_ioctl_t *func; |
278 | int flags; | 281 | int flags; |
279 | } drm_ioctl_desc_t; | 282 | }; |
283 | |||
284 | /** | ||
285 | * Creates a driver or general drm_ioctl_desc array entry for the given | ||
286 | * ioctl, for use by drm_ioctl(). | ||
287 | */ | ||
288 | #define DRM_IOCTL_DEF(ioctl, func, flags) \ | ||
289 | [DRM_IOCTL_NR(ioctl)] = {ioctl, func, flags} | ||
280 | 290 | ||
281 | struct drm_magic_entry { | 291 | struct drm_magic_entry { |
282 | struct list_head head; | 292 | struct list_head head; |
@@ -559,7 +569,7 @@ struct drm_driver { | |||
559 | void (*postclose) (struct drm_device *, struct drm_file *); | 569 | void (*postclose) (struct drm_device *, struct drm_file *); |
560 | void (*lastclose) (struct drm_device *); | 570 | void (*lastclose) (struct drm_device *); |
561 | int (*unload) (struct drm_device *); | 571 | int (*unload) (struct drm_device *); |
562 | int (*dma_ioctl) (DRM_IOCTL_ARGS); | 572 | int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); |
563 | void (*dma_ready) (struct drm_device *); | 573 | void (*dma_ready) (struct drm_device *); |
564 | int (*dma_quiescent) (struct drm_device *); | 574 | int (*dma_quiescent) (struct drm_device *); |
565 | int (*context_ctor) (struct drm_device *dev, int context); | 575 | int (*context_ctor) (struct drm_device *dev, int context); |
@@ -610,7 +620,7 @@ struct drm_driver { | |||
610 | 620 | ||
611 | u32 driver_features; | 621 | u32 driver_features; |
612 | int dev_priv_size; | 622 | int dev_priv_size; |
613 | drm_ioctl_desc_t *ioctls; | 623 | struct drm_ioctl_desc *ioctls; |
614 | int num_ioctls; | 624 | int num_ioctls; |
615 | struct file_operations fops; | 625 | struct file_operations fops; |
616 | struct pci_driver pci_driver; | 626 | struct pci_driver pci_driver; |
@@ -854,70 +864,70 @@ extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); | |||
854 | extern int drm_unbind_agp(DRM_AGP_MEM * handle); | 864 | extern int drm_unbind_agp(DRM_AGP_MEM * handle); |
855 | 865 | ||
856 | /* Misc. IOCTL support (drm_ioctl.h) */ | 866 | /* Misc. IOCTL support (drm_ioctl.h) */ |
857 | extern int drm_irq_by_busid(struct inode *inode, struct drm_file *file_priv, | 867 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, |
858 | unsigned int cmd, unsigned long arg); | 868 | struct drm_file *file_priv); |
859 | extern int drm_getunique(struct inode *inode, struct drm_file *file_priv, | 869 | extern int drm_getunique(struct drm_device *dev, void *data, |
860 | unsigned int cmd, unsigned long arg); | 870 | struct drm_file *file_priv); |
861 | extern int drm_setunique(struct inode *inode, struct drm_file *file_priv, | 871 | extern int drm_setunique(struct drm_device *dev, void *data, |
862 | unsigned int cmd, unsigned long arg); | 872 | struct drm_file *file_priv); |
863 | extern int drm_getmap(struct inode *inode, struct drm_file *file_priv, | 873 | extern int drm_getmap(struct drm_device *dev, void *data, |
864 | unsigned int cmd, unsigned long arg); | 874 | struct drm_file *file_priv); |
865 | extern int drm_getclient(struct inode *inode, struct drm_file *file_priv, | 875 | extern int drm_getclient(struct drm_device *dev, void *data, |
866 | unsigned int cmd, unsigned long arg); | 876 | struct drm_file *file_priv); |
867 | extern int drm_getstats(struct inode *inode, struct drm_file *file_priv, | 877 | extern int drm_getstats(struct drm_device *dev, void *data, |
868 | unsigned int cmd, unsigned long arg); | 878 | struct drm_file *file_priv); |
869 | extern int drm_setversion(struct inode *inode, struct drm_file *file_priv, | 879 | extern int drm_setversion(struct drm_device *dev, void *data, |
870 | unsigned int cmd, unsigned long arg); | 880 | struct drm_file *file_priv); |
871 | extern int drm_noop(struct inode *inode, struct drm_file *file_priv, | 881 | extern int drm_noop(struct drm_device *dev, void *data, |
872 | unsigned int cmd, unsigned long arg); | 882 | struct drm_file *file_priv); |
873 | 883 | ||
874 | /* Context IOCTL support (drm_context.h) */ | 884 | /* Context IOCTL support (drm_context.h) */ |
875 | extern int drm_resctx(struct inode *inode, struct drm_file *file_priv, | 885 | extern int drm_resctx(struct drm_device *dev, void *data, |
876 | unsigned int cmd, unsigned long arg); | 886 | struct drm_file *file_priv); |
877 | extern int drm_addctx(struct inode *inode, struct drm_file *file_priv, | 887 | extern int drm_addctx(struct drm_device *dev, void *data, |
878 | unsigned int cmd, unsigned long arg); | 888 | struct drm_file *file_priv); |
879 | extern int drm_modctx(struct inode *inode, struct drm_file *file_priv, | 889 | extern int drm_modctx(struct drm_device *dev, void *data, |
880 | unsigned int cmd, unsigned long arg); | 890 | struct drm_file *file_priv); |
881 | extern int drm_getctx(struct inode *inode, struct drm_file *file_priv, | 891 | extern int drm_getctx(struct drm_device *dev, void *data, |
882 | unsigned int cmd, unsigned long arg); | 892 | struct drm_file *file_priv); |
883 | extern int drm_switchctx(struct inode *inode, struct drm_file *file_priv, | 893 | extern int drm_switchctx(struct drm_device *dev, void *data, |
884 | unsigned int cmd, unsigned long arg); | 894 | struct drm_file *file_priv); |
885 | extern int drm_newctx(struct inode *inode, struct drm_file *file_priv, | 895 | extern int drm_newctx(struct drm_device *dev, void *data, |
886 | unsigned int cmd, unsigned long arg); | 896 | struct drm_file *file_priv); |
887 | extern int drm_rmctx(struct inode *inode, struct drm_file *file_priv, | 897 | extern int drm_rmctx(struct drm_device *dev, void *data, |
888 | unsigned int cmd, unsigned long arg); | 898 | struct drm_file *file_priv); |
889 | 899 | ||
890 | extern int drm_ctxbitmap_init(struct drm_device *dev); | 900 | extern int drm_ctxbitmap_init(struct drm_device *dev); |
891 | extern void drm_ctxbitmap_cleanup(struct drm_device *dev); | 901 | extern void drm_ctxbitmap_cleanup(struct drm_device *dev); |
892 | extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle); | 902 | extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle); |
893 | 903 | ||
894 | extern int drm_setsareactx(struct inode *inode, struct drm_file *file_priv, | 904 | extern int drm_setsareactx(struct drm_device *dev, void *data, |
895 | unsigned int cmd, unsigned long arg); | 905 | struct drm_file *file_priv); |
896 | extern int drm_getsareactx(struct inode *inode, struct drm_file *file_priv, | 906 | extern int drm_getsareactx(struct drm_device *dev, void *data, |
897 | unsigned int cmd, unsigned long arg); | 907 | struct drm_file *file_priv); |
898 | 908 | ||
899 | /* Drawable IOCTL support (drm_drawable.h) */ | 909 | /* Drawable IOCTL support (drm_drawable.h) */ |
900 | extern int drm_adddraw(struct inode *inode, struct drm_file *file_priv, | 910 | extern int drm_adddraw(struct drm_device *dev, void *data, |
901 | unsigned int cmd, unsigned long arg); | 911 | struct drm_file *file_priv); |
902 | extern int drm_rmdraw(struct inode *inode, struct drm_file *file_priv, | 912 | extern int drm_rmdraw(struct drm_device *dev, void *data, |
903 | unsigned int cmd, unsigned long arg); | 913 | struct drm_file *file_priv); |
904 | extern int drm_update_drawable_info(struct inode *inode, struct drm_file *file_priv, | 914 | extern int drm_update_drawable_info(struct drm_device *dev, void *data, |
905 | unsigned int cmd, unsigned long arg); | 915 | struct drm_file *file_priv); |
906 | extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, | 916 | extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, |
907 | drm_drawable_t id); | 917 | drm_drawable_t id); |
908 | extern void drm_drawable_free_all(struct drm_device *dev); | 918 | extern void drm_drawable_free_all(struct drm_device *dev); |
909 | 919 | ||
910 | /* Authentication IOCTL support (drm_auth.h) */ | 920 | /* Authentication IOCTL support (drm_auth.h) */ |
911 | extern int drm_getmagic(struct inode *inode, struct drm_file *file_priv, | 921 | extern int drm_getmagic(struct drm_device *dev, void *data, |
912 | unsigned int cmd, unsigned long arg); | 922 | struct drm_file *file_priv); |
913 | extern int drm_authmagic(struct inode *inode, struct drm_file *file_priv, | 923 | extern int drm_authmagic(struct drm_device *dev, void *data, |
914 | unsigned int cmd, unsigned long arg); | 924 | struct drm_file *file_priv); |
915 | 925 | ||
916 | /* Locking IOCTL support (drm_lock.h) */ | 926 | /* Locking IOCTL support (drm_lock.h) */ |
917 | extern int drm_lock(struct inode *inode, struct drm_file *file_priv, | 927 | extern int drm_lock(struct drm_device *dev, void *data, |
918 | unsigned int cmd, unsigned long arg); | 928 | struct drm_file *file_priv); |
919 | extern int drm_unlock(struct inode *inode, struct drm_file *file_priv, | 929 | extern int drm_unlock(struct drm_device *dev, void *data, |
920 | unsigned int cmd, unsigned long arg); | 930 | struct drm_file *file_priv); |
921 | extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); | 931 | extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context); |
922 | extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context); | 932 | extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context); |
923 | extern void drm_idlelock_take(struct drm_lock_data *lock_data); | 933 | extern void drm_idlelock_take(struct drm_lock_data *lock_data); |
@@ -928,7 +938,7 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data); | |||
928 | * DMA quiscent + idle. DMA quiescent usually requires the hardware lock. | 938 | * DMA quiscent + idle. DMA quiescent usually requires the hardware lock. |
929 | */ | 939 | */ |
930 | 940 | ||
931 | extern int drm_i_have_hw_lock(struct drm_file *file_priv); | 941 | extern int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv); |
932 | 942 | ||
933 | /* Buffer management support (drm_bufs.h) */ | 943 | /* Buffer management support (drm_bufs.h) */ |
934 | extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request); | 944 | extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request); |
@@ -936,24 +946,23 @@ extern int drm_addbufs_pci(struct drm_device *dev, struct drm_buf_desc * request | |||
936 | extern int drm_addmap(struct drm_device *dev, unsigned int offset, | 946 | extern int drm_addmap(struct drm_device *dev, unsigned int offset, |
937 | unsigned int size, enum drm_map_type type, | 947 | unsigned int size, enum drm_map_type type, |
938 | enum drm_map_flags flags, drm_local_map_t ** map_ptr); | 948 | enum drm_map_flags flags, drm_local_map_t ** map_ptr); |
939 | extern int drm_addmap_ioctl(struct inode *inode, struct drm_file *file_priv, | 949 | extern int drm_addmap_ioctl(struct drm_device *dev, void *data, |
940 | unsigned int cmd, unsigned long arg); | 950 | struct drm_file *file_priv); |
941 | extern int drm_rmmap(struct drm_device *dev, drm_local_map_t * map); | 951 | extern int drm_rmmap(struct drm_device *dev, drm_local_map_t *map); |
942 | extern int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t * map); | 952 | extern int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map); |
943 | extern int drm_rmmap_ioctl(struct inode *inode, struct drm_file *file_priv, | 953 | extern int drm_rmmap_ioctl(struct drm_device *dev, void *data, |
944 | unsigned int cmd, unsigned long arg); | 954 | struct drm_file *file_priv); |
945 | 955 | extern int drm_addbufs(struct drm_device *dev, void *data, | |
956 | struct drm_file *file_priv); | ||
957 | extern int drm_infobufs(struct drm_device *dev, void *data, | ||
958 | struct drm_file *file_priv); | ||
959 | extern int drm_markbufs(struct drm_device *dev, void *data, | ||
960 | struct drm_file *file_priv); | ||
961 | extern int drm_freebufs(struct drm_device *dev, void *data, | ||
962 | struct drm_file *file_priv); | ||
963 | extern int drm_mapbufs(struct drm_device *dev, void *data, | ||
964 | struct drm_file *file_priv); | ||
946 | extern int drm_order(unsigned long size); | 965 | extern int drm_order(unsigned long size); |
947 | extern int drm_addbufs(struct inode *inode, struct drm_file *file_priv, | ||
948 | unsigned int cmd, unsigned long arg); | ||
949 | extern int drm_infobufs(struct inode *inode, struct drm_file *file_priv, | ||
950 | unsigned int cmd, unsigned long arg); | ||
951 | extern int drm_markbufs(struct inode *inode, struct drm_file *file_priv, | ||
952 | unsigned int cmd, unsigned long arg); | ||
953 | extern int drm_freebufs(struct inode *inode, struct drm_file *file_priv, | ||
954 | unsigned int cmd, unsigned long arg); | ||
955 | extern int drm_mapbufs(struct inode *inode, struct drm_file *file_priv, | ||
956 | unsigned int cmd, unsigned long arg); | ||
957 | extern unsigned long drm_get_resource_start(struct drm_device *dev, | 966 | extern unsigned long drm_get_resource_start(struct drm_device *dev, |
958 | unsigned int resource); | 967 | unsigned int resource); |
959 | extern unsigned long drm_get_resource_len(struct drm_device *dev, | 968 | extern unsigned long drm_get_resource_len(struct drm_device *dev, |
@@ -967,16 +976,16 @@ extern void drm_core_reclaim_buffers(struct drm_device *dev, | |||
967 | struct drm_file *filp); | 976 | struct drm_file *filp); |
968 | 977 | ||
969 | /* IRQ support (drm_irq.h) */ | 978 | /* IRQ support (drm_irq.h) */ |
970 | extern int drm_control(struct inode *inode, struct drm_file *file_priv, | 979 | extern int drm_control(struct drm_device *dev, void *data, |
971 | unsigned int cmd, unsigned long arg); | 980 | struct drm_file *file_priv); |
972 | extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); | 981 | extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); |
973 | extern int drm_irq_uninstall(struct drm_device *dev); | 982 | extern int drm_irq_uninstall(struct drm_device *dev); |
974 | extern void drm_driver_irq_preinstall(struct drm_device *dev); | 983 | extern void drm_driver_irq_preinstall(struct drm_device *dev); |
975 | extern void drm_driver_irq_postinstall(struct drm_device *dev); | 984 | extern void drm_driver_irq_postinstall(struct drm_device *dev); |
976 | extern void drm_driver_irq_uninstall(struct drm_device *dev); | 985 | extern void drm_driver_irq_uninstall(struct drm_device *dev); |
977 | 986 | ||
978 | extern int drm_wait_vblank(struct inode *inode, struct drm_file *file_priv, | 987 | extern int drm_wait_vblank(struct drm_device *dev, void *data, |
979 | unsigned int cmd, unsigned long arg); | 988 | struct drm_file *file_priv); |
980 | extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); | 989 | extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); |
981 | extern void drm_vbl_send_signals(struct drm_device *dev); | 990 | extern void drm_vbl_send_signals(struct drm_device *dev); |
982 | extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); | 991 | extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); |
@@ -984,31 +993,30 @@ extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_de | |||
984 | /* AGP/GART support (drm_agpsupport.h) */ | 993 | /* AGP/GART support (drm_agpsupport.h) */ |
985 | extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); | 994 | extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); |
986 | extern int drm_agp_acquire(struct drm_device *dev); | 995 | extern int drm_agp_acquire(struct drm_device *dev); |
987 | extern int drm_agp_acquire_ioctl(struct inode *inode, struct drm_file *file_priv, | 996 | extern int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, |
988 | unsigned int cmd, unsigned long arg); | 997 | struct drm_file *file_priv); |
989 | extern int drm_agp_release(struct drm_device *dev); | 998 | extern int drm_agp_release(struct drm_device *dev); |
990 | extern int drm_agp_release_ioctl(struct inode *inode, struct drm_file *file_priv, | 999 | extern int drm_agp_release_ioctl(struct drm_device *dev, void *data, |
991 | unsigned int cmd, unsigned long arg); | 1000 | struct drm_file *file_priv); |
992 | extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode); | 1001 | extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode); |
993 | extern int drm_agp_enable_ioctl(struct inode *inode, struct drm_file *file_priv, | 1002 | extern int drm_agp_enable_ioctl(struct drm_device *dev, void *data, |
994 | unsigned int cmd, unsigned long arg); | 1003 | struct drm_file *file_priv); |
995 | extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info * info); | 1004 | extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info); |
996 | extern int drm_agp_info_ioctl(struct inode *inode, struct drm_file *file_priv, | 1005 | extern int drm_agp_info_ioctl(struct drm_device *dev, void *data, |
997 | unsigned int cmd, unsigned long arg); | 1006 | struct drm_file *file_priv); |
998 | extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request); | 1007 | extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request); |
999 | extern int drm_agp_alloc_ioctl(struct inode *inode, struct drm_file *file_priv, | 1008 | extern int drm_agp_alloc_ioctl(struct drm_device *dev, void *data, |
1000 | unsigned int cmd, unsigned long arg); | 1009 | struct drm_file *file_priv); |
1001 | extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request); | 1010 | extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request); |
1002 | extern int drm_agp_free_ioctl(struct inode *inode, struct drm_file *file_priv, | 1011 | extern int drm_agp_free_ioctl(struct drm_device *dev, void *data, |
1003 | unsigned int cmd, unsigned long arg); | 1012 | struct drm_file *file_priv); |
1004 | extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request); | 1013 | extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request); |
1005 | extern int drm_agp_unbind_ioctl(struct inode *inode, struct drm_file *file_priv, | 1014 | extern int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, |
1006 | unsigned int cmd, unsigned long arg); | 1015 | struct drm_file *file_priv); |
1007 | extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); | 1016 | extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); |
1008 | extern int drm_agp_bind_ioctl(struct inode *inode, struct drm_file *file_priv, | 1017 | extern int drm_agp_bind_ioctl(struct drm_device *dev, void *data, |
1009 | unsigned int cmd, unsigned long arg); | 1018 | struct drm_file *file_priv); |
1010 | extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, | 1019 | extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size_t pages, u32 type); |
1011 | size_t pages, u32 type); | ||
1012 | extern int drm_agp_free_memory(DRM_AGP_MEM * handle); | 1020 | extern int drm_agp_free_memory(DRM_AGP_MEM * handle); |
1013 | extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start); | 1021 | extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start); |
1014 | extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle); | 1022 | extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle); |
@@ -1037,10 +1045,11 @@ extern int drm_proc_cleanup(int minor, | |||
1037 | 1045 | ||
1038 | /* Scatter Gather Support (drm_scatter.h) */ | 1046 | /* Scatter Gather Support (drm_scatter.h) */ |
1039 | extern void drm_sg_cleanup(struct drm_sg_mem * entry); | 1047 | extern void drm_sg_cleanup(struct drm_sg_mem * entry); |
1040 | extern int drm_sg_alloc(struct inode *inode, struct drm_file *file_priv, | 1048 | extern int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, |
1041 | unsigned int cmd, unsigned long arg); | 1049 | struct drm_file *file_priv); |
1042 | extern int drm_sg_free(struct inode *inode, struct drm_file *file_priv, | 1050 | extern int drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather * request); |
1043 | unsigned int cmd, unsigned long arg); | 1051 | extern int drm_sg_free(struct drm_device *dev, void *data, |
1052 | struct drm_file *file_priv); | ||
1044 | 1053 | ||
1045 | /* ATI PCIGART support (ati_pcigart.h) */ | 1054 | /* ATI PCIGART support (ati_pcigart.h) */ |
1046 | extern int drm_ati_pcigart_init(struct drm_device *dev, | 1055 | extern int drm_ati_pcigart_init(struct drm_device *dev, |