aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h30
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index b04ddf12a0ff..5df09cc8c6db 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -774,8 +774,6 @@ extern int drm_cpu_valid( void );
774 /* Driver support (drm_drv.h) */ 774 /* Driver support (drm_drv.h) */
775extern int drm_init(struct drm_driver *driver); 775extern int drm_init(struct drm_driver *driver);
776extern void drm_exit(struct drm_driver *driver); 776extern void drm_exit(struct drm_driver *driver);
777extern int drm_version(struct inode *inode, struct file *filp,
778 unsigned int cmd, unsigned long arg);
779extern int drm_ioctl(struct inode *inode, struct file *filp, 777extern int drm_ioctl(struct inode *inode, struct file *filp,
780 unsigned int cmd, unsigned long arg); 778 unsigned int cmd, unsigned long arg);
781extern long drm_compat_ioctl(struct file *filp, 779extern long drm_compat_ioctl(struct file *filp,
@@ -785,28 +783,19 @@ extern int drm_takedown(drm_device_t * dev);
785 /* Device support (drm_fops.h) */ 783 /* Device support (drm_fops.h) */
786extern int drm_open(struct inode *inode, struct file *filp); 784extern int drm_open(struct inode *inode, struct file *filp);
787extern int drm_stub_open(struct inode *inode, struct file *filp); 785extern int drm_stub_open(struct inode *inode, struct file *filp);
788extern int drm_open_helper(struct inode *inode, struct file *filp,
789 drm_device_t *dev);
790extern int drm_flush(struct file *filp); 786extern int drm_flush(struct file *filp);
791extern int drm_fasync(int fd, struct file *filp, int on); 787extern int drm_fasync(int fd, struct file *filp, int on);
792extern int drm_release(struct inode *inode, struct file *filp); 788extern int drm_release(struct inode *inode, struct file *filp);
793 789
794 /* Mapping support (drm_vm.h) */ 790 /* Mapping support (drm_vm.h) */
795extern void drm_vm_open(struct vm_area_struct *vma);
796extern void drm_vm_close(struct vm_area_struct *vma);
797extern void drm_vm_shm_close(struct vm_area_struct *vma);
798extern int drm_mmap_dma(struct file *filp,
799 struct vm_area_struct *vma);
800extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); 791extern int drm_mmap(struct file *filp, struct vm_area_struct *vma);
801extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); 792extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
802extern ssize_t drm_read(struct file *filp, char __user *buf, size_t count, loff_t *off);
803 793
804 /* Memory management support (drm_memory.h) */ 794 /* Memory management support (drm_memory.h) */
805#include "drm_memory.h" 795#include "drm_memory.h"
806extern void drm_mem_init(void); 796extern void drm_mem_init(void);
807extern int drm_mem_info(char *buf, char **start, off_t offset, 797extern int drm_mem_info(char *buf, char **start, off_t offset,
808 int request, int *eof, void *data); 798 int request, int *eof, void *data);
809extern void *drm_calloc(size_t nmemb, size_t size, int area);
810extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, 799extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size,
811 int area); 800 int area);
812extern unsigned long drm_alloc_pages(int order, int area); 801extern unsigned long drm_alloc_pages(int order, int area);
@@ -854,9 +843,6 @@ extern int drm_newctx( struct inode *inode, struct file *filp,
854extern int drm_rmctx( struct inode *inode, struct file *filp, 843extern int drm_rmctx( struct inode *inode, struct file *filp,
855 unsigned int cmd, unsigned long arg ); 844 unsigned int cmd, unsigned long arg );
856 845
857extern int drm_context_switch(drm_device_t *dev, int old, int new);
858extern int drm_context_switch_complete(drm_device_t *dev, int new);
859
860extern int drm_ctxbitmap_init( drm_device_t *dev ); 846extern int drm_ctxbitmap_init( drm_device_t *dev );
861extern void drm_ctxbitmap_cleanup( drm_device_t *dev ); 847extern void drm_ctxbitmap_cleanup( drm_device_t *dev );
862extern void drm_ctxbitmap_free( drm_device_t *dev, int ctx_handle ); 848extern void drm_ctxbitmap_free( drm_device_t *dev, int ctx_handle );
@@ -874,9 +860,6 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp,
874 860
875 861
876 /* Authentication IOCTL support (drm_auth.h) */ 862 /* Authentication IOCTL support (drm_auth.h) */
877extern int drm_add_magic(drm_device_t *dev, drm_file_t *priv,
878 drm_magic_t magic);
879extern int drm_remove_magic(drm_device_t *dev, drm_magic_t magic);
880extern int drm_getmagic(struct inode *inode, struct file *filp, 863extern int drm_getmagic(struct inode *inode, struct file *filp,
881 unsigned int cmd, unsigned long arg); 864 unsigned int cmd, unsigned long arg);
882extern int drm_authmagic(struct inode *inode, struct file *filp, 865extern int drm_authmagic(struct inode *inode, struct file *filp,
@@ -893,13 +876,9 @@ extern int drm_unlock(struct inode *inode, struct file *filp,
893 unsigned int cmd, unsigned long arg); 876 unsigned int cmd, unsigned long arg);
894extern int drm_lock_take(__volatile__ unsigned int *lock, 877extern int drm_lock_take(__volatile__ unsigned int *lock,
895 unsigned int context); 878 unsigned int context);
896extern int drm_lock_transfer(drm_device_t *dev,
897 __volatile__ unsigned int *lock,
898 unsigned int context);
899extern int drm_lock_free(drm_device_t *dev, 879extern int drm_lock_free(drm_device_t *dev,
900 __volatile__ unsigned int *lock, 880 __volatile__ unsigned int *lock,
901 unsigned int context); 881 unsigned int context);
902extern int drm_notifier(void *priv);
903 882
904 /* Buffer management support (drm_bufs.h) */ 883 /* Buffer management support (drm_bufs.h) */
905extern int drm_order( unsigned long size ); 884extern int drm_order( unsigned long size );
@@ -927,7 +906,6 @@ extern void drm_core_reclaim_buffers(drm_device_t *dev, struct file *filp);
927 /* IRQ support (drm_irq.h) */ 906 /* IRQ support (drm_irq.h) */
928extern int drm_control( struct inode *inode, struct file *filp, 907extern int drm_control( struct inode *inode, struct file *filp,
929 unsigned int cmd, unsigned long arg ); 908 unsigned int cmd, unsigned long arg );
930extern int drm_irq_install( drm_device_t *dev );
931extern int drm_irq_uninstall( drm_device_t *dev ); 909extern int drm_irq_uninstall( drm_device_t *dev );
932extern irqreturn_t drm_irq_handler( DRM_IRQ_ARGS ); 910extern irqreturn_t drm_irq_handler( DRM_IRQ_ARGS );
933extern void drm_driver_irq_preinstall( drm_device_t *dev ); 911extern void drm_driver_irq_preinstall( drm_device_t *dev );
@@ -967,7 +945,6 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM *handle);
967extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, 945extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
968 struct drm_driver *driver); 946 struct drm_driver *driver);
969extern int drm_put_dev(drm_device_t * dev); 947extern int drm_put_dev(drm_device_t * dev);
970extern int drm_get_head(drm_device_t * dev, drm_head_t *head);
971extern int drm_put_head(drm_head_t * head); 948extern int drm_put_head(drm_head_t * head);
972extern unsigned int drm_debug; 949extern unsigned int drm_debug;
973extern unsigned int drm_cards_limit; 950extern unsigned int drm_cards_limit;
@@ -1064,9 +1041,16 @@ static __inline__ void drm_free(void *pt, size_t size, int area)
1064{ 1041{
1065 kfree(pt); 1042 kfree(pt);
1066} 1043}
1044
1045/** Wrapper around kcalloc() */
1046static __inline__ void *drm_calloc(size_t nmemb, size_t size, int area)
1047{
1048 return kcalloc(nmemb, size, GFP_KERNEL);
1049}
1067#else 1050#else
1068extern void *drm_alloc(size_t size, int area); 1051extern void *drm_alloc(size_t size, int area);
1069extern void drm_free(void *pt, size_t size, int area); 1052extern void drm_free(void *pt, size_t size, int area);
1053extern void *drm_calloc(size_t nmemb, size_t size, int area);
1070#endif 1054#endif
1071 1055
1072/*@}*/ 1056/*@}*/