The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/drm/drmP.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
    2  * Created: Mon Jan  4 10:05:05 1999 by faith@precisioninsight.com */
    3 /*-
    4  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
    5  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
    6  * All rights reserved.
    7  *
    8  * Permission is hereby granted, free of charge, to any person obtaining a
    9  * copy of this software and associated documentation files (the "Software"),
   10  * to deal in the Software without restriction, including without limitation
   11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
   12  * and/or sell copies of the Software, and to permit persons to whom the
   13  * Software is furnished to do so, subject to the following conditions:
   14  *
   15  * The above copyright notice and this permission notice (including the next
   16  * paragraph) shall be included in all copies or substantial portions of the
   17  * Software.
   18  *
   19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
   22  * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
   23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
   24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
   25  * OTHER DEALINGS IN THE SOFTWARE.
   26  *
   27  * Authors:
   28  *    Rickard E. (Rik) Faith <faith@valinux.com>
   29  *    Gareth Hughes <gareth@valinux.com>
   30  *
   31  * $FreeBSD$
   32  */
   33 
   34 #ifndef _DRM_P_H_
   35 #define _DRM_P_H_
   36 
   37 #if defined(_KERNEL) || defined(__KERNEL__)
   38 
   39 /* DRM template customization defaults
   40  */
   41 #ifndef __HAVE_AGP
   42 #define __HAVE_AGP              0
   43 #endif
   44 #ifndef __HAVE_MTRR
   45 #define __HAVE_MTRR             0
   46 #endif
   47 #ifndef __HAVE_CTX_BITMAP
   48 #define __HAVE_CTX_BITMAP       0
   49 #endif
   50 #ifndef __HAVE_DMA
   51 #define __HAVE_DMA              0
   52 #endif
   53 #ifndef __HAVE_IRQ
   54 #define __HAVE_IRQ              0
   55 #endif
   56 
   57 #define DRM_DEBUG_CODE 0          /* Include debugging code (if > 1, then
   58                                      also include looping detection. */
   59 
   60 typedef struct drm_device drm_device_t;
   61 typedef struct drm_file drm_file_t;
   62 
   63 /* There's undoubtably more of this file to go into these OS dependent ones. */
   64 
   65 #ifdef __FreeBSD__
   66 #include "dev/drm/drm_os_freebsd.h"
   67 #elif defined __NetBSD__
   68 #include "dev/drm/drm_os_netbsd.h"
   69 #endif
   70 
   71 #include "dev/drm/drm.h"
   72 
   73 /* Begin the DRM... */
   74 
   75 #define DRM_HASH_SIZE         16 /* Size of key hash table                */
   76 #define DRM_KERNEL_CONTEXT    0  /* Change drm_resctx if changed          */
   77 #define DRM_RESERVED_CONTEXTS 1  /* Change drm_resctx if changed          */
   78 
   79 #define DRM_FLAG_DEBUG    0x01
   80 
   81 #define DRM_MEM_DMA        0
   82 #define DRM_MEM_SAREA      1
   83 #define DRM_MEM_DRIVER     2
   84 #define DRM_MEM_MAGIC      3
   85 #define DRM_MEM_IOCTLS     4
   86 #define DRM_MEM_MAPS       5
   87 #define DRM_MEM_BUFS       6
   88 #define DRM_MEM_SEGS       7
   89 #define DRM_MEM_PAGES      8
   90 #define DRM_MEM_FILES     9
   91 #define DRM_MEM_QUEUES    10
   92 #define DRM_MEM_CMDS      11
   93 #define DRM_MEM_MAPPINGS  12
   94 #define DRM_MEM_BUFLISTS  13
   95 #define DRM_MEM_AGPLISTS  14
   96 #define DRM_MEM_TOTALAGP  15
   97 #define DRM_MEM_BOUNDAGP  16
   98 #define DRM_MEM_CTXBITMAP 17
   99 #define DRM_MEM_STUB      18
  100 #define DRM_MEM_SGLISTS   19
  101 
  102 #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8)
  103 
  104                                 /* Mapping helper macros */
  105 #define DRM_IOREMAP(map, dev)                                           \
  106         (map)->handle = DRM(ioremap)( dev, map )
  107 
  108 #define DRM_IOREMAP_NOCACHE(map, dev)                                   \
  109         (map)->handle = DRM(ioremap_nocache)( dev, map )
  110 
  111 #define DRM_IOREMAPFREE(map, dev)                                               \
  112         do {                                                            \
  113                 if ( (map)->handle && (map)->size )                     \
  114                         DRM(ioremapfree)( map );                        \
  115         } while (0)
  116 
  117                                 /* Internal types and structures */
  118 #define DRM_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
  119 #define DRM_MIN(a,b) ((a)<(b)?(a):(b))
  120 #define DRM_MAX(a,b) ((a)>(b)?(a):(b))
  121 
  122 #define DRM_IF_VERSION(maj, min) (maj << 16 | min)
  123 
  124 #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do {       \
  125         (_map) = (_dev)->context_sareas[_ctx];          \
  126 } while(0)
  127 
  128 
  129 typedef struct drm_pci_id_list
  130 {
  131         int vendor;
  132         int device;
  133         long driver_private;
  134         char *name;
  135 } drm_pci_id_list_t;
  136 
  137 typedef struct drm_ioctl_desc {
  138         int                  (*func)(DRM_IOCTL_ARGS);
  139         int                  auth_needed;
  140         int                  root_only;
  141 } drm_ioctl_desc_t;
  142 
  143 typedef struct drm_magic_entry {
  144         drm_magic_t            magic;
  145         struct drm_file        *priv;
  146         struct drm_magic_entry *next;
  147 } drm_magic_entry_t;
  148 
  149 typedef struct drm_magic_head {
  150         struct drm_magic_entry *head;
  151         struct drm_magic_entry *tail;
  152 } drm_magic_head_t;
  153 
  154 typedef struct drm_buf {
  155         int               idx;         /* Index into master buflist          */
  156         int               total;       /* Buffer size                        */
  157         int               order;       /* log-base-2(total)                  */
  158         int               used;        /* Amount of buffer in use (for DMA)  */
  159         unsigned long     offset;      /* Byte offset (used internally)      */
  160         void              *address;    /* Address of buffer                  */
  161         unsigned long     bus_address; /* Bus address of buffer              */
  162         struct drm_buf    *next;       /* Kernel-only: used for free list    */
  163         __volatile__ int  pending;     /* On hardware DMA queue              */
  164         DRMFILE           filp;        /* Unique identifier of holding process */
  165         int               context;     /* Kernel queue for this buffer       */
  166         enum {
  167                 DRM_LIST_NONE    = 0,
  168                 DRM_LIST_FREE    = 1,
  169                 DRM_LIST_WAIT    = 2,
  170                 DRM_LIST_PEND    = 3,
  171                 DRM_LIST_PRIO    = 4,
  172                 DRM_LIST_RECLAIM = 5
  173         }                 list;        /* Which list we're on                */
  174 
  175         int               dev_priv_size; /* Size of buffer private stoarge   */
  176         void              *dev_private;  /* Per-buffer private storage       */
  177 } drm_buf_t;
  178 
  179 typedef struct drm_freelist {
  180         int               initialized; /* Freelist in use                  */
  181         atomic_t          count;       /* Number of free buffers           */
  182         drm_buf_t         *next;       /* End pointer                      */
  183 
  184         int               low_mark;    /* Low water mark                   */
  185         int               high_mark;   /* High water mark                  */
  186 } drm_freelist_t;
  187 
  188 typedef struct drm_buf_entry {
  189         int               buf_size;
  190         int               buf_count;
  191         drm_buf_t         *buflist;
  192         int               seg_count;
  193         int               page_order;
  194         vm_offset_t       *seglist;
  195         dma_addr_t        *seglist_bus;
  196 
  197         drm_freelist_t    freelist;
  198 } drm_buf_entry_t;
  199 
  200 typedef TAILQ_HEAD(drm_file_list, drm_file) drm_file_list_t;
  201 struct drm_file {
  202         TAILQ_ENTRY(drm_file) link;
  203         int               authenticated;
  204         int               minor;
  205         pid_t             pid;
  206         uid_t             uid;
  207         int               refs;
  208         drm_magic_t       magic;
  209         unsigned long     ioctl_count;
  210         struct drm_device *devXX;
  211 #ifdef DRIVER_FILE_FIELDS
  212         DRIVER_FILE_FIELDS;
  213 #endif
  214 };
  215 
  216 typedef struct drm_lock_data {
  217         drm_hw_lock_t     *hw_lock;     /* Hardware lock                   */
  218         DRMFILE           filp;         /* Unique identifier of holding process (NULL is kernel)*/
  219         int               lock_queue;   /* Queue of blocked processes      */
  220         unsigned long     lock_time;    /* Time of last lock in jiffies    */
  221 } drm_lock_data_t;
  222 
  223 /* This structure, in the drm_device_t, is always initialized while the device
  224  * is open.  dev->dma_lock protects the incrementing of dev->buf_use, which
  225  * when set marks that no further bufs may be allocated until device teardown
  226  * occurs (when the last open of the device has closed).  The high/low
  227  * watermarks of bufs are only touched by the X Server, and thus not
  228  * concurrently accessed, so no locking is needed.
  229  */
  230 typedef struct drm_device_dma {
  231         drm_buf_entry_t   bufs[DRM_MAX_ORDER+1];
  232         int               buf_count;
  233         drm_buf_t         **buflist;    /* Vector of pointers info bufs    */
  234         int               seg_count;
  235         int               page_count;
  236         unsigned long     *pagelist;
  237         unsigned long     byte_count;
  238         enum {
  239                 _DRM_DMA_USE_AGP = 0x01,
  240                 _DRM_DMA_USE_SG  = 0x02
  241         } flags;
  242 
  243                                 /* DMA support */
  244         drm_buf_t         *this_buffer; /* Buffer being sent               */
  245         drm_buf_t         *next_buffer; /* Selected buffer to send         */
  246 } drm_device_dma_t;
  247 
  248 #if __REALLY_HAVE_AGP
  249 typedef struct drm_agp_mem {
  250         void               *handle;
  251         unsigned long      bound; /* address */
  252         int                pages;
  253         struct drm_agp_mem *prev;
  254         struct drm_agp_mem *next;
  255 } drm_agp_mem_t;
  256 
  257 typedef struct drm_agp_head {
  258         device_t           agpdev;
  259         struct agp_info    info;
  260         const char         *chipset;
  261         drm_agp_mem_t      *memory;
  262         unsigned long      mode;
  263         int                enabled;
  264         int                acquired;
  265         unsigned long      base;
  266         int                mtrr;
  267         int                cant_use_aperture;
  268         unsigned long      page_mask;
  269 } drm_agp_head_t;
  270 #endif
  271 
  272 typedef struct drm_sg_mem {
  273         unsigned long   handle;
  274         void            *virtual;
  275         int             pages;
  276         dma_addr_t      *busaddr;
  277 } drm_sg_mem_t;
  278 
  279 typedef struct drm_local_map {
  280         unsigned long   offset;  /* Physical address (0 for SAREA)*/
  281         unsigned long   size;    /* Physical size (bytes)           */
  282         drm_map_type_t  type;    /* Type of memory mapped                   */
  283         drm_map_flags_t flags;   /* Flags                                   */
  284         void            *handle; /* User-space: "Handle" to pass to mmap    */
  285                                  /* Kernel-space: kernel-virtual address    */
  286         int             mtrr;    /* Boolean: MTRR used */
  287                                  /* Private data                            */
  288         bus_space_tag_t iot;
  289         bus_space_handle_t ioh;
  290 } drm_local_map_t;
  291 
  292 typedef TAILQ_HEAD(drm_map_list, drm_map_list_entry) drm_map_list_t;
  293 typedef struct drm_map_list_entry {
  294         TAILQ_ENTRY(drm_map_list_entry) link;
  295         drm_local_map_t *map;
  296 } drm_map_list_entry_t;
  297 
  298 TAILQ_HEAD(drm_vbl_sig_list, drm_vbl_sig);
  299 typedef struct drm_vbl_sig {
  300         TAILQ_ENTRY(drm_vbl_sig) link;
  301         unsigned int    sequence;
  302         int             signo;
  303         int             pid;
  304 } drm_vbl_sig_t;
  305 
  306 struct drm_device {
  307 #ifdef __NetBSD__
  308         struct device     device;       /* NetBSD's softc is an extension of struct device */
  309 #endif
  310         const char        *name;        /* Simple driver name              */
  311         char              *unique;      /* Unique identifier: e.g., busid  */
  312         int               unique_len;   /* Length of unique field          */
  313 #ifdef __FreeBSD__
  314         device_t          device;       /* Device instance from newbus     */
  315 #endif
  316         struct cdev *devnode;   /* Device number for mknod         */
  317         int               if_version;   /* Highest interface version set */
  318 
  319         int               flags;        /* Flags to open(2)                */
  320 
  321                                 /* Locks */
  322 #if defined(__FreeBSD__) && __FreeBSD_version > 500000
  323 #if __HAVE_DMA
  324         struct mtx        dma_lock;     /* protects dev->dma */
  325 #endif
  326 #if __HAVE_IRQ
  327         struct mtx        irq_lock; /* protects irq condition checks */
  328 #endif
  329         struct mtx        dev_lock;     /* protects everything else */
  330 #endif
  331                                 /* Usage Counters */
  332         int               open_count;   /* Outstanding files open          */
  333         int               buf_use;      /* Buffers in use -- cannot alloc  */
  334 
  335                                 /* Performance counters */
  336         unsigned long     counters;
  337         drm_stat_type_t   types[15];
  338         atomic_t          counts[15];
  339 
  340                                 /* Authentication */
  341         drm_file_list_t   files;
  342         drm_magic_head_t  magiclist[DRM_HASH_SIZE];
  343 
  344         /* Linked list of mappable regions. Protected by dev_lock */
  345         drm_map_list_t    *maplist;
  346 
  347         drm_local_map_t   **context_sareas;
  348         int               max_context;
  349 
  350         drm_lock_data_t   lock;         /* Information on hardware lock    */
  351 
  352                                 /* DMA queues (contexts) */
  353         drm_device_dma_t  *dma;         /* Optional pointer for DMA support */
  354 
  355                                 /* Context support */
  356         int               irq;          /* Interrupt used by board         */
  357         int               irq_enabled;  /* True if the irq handler is enabled */
  358 #ifdef __FreeBSD__
  359         int               irqrid;       /* Interrupt used by board */
  360         struct resource   *irqr;        /* Resource for interrupt used by board    */
  361 #elif defined(__NetBSD__)
  362         struct pci_attach_args  pa;
  363         pci_intr_handle_t       ih;
  364 #endif
  365         void              *irqh;        /* Handle from bus_setup_intr      */
  366 
  367         int               pci_domain;
  368         int               pci_bus;
  369         int               pci_slot;
  370         int               pci_func;
  371 
  372         atomic_t          context_flag; /* Context swapping flag           */
  373         int               last_context; /* Last current context            */
  374 #if __FreeBSD_version >= 400005
  375         struct task       task;
  376 #endif
  377 #if __HAVE_VBL_IRQ
  378         int               vbl_queue;    /* vbl wait channel */
  379         atomic_t          vbl_received;
  380 #endif
  381 
  382 #ifdef __FreeBSD__
  383         struct sigio      *buf_sigio;   /* Processes waiting for SIGIO     */
  384 #elif defined(__NetBSD__)
  385         pid_t             buf_pgid;
  386 #endif
  387 
  388                                 /* Sysctl support */
  389         struct drm_sysctl_info *sysctl;
  390 
  391 #if __REALLY_HAVE_AGP
  392         drm_agp_head_t    *agp;
  393 #endif
  394         drm_sg_mem_t      *sg;  /* Scatter gather memory */
  395         atomic_t          *ctx_bitmap;
  396         void              *dev_private;
  397 };
  398 
  399 extern int           DRM(flags);
  400 
  401                                 /* Memory management support (drm_memory.h) */
  402 extern void          DRM(mem_init)(void);
  403 extern void          DRM(mem_uninit)(void);
  404 extern void          *DRM(alloc)(size_t size, int area);
  405 extern void          *DRM(calloc)(size_t nmemb, size_t size, int area);
  406 extern void          *DRM(realloc)(void *oldpt, size_t oldsize, size_t size,
  407                                    int area);
  408 extern void          DRM(free)(void *pt, size_t size, int area);
  409 extern void          *DRM(ioremap)(drm_device_t *dev, drm_local_map_t *map);
  410 extern void          DRM(ioremapfree)(drm_local_map_t *map);
  411 extern int       DRM(mtrr_add)(unsigned long offset, size_t size, int flags);
  412 extern int       DRM(mtrr_del)(unsigned long offset, size_t size, int flags);
  413 
  414 #if __REALLY_HAVE_AGP
  415 extern agp_memory    *DRM(alloc_agp)(int pages, u32 type);
  416 extern int           DRM(free_agp)(agp_memory *handle, int pages);
  417 extern int           DRM(bind_agp)(agp_memory *handle, unsigned int start);
  418 extern int           DRM(unbind_agp)(agp_memory *handle);
  419 #endif
  420 
  421 extern int           DRM(context_switch)(drm_device_t *dev, int old, int new);
  422 extern int           DRM(context_switch_complete)(drm_device_t *dev, int new);
  423 
  424 #if __HAVE_CTX_BITMAP
  425 extern int           DRM(ctxbitmap_init)( drm_device_t *dev );
  426 extern void          DRM(ctxbitmap_cleanup)( drm_device_t *dev );
  427 extern void          DRM(ctxbitmap_free)( drm_device_t *dev, int ctx_handle );
  428 extern int           DRM(ctxbitmap_next)( drm_device_t *dev );
  429 #endif
  430 
  431                                 /* Locking IOCTL support (drm_lock.h) */
  432 extern int           DRM(lock_take)(__volatile__ unsigned int *lock,
  433                                     unsigned int context);
  434 extern int           DRM(lock_transfer)(drm_device_t *dev,
  435                                         __volatile__ unsigned int *lock,
  436                                         unsigned int context);
  437 extern int           DRM(lock_free)(drm_device_t *dev,
  438                                     __volatile__ unsigned int *lock,
  439                                     unsigned int context);
  440 
  441                                 /* Buffer management support (drm_bufs.h) */
  442 extern int           DRM(order)( unsigned long size );
  443 
  444 #if __HAVE_DMA
  445                                 /* DMA support (drm_dma.h) */
  446 extern int           DRM(dma_setup)(drm_device_t *dev);
  447 extern void          DRM(dma_takedown)(drm_device_t *dev);
  448 extern void          DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf);
  449 extern void          DRM(reclaim_buffers)(drm_device_t *dev, DRMFILE filp);
  450 #endif
  451 
  452 #if __HAVE_IRQ
  453                                 /* IRQ support (drm_irq.h) */
  454 extern int           DRM(irq_install)(drm_device_t *dev);
  455 extern int           DRM(irq_uninstall)( drm_device_t *dev );
  456 extern irqreturn_t   DRM(irq_handler)( DRM_IRQ_ARGS );
  457 extern void          DRM(driver_irq_preinstall)( drm_device_t *dev );
  458 extern void          DRM(driver_irq_postinstall)( drm_device_t *dev );
  459 extern void          DRM(driver_irq_uninstall)( drm_device_t *dev );
  460 #if __HAVE_IRQ_BH
  461 extern void          DRM(irq_immediate_bh)( DRM_TASKQUEUE_ARGS );
  462 #endif
  463 #endif
  464 
  465 #if __HAVE_VBL_IRQ
  466 extern int           DRM(vblank_wait)(drm_device_t *dev, unsigned int *vbl_seq);
  467 extern void          DRM(vbl_send_signals)( drm_device_t *dev );
  468 #endif
  469 
  470 #if __REALLY_HAVE_AGP
  471                                 /* AGP/GART support (drm_agpsupport.h) */
  472 extern drm_agp_head_t *DRM(agp_init)(void);
  473 extern void           DRM(agp_uninit)(void);
  474 extern void           DRM(agp_do_release)(void);
  475 extern agp_memory     *DRM(agp_allocate_memory)(size_t pages, u32 type);
  476 extern int            DRM(agp_free_memory)(agp_memory *handle);
  477 extern int            DRM(agp_bind_memory)(agp_memory *handle, off_t start);
  478 extern int            DRM(agp_unbind_memory)(agp_memory *handle);
  479 #endif
  480 
  481 #if __HAVE_SG
  482                                 /* Scatter Gather Support (drm_scatter.h) */
  483 extern void           DRM(sg_cleanup)(drm_sg_mem_t *entry);
  484 #endif
  485 
  486 #if __REALLY_HAVE_SG
  487                                /* ATI PCIGART support (ati_pcigart.h) */
  488 extern int            DRM(ati_pcigart_init)(drm_device_t *dev,
  489                                             unsigned long *addr,
  490                                             dma_addr_t *bus_addr);
  491 extern int            DRM(ati_pcigart_cleanup)(drm_device_t *dev,
  492                                                unsigned long addr,
  493                                                dma_addr_t bus_addr);
  494 #endif
  495 
  496 /* Locking IOCTL support (drm_drv.h) */
  497 extern int              DRM(lock)(DRM_IOCTL_ARGS);
  498 extern int              DRM(unlock)(DRM_IOCTL_ARGS);
  499 extern int              DRM(version)( DRM_IOCTL_ARGS );
  500 extern int              DRM(setversion)( DRM_IOCTL_ARGS );
  501 
  502 /* Misc. IOCTL support (drm_ioctl.h) */
  503 extern int              DRM(irq_by_busid)(DRM_IOCTL_ARGS);
  504 extern int              DRM(getunique)(DRM_IOCTL_ARGS);
  505 extern int              DRM(setunique)(DRM_IOCTL_ARGS);
  506 extern int              DRM(getmap)(DRM_IOCTL_ARGS);
  507 extern int              DRM(getclient)(DRM_IOCTL_ARGS);
  508 extern int              DRM(getstats)(DRM_IOCTL_ARGS);
  509 extern int              DRM(noop)(DRM_IOCTL_ARGS);
  510 
  511 /* Context IOCTL support (drm_context.h) */
  512 extern int              DRM(resctx)(DRM_IOCTL_ARGS);
  513 extern int              DRM(addctx)(DRM_IOCTL_ARGS);
  514 extern int              DRM(modctx)(DRM_IOCTL_ARGS);
  515 extern int              DRM(getctx)(DRM_IOCTL_ARGS);
  516 extern int              DRM(switchctx)(DRM_IOCTL_ARGS);
  517 extern int              DRM(newctx)(DRM_IOCTL_ARGS);
  518 extern int              DRM(rmctx)(DRM_IOCTL_ARGS);
  519 extern int              DRM(setsareactx)(DRM_IOCTL_ARGS);
  520 extern int              DRM(getsareactx)(DRM_IOCTL_ARGS);
  521 
  522 /* Drawable IOCTL support (drm_drawable.h) */
  523 extern int              DRM(adddraw)(DRM_IOCTL_ARGS);
  524 extern int              DRM(rmdraw)(DRM_IOCTL_ARGS);
  525 
  526 /* Authentication IOCTL support (drm_auth.h) */
  527 extern int              DRM(getmagic)(DRM_IOCTL_ARGS);
  528 extern int              DRM(authmagic)(DRM_IOCTL_ARGS);
  529 
  530 /* Buffer management support (drm_bufs.h) */
  531 extern int              DRM(addmap)(DRM_IOCTL_ARGS);
  532 extern int              DRM(rmmap)(DRM_IOCTL_ARGS);
  533 #if __HAVE_DMA
  534 extern int              DRM(addbufs)(DRM_IOCTL_ARGS);
  535 extern int              DRM(infobufs)(DRM_IOCTL_ARGS);
  536 extern int              DRM(markbufs)(DRM_IOCTL_ARGS);
  537 extern int              DRM(freebufs)(DRM_IOCTL_ARGS);
  538 extern int              DRM(mapbufs)(DRM_IOCTL_ARGS);
  539 #endif
  540 
  541 /* IRQ support (drm_irq.h) */
  542 #if __HAVE_IRQ || __HAVE_DMA
  543 extern int              DRM(control)(DRM_IOCTL_ARGS);
  544 #endif
  545 #if __HAVE_VBL_IRQ
  546 extern int              DRM(wait_vblank)(DRM_IOCTL_ARGS);
  547 #endif
  548 
  549 /* AGP/GART support (drm_agpsupport.h) */
  550 #if __REALLY_HAVE_AGP
  551 extern int              DRM(agp_acquire)(DRM_IOCTL_ARGS);
  552 extern int              DRM(agp_release)(DRM_IOCTL_ARGS);
  553 extern int              DRM(agp_enable)(DRM_IOCTL_ARGS);
  554 extern int              DRM(agp_info)(DRM_IOCTL_ARGS);
  555 extern int              DRM(agp_alloc)(DRM_IOCTL_ARGS);
  556 extern int              DRM(agp_free)(DRM_IOCTL_ARGS);
  557 extern int              DRM(agp_unbind)(DRM_IOCTL_ARGS);
  558 extern int              DRM(agp_bind)(DRM_IOCTL_ARGS);
  559 #endif
  560 
  561 /* Scatter Gather Support (drm_scatter.h) */
  562 #if __HAVE_SG
  563 extern int              DRM(sg_alloc)(DRM_IOCTL_ARGS);
  564 extern int              DRM(sg_free)(DRM_IOCTL_ARGS);
  565 #endif
  566 
  567 /* consistent PCI memory functions (drm_pci.h) */
  568 extern void             *DRM(pci_alloc)(drm_device_t *dev, size_t size, 
  569                                         size_t align, dma_addr_t maxaddr,
  570                                         dma_addr_t *busaddr);
  571 extern void             DRM(pci_free)(drm_device_t *dev, size_t size, 
  572                                       void *vaddr, dma_addr_t busaddr);
  573 
  574 #endif /* __KERNEL__ */
  575 #endif /* _DRM_P_H_ */

Cache object: 2ab532c050afd04c748867071d6709f0


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.