diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-10-31 12:13:10 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-31 12:13:10 -0400 |
commit | 7b3b6e42032e94a6132a85642e95106f5346650e (patch) | |
tree | 8b2262291341d8a9f9b1e7e3c63a3289bb6c6de6 /include/drm/drm.h | |
parent | 04172c0b9ea5861e5cba7909da5297b3aedac9e1 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into topic/asoc
Diffstat (limited to 'include/drm/drm.h')
-rw-r--r-- | include/drm/drm.h | 63 |
1 files changed, 46 insertions, 17 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h index 38d3c6b8276a..f46ba4b57da4 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #ifndef _DRM_H_ | 36 | #ifndef _DRM_H_ |
37 | #define _DRM_H_ | 37 | #define _DRM_H_ |
38 | 38 | ||
39 | #if defined(__linux__) | ||
40 | #if defined(__KERNEL__) | 39 | #if defined(__KERNEL__) |
41 | #endif | 40 | #endif |
42 | #include <asm/ioctl.h> /* For _IO* macros */ | 41 | #include <asm/ioctl.h> /* For _IO* macros */ |
@@ -46,22 +45,6 @@ | |||
46 | #define DRM_IOC_WRITE _IOC_WRITE | 45 | #define DRM_IOC_WRITE _IOC_WRITE |
47 | #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE | 46 | #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE |
48 | #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) | 47 | #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) |
49 | #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) | ||
50 | #if defined(__FreeBSD__) && defined(IN_MODULE) | ||
51 | /* Prevent name collision when including sys/ioccom.h */ | ||
52 | #undef ioctl | ||
53 | #include <sys/ioccom.h> | ||
54 | #define ioctl(a,b,c) xf86ioctl(a,b,c) | ||
55 | #else | ||
56 | #include <sys/ioccom.h> | ||
57 | #endif /* __FreeBSD__ && xf86ioctl */ | ||
58 | #define DRM_IOCTL_NR(n) ((n) & 0xff) | ||
59 | #define DRM_IOC_VOID IOC_VOID | ||
60 | #define DRM_IOC_READ IOC_OUT | ||
61 | #define DRM_IOC_WRITE IOC_IN | ||
62 | #define DRM_IOC_READWRITE IOC_INOUT | ||
63 | #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) | ||
64 | #endif | ||
65 | 48 | ||
66 | #define DRM_MAJOR 226 | 49 | #define DRM_MAJOR 226 |
67 | #define DRM_MAX_MINOR 15 | 50 | #define DRM_MAX_MINOR 15 |
@@ -471,6 +454,7 @@ struct drm_irq_busid { | |||
471 | enum drm_vblank_seq_type { | 454 | enum drm_vblank_seq_type { |
472 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ | 455 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ |
473 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ | 456 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ |
457 | _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ | ||
474 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ | 458 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ |
475 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ | 459 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ |
476 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ | 460 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ |
@@ -503,6 +487,19 @@ union drm_wait_vblank { | |||
503 | struct drm_wait_vblank_reply reply; | 487 | struct drm_wait_vblank_reply reply; |
504 | }; | 488 | }; |
505 | 489 | ||
490 | #define _DRM_PRE_MODESET 1 | ||
491 | #define _DRM_POST_MODESET 2 | ||
492 | |||
493 | /** | ||
494 | * DRM_IOCTL_MODESET_CTL ioctl argument type | ||
495 | * | ||
496 | * \sa drmModesetCtl(). | ||
497 | */ | ||
498 | struct drm_modeset_ctl { | ||
499 | uint32_t crtc; | ||
500 | uint32_t cmd; | ||
501 | }; | ||
502 | |||
506 | /** | 503 | /** |
507 | * DRM_IOCTL_AGP_ENABLE ioctl argument type. | 504 | * DRM_IOCTL_AGP_ENABLE ioctl argument type. |
508 | * | 505 | * |
@@ -573,6 +570,34 @@ struct drm_set_version { | |||
573 | int drm_dd_minor; | 570 | int drm_dd_minor; |
574 | }; | 571 | }; |
575 | 572 | ||
573 | /** DRM_IOCTL_GEM_CLOSE ioctl argument type */ | ||
574 | struct drm_gem_close { | ||
575 | /** Handle of the object to be closed. */ | ||
576 | uint32_t handle; | ||
577 | uint32_t pad; | ||
578 | }; | ||
579 | |||
580 | /** DRM_IOCTL_GEM_FLINK ioctl argument type */ | ||
581 | struct drm_gem_flink { | ||
582 | /** Handle for the object being named */ | ||
583 | uint32_t handle; | ||
584 | |||
585 | /** Returned global name */ | ||
586 | uint32_t name; | ||
587 | }; | ||
588 | |||
589 | /** DRM_IOCTL_GEM_OPEN ioctl argument type */ | ||
590 | struct drm_gem_open { | ||
591 | /** Name of object being opened */ | ||
592 | uint32_t name; | ||
593 | |||
594 | /** Returned handle for the object */ | ||
595 | uint32_t handle; | ||
596 | |||
597 | /** Returned size of the object */ | ||
598 | uint64_t size; | ||
599 | }; | ||
600 | |||
576 | #define DRM_IOCTL_BASE 'd' | 601 | #define DRM_IOCTL_BASE 'd' |
577 | #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) | 602 | #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) |
578 | #define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) | 603 | #define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) |
@@ -587,6 +612,10 @@ struct drm_set_version { | |||
587 | #define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) | 612 | #define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) |
588 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) | 613 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) |
589 | #define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) | 614 | #define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) |
615 | #define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) | ||
616 | #define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) | ||
617 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) | ||
618 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) | ||
590 | 619 | ||
591 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) | 620 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) |
592 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) | 621 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) |