3 * OS-independent header for DRM user-level library interface.
5 * \author Rickard E. (Rik) Faith <faith@valinux.com>
9 * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
10 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
11 * All Rights Reserved.
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice (including the next
21 * paragraph) shall be included in all copies or substantial portions of the
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
28 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 * DEALINGS IN THE SOFTWARE.
38 #include <sys/types.h>
42 /* Defaults, if nothing set in xf86config */
45 /* Default /dev/dri directory permissions 0755 */
46 #define DRM_DEV_DIRMODE \
47 (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
48 #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
50 #define DRM_DIR_NAME "/dev/dri"
51 #define DRM_DEV_NAME "%s/card%d"
52 #define DRM_CONTROL_DEV_NAME "%s/controlD%d"
53 #define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */
55 #define DRM_ERR_NO_DEVICE (-1001)
56 #define DRM_ERR_NO_ACCESS (-1002)
57 #define DRM_ERR_NOT_ROOT (-1003)
58 #define DRM_ERR_INVALID (-1004)
59 #define DRM_ERR_NO_FD (-1005)
61 #define DRM_AGP_NO_HANDLE 0
63 typedef unsigned int drmSize
, *drmSizePtr
; /**< For mapped regions */
64 typedef void *drmAddress
, **drmAddressPtr
; /**< For mapped regions */
66 typedef struct _drmServerInfo
{
67 int (*debug_print
)(const char *format
, va_list ap
);
68 int (*load_module
)(const char *name
);
69 void (*get_perms
)(gid_t
*, mode_t
*);
70 } drmServerInfo
, *drmServerInfoPtr
;
72 typedef struct drmHashEntry
{
74 void (*f
)(int, void *, void *);
78 extern int drmIoctl(int fd
, unsigned long request
, void *arg
);
79 extern void *drmGetHashTable(void);
80 extern drmHashEntry
*drmGetEntry(int fd
);
83 * Driver version information.
85 * \sa drmGetVersion() and drmSetVersion().
87 typedef struct _drmVersion
{
88 int version_major
; /**< Major version */
89 int version_minor
; /**< Minor version */
90 int version_patchlevel
; /**< Patch level */
91 int name_len
; /**< Length of name buffer */
92 char *name
; /**< Name of driver */
93 int date_len
; /**< Length of date buffer */
94 char *date
; /**< User-space buffer to hold date */
95 int desc_len
; /**< Length of desc buffer */
96 char *desc
; /**< User-space buffer to hold desc */
97 } drmVersion
, *drmVersionPtr
;
99 typedef struct _drmStats
{
100 unsigned long count
; /**< Number of data */
102 unsigned long value
; /**< Value from kernel */
103 const char *long_format
; /**< Suggested format for long_name */
104 const char *long_name
; /**< Long name for value */
105 const char *rate_format
; /**< Suggested format for rate_name */
106 const char *rate_name
; /**< Short name for value per second */
107 int isvalue
; /**< True if value (vs. counter) */
108 const char *mult_names
; /**< Multiplier names (e.g., "KGM") */
109 int mult
; /**< Multiplier value (e.g., 1024) */
110 int verbose
; /**< Suggest only in verbose output */
115 /* All of these enums *MUST* match with the
116 kernel implementation -- so do *NOT*
117 change them! (The drmlib implementation
118 will just copy the flags instead of
119 translating them.) */
121 DRM_FRAME_BUFFER
= 0, /**< WC, no caching, no core dump */
122 DRM_REGISTERS
= 1, /**< no caching, no core dump */
123 DRM_SHM
= 2, /**< shared, cached */
124 DRM_AGP
= 3, /**< AGP/GART */
125 DRM_SCATTER_GATHER
= 4, /**< PCI scatter/gather */
126 DRM_CONSISTENT
= 5 /**< PCI consistent */
130 DRM_RESTRICTED
= 0x0001, /**< Cannot be mapped to client-virtual */
131 DRM_READ_ONLY
= 0x0002, /**< Read-only in client-virtual */
132 DRM_LOCKED
= 0x0004, /**< Physical pages locked */
133 DRM_KERNEL
= 0x0008, /**< Kernel requires access */
134 DRM_WRITE_COMBINING
= 0x0010, /**< Use write-combining, if available */
135 DRM_CONTAINS_LOCK
= 0x0020, /**< SHM page that contains lock */
136 DRM_REMOVABLE
= 0x0040 /**< Removable mapping */
140 * \warning These values *MUST* match drm.h
143 /** \name Flags for DMA buffer dispatch */
145 DRM_DMA_BLOCK
= 0x01, /**<
146 * Block until buffer dispatched.
148 * \note the buffer may not yet have been
149 * processed by the hardware -- getting a
150 * hardware lock with the hardware quiescent
151 * will ensure that the buffer has been
154 DRM_DMA_WHILE_LOCKED
= 0x02, /**< Dispatch while lock held */
155 DRM_DMA_PRIORITY
= 0x04, /**< High priority dispatch */
158 /** \name Flags for DMA buffer request */
160 DRM_DMA_WAIT
= 0x10, /**< Wait for free buffers */
161 DRM_DMA_SMALLER_OK
= 0x20, /**< Smaller-than-requested buffers OK */
162 DRM_DMA_LARGER_OK
= 0x40 /**< Larger-than-requested buffers OK */
167 DRM_PAGE_ALIGN
= 0x01,
168 DRM_AGP_BUFFER
= 0x02,
169 DRM_SG_BUFFER
= 0x04,
170 DRM_FB_BUFFER
= 0x08,
171 DRM_PCI_BUFFER_RO
= 0x10
175 DRM_LOCK_READY
= 0x01, /**< Wait until hardware is ready for DMA */
176 DRM_LOCK_QUIESCENT
= 0x02, /**< Wait until hardware quiescent */
177 DRM_LOCK_FLUSH
= 0x04, /**< Flush this context's DMA queue first */
178 DRM_LOCK_FLUSH_ALL
= 0x08, /**< Flush all DMA queues first */
179 /* These *HALT* flags aren't supported yet
180 -- they will be used to support the
181 full-screen DGA-like mode. */
182 DRM_HALT_ALL_QUEUES
= 0x10, /**< Halt all current and future queues */
183 DRM_HALT_CUR_QUEUES
= 0x20 /**< Halt all current queues */
187 DRM_CONTEXT_PRESERVED
= 0x01, /**< This context is preserved and
189 DRM_CONTEXT_2DONLY
= 0x02 /**< This context is for 2D rendering only. */
190 } drm_context_tFlags
, *drm_context_tFlagsPtr
;
192 typedef struct _drmBufDesc
{
193 int count
; /**< Number of buffers of this size */
194 int size
; /**< Size in bytes */
195 int low_mark
; /**< Low water mark */
196 int high_mark
; /**< High water mark */
197 } drmBufDesc
, *drmBufDescPtr
;
199 typedef struct _drmBufInfo
{
200 int count
; /**< Number of buffers described in list */
201 drmBufDescPtr list
; /**< List of buffer descriptions */
202 } drmBufInfo
, *drmBufInfoPtr
;
204 typedef struct _drmBuf
{
205 int idx
; /**< Index into the master buffer list */
206 int total
; /**< Buffer size */
207 int used
; /**< Amount of buffer in use (for DMA) */
208 drmAddress address
; /**< Address */
209 } drmBuf
, *drmBufPtr
;
212 * Buffer mapping information.
214 * Used by drmMapBufs() and drmUnmapBufs() to store information about the
217 typedef struct _drmBufMap
{
218 int count
; /**< Number of buffers mapped */
219 drmBufPtr list
; /**< Buffers */
220 } drmBufMap
, *drmBufMapPtr
;
222 typedef struct _drmLock
{
223 volatile unsigned int lock
;
225 /* This is big enough for most current (and future?) architectures:
228 Intel P5/PPro/PII/PIII: 32 bytes
229 Intel StrongARM: 32 bytes
230 Intel i386/i486: 16 bytes
232 Motorola 68k: 16 bytes
233 Motorola PowerPC: 32 bytes
236 } drmLock
, *drmLockPtr
;
239 * Indices here refer to the offset into
242 typedef struct _drmDMAReq
{
243 drm_context_t context
; /**< Context handle */
244 int send_count
; /**< Number of buffers to send */
245 int *send_list
; /**< List of handles to buffers */
246 int *send_sizes
; /**< Lengths of data to send, in bytes */
247 drmDMAFlags flags
; /**< Flags */
248 int request_count
; /**< Number of buffers requested */
249 int request_size
; /**< Desired size of buffers requested */
250 int *request_list
; /**< Buffer information */
251 int *request_sizes
; /**< Minimum acceptable sizes */
252 int granted_count
; /**< Number of buffers granted at this size */
253 } drmDMAReq
, *drmDMAReqPtr
;
255 typedef struct _drmRegion
{
260 } drmRegion
, *drmRegionPtr
;
262 typedef struct _drmTextureRegion
{
265 unsigned char in_use
;
266 unsigned char padding
; /**< Explicitly pad this out */
268 } drmTextureRegion
, *drmTextureRegionPtr
;
272 DRM_VBLANK_ABSOLUTE
= 0x0, /**< Wait for specific vblank sequence number */
273 DRM_VBLANK_RELATIVE
= 0x1, /**< Wait for given number of vblanks */
274 DRM_VBLANK_FLIP
= 0x8000000, /**< Scheduled buffer swap should flip */
275 DRM_VBLANK_NEXTONMISS
= 0x10000000, /**< If missed, wait for next vblank */
276 DRM_VBLANK_SECONDARY
= 0x20000000, /**< Secondary display controller */
277 DRM_VBLANK_SIGNAL
= 0x40000000 /* Send signal instead of blocking */
280 typedef struct _drmVBlankReq
{
281 drmVBlankSeqType type
;
282 unsigned int sequence
;
283 unsigned long signal
;
284 } drmVBlankReq
, *drmVBlankReqPtr
;
286 typedef struct _drmVBlankReply
{
287 drmVBlankSeqType type
;
288 unsigned int sequence
;
291 } drmVBlankReply
, *drmVBlankReplyPtr
;
293 typedef union _drmVBlank
{
294 drmVBlankReq request
;
295 drmVBlankReply reply
;
296 } drmVBlank
, *drmVBlankPtr
;
298 typedef struct _drmSetVersion
{
303 } drmSetVersion
, *drmSetVersionPtr
;
305 #define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock)
307 #define DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */
308 #define DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */
310 #if defined(__GNUC__) && (__GNUC__ >= 2)
311 # if defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)
312 /* Reflect changes here to drmP.h */
313 #define DRM_CAS(lock,old,new,__ret) \
315 int __dummy; /* Can't mark eax as clobbered */ \
316 __asm__ __volatile__( \
317 "lock ; cmpxchg %4,%1\n\t" \
320 "=m" (__drm_dummy_lock(lock)), \
326 #elif defined(__alpha__)
328 #define DRM_CAS(lock, old, new, ret) \
331 __asm__ __volatile__( \
332 " addl $31, %5, %3\n" \
333 "1: ldl_l %0, %2\n" \
334 " cmpeq %0, %3, %1\n" \
340 "2: cmpeq %1, 0, %1\n" \
344 : "=&r"(tmp), "=&r"(ret), \
345 "=m"(__drm_dummy_lock(lock)), \
347 : "r"(new), "r"(old) \
351 #elif defined(__sparc__)
353 #define DRM_CAS(lock,old,new,__ret) \
354 do { register unsigned int __old __asm("o0"); \
355 register unsigned int __new __asm("o1"); \
356 register volatile unsigned int *__lock __asm("o2"); \
359 __lock = (volatile unsigned int *)lock; \
360 __asm__ __volatile__( \
361 /*"cas [%2], %3, %0"*/ \
362 ".word 0xd3e29008\n\t" \
363 /*"membar #StoreStore | #StoreLoad"*/ \
370 __ret = (__new != __old); \
373 #elif defined(__ia64__)
375 #ifdef __INTEL_COMPILER
376 /* this currently generates bad code (missing stop bits)... */
377 #include <ia64intrin.h>
379 #define DRM_CAS(lock,old,new,__ret) \
381 unsigned long __result, __old = (old) & 0xffffffff; \
383 __result = _InterlockedCompareExchange_acq(&__drm_dummy_lock(lock), (new), __old);\
384 __ret = (__result) != (__old); \
385 /* __ret = (__sync_val_compare_and_swap(&__drm_dummy_lock(lock), \
391 #define DRM_CAS(lock,old,new,__ret) \
393 unsigned int __result, __old = (old); \
394 __asm__ __volatile__( \
398 "cmpxchg4.acq %0=%1,%3,ar.ccv" \
399 : "=r" (__result), "=m" (__drm_dummy_lock(lock)) \
400 : "r" ((unsigned long)__old), "r" (new) \
402 __ret = (__result) != (__old); \
407 #elif defined(__powerpc__)
409 #define DRM_CAS(lock,old,new,__ret) \
411 __asm__ __volatile__( \
413 "0: lwarx %0,0,%1;" \
421 : "r"(lock), "r"(new), "r"(old) \
422 : "cr0", "memory"); \
425 #endif /* architecture */
426 #endif /* __GNUC__ >= 2 */
429 #define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */
432 #if defined(__alpha__)
433 #define DRM_CAS_RESULT(_result) long _result
434 #elif defined(__powerpc__)
435 #define DRM_CAS_RESULT(_result) int _result
437 #define DRM_CAS_RESULT(_result) char _result
440 #define DRM_LIGHT_LOCK(fd,lock,context) \
442 DRM_CAS_RESULT(__ret); \
443 DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \
444 if (__ret) drmGetLock(fd,context,0); \
447 /* This one counts fast locks -- for
448 benchmarking only. */
449 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \
451 DRM_CAS_RESULT(__ret); \
452 DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret); \
453 if (__ret) drmGetLock(fd,context,0); \
457 #define DRM_LOCK(fd,lock,context,flags) \
459 if (flags) drmGetLock(fd,context,flags); \
460 else DRM_LIGHT_LOCK(fd,lock,context); \
463 #define DRM_UNLOCK(fd,lock,context) \
465 DRM_CAS_RESULT(__ret); \
466 DRM_CAS(lock,DRM_LOCK_HELD|context,context,__ret); \
467 if (__ret) drmUnlock(fd,context); \
470 /* Simple spin locks */
471 #define DRM_SPINLOCK(spin,val) \
473 DRM_CAS_RESULT(__ret); \
475 DRM_CAS(spin,0,val,__ret); \
476 if (__ret) while ((spin)->lock); \
480 #define DRM_SPINLOCK_TAKE(spin,val) \
482 DRM_CAS_RESULT(__ret); \
485 cur = (*spin).lock; \
486 DRM_CAS(spin,cur,val,__ret); \
490 #define DRM_SPINLOCK_COUNT(spin,val,count,__ret) \
494 for (__i = 0; __ret && __i < count; __i++) { \
495 DRM_CAS(spin,0,val,__ret); \
496 if (__ret) for (;__i < count && (spin)->lock; __i++); \
500 #define DRM_SPINUNLOCK(spin,val) \
502 DRM_CAS_RESULT(__ret); \
503 if ((*spin).lock == val) { /* else server stole lock */ \
505 DRM_CAS(spin,val,0,__ret); \
512 /* General user-level programmer's API: unprivileged */
513 extern int drmAvailable(void);
514 extern int drmOpen(const char *name
, const char *busid
);
515 extern int drmOpenControl(int minor
);
516 extern int drmClose(int fd
);
517 extern drmVersionPtr
drmGetVersion(int fd
);
518 extern drmVersionPtr
drmGetLibVersion(int fd
);
519 extern void drmFreeVersion(drmVersionPtr
);
520 extern int drmGetMagic(int fd
, drm_magic_t
* magic
);
521 extern char *drmGetBusid(int fd
);
522 extern int drmGetInterruptFromBusID(int fd
, int busnum
, int devnum
,
524 extern int drmGetMap(int fd
, int idx
, drm_handle_t
*offset
,
525 drmSize
*size
, drmMapType
*type
,
526 drmMapFlags
*flags
, drm_handle_t
*handle
,
528 extern int drmGetClient(int fd
, int idx
, int *auth
, int *pid
,
529 int *uid
, unsigned long *magic
,
530 unsigned long *iocs
);
531 extern int drmGetStats(int fd
, drmStatsT
*stats
);
532 extern int drmSetInterfaceVersion(int fd
, drmSetVersion
*version
);
533 extern int drmCommandNone(int fd
, unsigned long drmCommandIndex
);
534 extern int drmCommandRead(int fd
, unsigned long drmCommandIndex
,
535 void *data
, unsigned long size
);
536 extern int drmCommandWrite(int fd
, unsigned long drmCommandIndex
,
537 void *data
, unsigned long size
);
538 extern int drmCommandWriteRead(int fd
, unsigned long drmCommandIndex
,
539 void *data
, unsigned long size
);
541 /* General user-level programmer's API: X server (root) only */
542 extern void drmFreeBusid(const char *busid
);
543 extern int drmSetBusid(int fd
, const char *busid
);
544 extern int drmAuthMagic(int fd
, drm_magic_t magic
);
545 extern int drmAddMap(int fd
,
550 drm_handle_t
* handle
);
551 extern int drmRmMap(int fd
, drm_handle_t handle
);
552 extern int drmAddContextPrivateMapping(int fd
, drm_context_t ctx_id
,
553 drm_handle_t handle
);
555 extern int drmAddBufs(int fd
, int count
, int size
,
556 drmBufDescFlags flags
,
558 extern int drmMarkBufs(int fd
, double low
, double high
);
559 extern int drmCreateContext(int fd
, drm_context_t
* handle
);
560 extern int drmSetContextFlags(int fd
, drm_context_t context
,
561 drm_context_tFlags flags
);
562 extern int drmGetContextFlags(int fd
, drm_context_t context
,
563 drm_context_tFlagsPtr flags
);
564 extern int drmAddContextTag(int fd
, drm_context_t context
, void *tag
);
565 extern int drmDelContextTag(int fd
, drm_context_t context
);
566 extern void *drmGetContextTag(int fd
, drm_context_t context
);
567 extern drm_context_t
* drmGetReservedContextList(int fd
, int *count
);
568 extern void drmFreeReservedContextList(drm_context_t
*);
569 extern int drmSwitchToContext(int fd
, drm_context_t context
);
570 extern int drmDestroyContext(int fd
, drm_context_t handle
);
571 extern int drmCreateDrawable(int fd
, drm_drawable_t
* handle
);
572 extern int drmDestroyDrawable(int fd
, drm_drawable_t handle
);
573 extern int drmUpdateDrawableInfo(int fd
, drm_drawable_t handle
,
574 drm_drawable_info_type_t type
,
575 unsigned int num
, void *data
);
576 extern int drmCtlInstHandler(int fd
, int irq
);
577 extern int drmCtlUninstHandler(int fd
);
579 /* General user-level programmer's API: authenticated client and/or X */
580 extern int drmMap(int fd
,
583 drmAddressPtr address
);
584 extern int drmUnmap(drmAddress address
, drmSize size
);
585 extern drmBufInfoPtr
drmGetBufInfo(int fd
);
586 extern drmBufMapPtr
drmMapBufs(int fd
);
587 extern int drmUnmapBufs(drmBufMapPtr bufs
);
588 extern int drmDMA(int fd
, drmDMAReqPtr request
);
589 extern int drmFreeBufs(int fd
, int count
, int *list
);
590 extern int drmGetLock(int fd
,
591 drm_context_t context
,
593 extern int drmUnlock(int fd
, drm_context_t context
);
594 extern int drmFinish(int fd
, int context
, drmLockFlags flags
);
595 extern int drmGetContextPrivateMapping(int fd
, drm_context_t ctx_id
,
596 drm_handle_t
* handle
);
598 /* AGP/GART support: X server (root) only */
599 extern int drmAgpAcquire(int fd
);
600 extern int drmAgpRelease(int fd
);
601 extern int drmAgpEnable(int fd
, unsigned long mode
);
602 extern int drmAgpAlloc(int fd
, unsigned long size
,
603 unsigned long type
, unsigned long *address
,
604 drm_handle_t
*handle
);
605 extern int drmAgpFree(int fd
, drm_handle_t handle
);
606 extern int drmAgpBind(int fd
, drm_handle_t handle
,
607 unsigned long offset
);
608 extern int drmAgpUnbind(int fd
, drm_handle_t handle
);
610 /* AGP/GART info: authenticated client and/or X */
611 extern int drmAgpVersionMajor(int fd
);
612 extern int drmAgpVersionMinor(int fd
);
613 extern unsigned long drmAgpGetMode(int fd
);
614 extern unsigned long drmAgpBase(int fd
); /* Physical location */
615 extern unsigned long drmAgpSize(int fd
); /* Bytes */
616 extern unsigned long drmAgpMemoryUsed(int fd
);
617 extern unsigned long drmAgpMemoryAvail(int fd
);
618 extern unsigned int drmAgpVendorId(int fd
);
619 extern unsigned int drmAgpDeviceId(int fd
);
621 /* PCI scatter/gather support: X server (root) only */
622 extern int drmScatterGatherAlloc(int fd
, unsigned long size
,
623 drm_handle_t
*handle
);
624 extern int drmScatterGatherFree(int fd
, drm_handle_t handle
);
626 extern int drmWaitVBlank(int fd
, drmVBlankPtr vbl
);
628 /* Support routines */
629 extern void drmSetServerInfo(drmServerInfoPtr info
);
630 extern int drmError(int err
, const char *label
);
631 extern void *drmMalloc(int size
);
632 extern void drmFree(void *pt
);
634 /* Hash table routines */
635 extern void *drmHashCreate(void);
636 extern int drmHashDestroy(void *t
);
637 extern int drmHashLookup(void *t
, unsigned long key
, void **value
);
638 extern int drmHashInsert(void *t
, unsigned long key
, void *value
);
639 extern int drmHashDelete(void *t
, unsigned long key
);
640 extern int drmHashFirst(void *t
, unsigned long *key
, void **value
);
641 extern int drmHashNext(void *t
, unsigned long *key
, void **value
);
644 extern void *drmRandomCreate(unsigned long seed
);
645 extern int drmRandomDestroy(void *state
);
646 extern unsigned long drmRandom(void *state
);
647 extern double drmRandomDouble(void *state
);
649 /* Skip list routines */
651 extern void *drmSLCreate(void);
652 extern int drmSLDestroy(void *l
);
653 extern int drmSLLookup(void *l
, unsigned long key
, void **value
);
654 extern int drmSLInsert(void *l
, unsigned long key
, void *value
);
655 extern int drmSLDelete(void *l
, unsigned long key
);
656 extern int drmSLNext(void *l
, unsigned long *key
, void **value
);
657 extern int drmSLFirst(void *l
, unsigned long *key
, void **value
);
658 extern void drmSLDump(void *l
);
659 extern int drmSLLookupNeighbors(void *l
, unsigned long key
,
660 unsigned long *prev_key
, void **prev_value
,
661 unsigned long *next_key
, void **next_value
);
663 extern int drmOpenOnce(void *unused
, const char *BusID
, int *newlyopened
);
664 extern void drmCloseOnce(int fd
);
665 extern void drmMsg(const char *format
, ...);
667 extern int drmSetMaster(int fd
);
668 extern int drmDropMaster(int fd
);