diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drmP.h | 5 | ||||
| -rw-r--r-- | include/drm/drm_crtc.h | 17 | ||||
| -rw-r--r-- | include/uapi/drm/drm.h | 37 | ||||
| -rw-r--r-- | include/uapi/drm/drm_mode.h | 43 |
4 files changed, 73 insertions, 29 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 9ba6a38f54be..2b954adf5bd4 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -433,6 +433,9 @@ struct drm_file { | |||
| 433 | struct drm_master *master; /* master this node is currently associated with | 433 | struct drm_master *master; /* master this node is currently associated with |
| 434 | N.B. not always minor->master */ | 434 | N.B. not always minor->master */ |
| 435 | 435 | ||
| 436 | /* true when the client has asked us to expose stereo 3D mode flags */ | ||
| 437 | bool stereo_allowed; | ||
| 438 | |||
| 436 | /** | 439 | /** |
| 437 | * fbs - List of framebuffers associated with this file. | 440 | * fbs - List of framebuffers associated with this file. |
| 438 | * | 441 | * |
| @@ -1294,6 +1297,8 @@ extern int drm_getstats(struct drm_device *dev, void *data, | |||
| 1294 | struct drm_file *file_priv); | 1297 | struct drm_file *file_priv); |
| 1295 | extern int drm_getcap(struct drm_device *dev, void *data, | 1298 | extern int drm_getcap(struct drm_device *dev, void *data, |
| 1296 | struct drm_file *file_priv); | 1299 | struct drm_file *file_priv); |
| 1300 | extern int drm_setclientcap(struct drm_device *dev, void *data, | ||
| 1301 | struct drm_file *file_priv); | ||
| 1297 | extern int drm_setversion(struct drm_device *dev, void *data, | 1302 | extern int drm_setversion(struct drm_device *dev, void *data, |
| 1298 | struct drm_file *file_priv); | 1303 | struct drm_file *file_priv); |
| 1299 | extern int drm_noop(struct drm_device *dev, void *data, | 1304 | extern int drm_noop(struct drm_device *dev, void *data, |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 92e782060199..ba407f6b4f1f 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -108,6 +108,7 @@ enum drm_mode_status { | |||
| 108 | MODE_ONE_HEIGHT, /* only one height is supported */ | 108 | MODE_ONE_HEIGHT, /* only one height is supported */ |
| 109 | MODE_ONE_SIZE, /* only one resolution is supported */ | 109 | MODE_ONE_SIZE, /* only one resolution is supported */ |
| 110 | MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */ | 110 | MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */ |
| 111 | MODE_NO_STEREO, /* stereo modes not supported */ | ||
| 111 | MODE_UNVERIFIED = -3, /* mode needs to reverified */ | 112 | MODE_UNVERIFIED = -3, /* mode needs to reverified */ |
| 112 | MODE_BAD = -2, /* unspecified reason */ | 113 | MODE_BAD = -2, /* unspecified reason */ |
| 113 | MODE_ERROR = -1 /* error condition */ | 114 | MODE_ERROR = -1 /* error condition */ |
| @@ -124,7 +125,10 @@ enum drm_mode_status { | |||
| 124 | .vscan = (vs), .flags = (f), \ | 125 | .vscan = (vs), .flags = (f), \ |
| 125 | .base.type = DRM_MODE_OBJECT_MODE | 126 | .base.type = DRM_MODE_OBJECT_MODE |
| 126 | 127 | ||
| 127 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ | 128 | #define CRTC_INTERLACE_HALVE_V (1 << 0) /* halve V values for interlacing */ |
| 129 | #define CRTC_STEREO_DOUBLE (1 << 1) /* adjust timings for stereo modes */ | ||
| 130 | |||
| 131 | #define DRM_MODE_FLAG_3D_MAX DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF | ||
| 128 | 132 | ||
| 129 | struct drm_display_mode { | 133 | struct drm_display_mode { |
| 130 | /* Header */ | 134 | /* Header */ |
| @@ -155,8 +159,7 @@ struct drm_display_mode { | |||
| 155 | int height_mm; | 159 | int height_mm; |
| 156 | 160 | ||
| 157 | /* Actual mode we give to hw */ | 161 | /* Actual mode we give to hw */ |
| 158 | int clock_index; | 162 | int crtc_clock; /* in KHz */ |
| 159 | int synth_clock; | ||
| 160 | int crtc_hdisplay; | 163 | int crtc_hdisplay; |
| 161 | int crtc_hblank_start; | 164 | int crtc_hblank_start; |
| 162 | int crtc_hblank_end; | 165 | int crtc_hblank_end; |
| @@ -180,6 +183,11 @@ struct drm_display_mode { | |||
| 180 | int hsync; /* in kHz */ | 183 | int hsync; /* in kHz */ |
| 181 | }; | 184 | }; |
| 182 | 185 | ||
| 186 | static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode) | ||
| 187 | { | ||
| 188 | return mode->flags & DRM_MODE_FLAG_3D_MASK; | ||
| 189 | } | ||
| 190 | |||
| 183 | enum drm_connector_status { | 191 | enum drm_connector_status { |
| 184 | connector_status_connected = 1, | 192 | connector_status_connected = 1, |
| 185 | connector_status_disconnected = 2, | 193 | connector_status_disconnected = 2, |
| @@ -597,6 +605,7 @@ struct drm_connector { | |||
| 597 | int connector_type_id; | 605 | int connector_type_id; |
| 598 | bool interlace_allowed; | 606 | bool interlace_allowed; |
| 599 | bool doublescan_allowed; | 607 | bool doublescan_allowed; |
| 608 | bool stereo_allowed; | ||
| 600 | struct list_head modes; /* list of modes on this connector */ | 609 | struct list_head modes; /* list of modes on this connector */ |
| 601 | 610 | ||
| 602 | enum drm_connector_status status; | 611 | enum drm_connector_status status; |
| @@ -976,7 +985,7 @@ extern void drm_mode_config_reset(struct drm_device *dev); | |||
| 976 | extern void drm_mode_config_cleanup(struct drm_device *dev); | 985 | extern void drm_mode_config_cleanup(struct drm_device *dev); |
| 977 | extern void drm_mode_set_name(struct drm_display_mode *mode); | 986 | extern void drm_mode_set_name(struct drm_display_mode *mode); |
| 978 | extern bool drm_mode_equal(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2); | 987 | extern bool drm_mode_equal(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2); |
| 979 | extern bool drm_mode_equal_no_clocks(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2); | 988 | extern bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2); |
| 980 | extern int drm_mode_width(const struct drm_display_mode *mode); | 989 | extern int drm_mode_width(const struct drm_display_mode *mode); |
| 981 | extern int drm_mode_height(const struct drm_display_mode *mode); | 990 | extern int drm_mode_height(const struct drm_display_mode *mode); |
| 982 | 991 | ||
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index ece867889cc7..9b24d65fed72 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
| @@ -611,12 +611,37 @@ struct drm_gem_open { | |||
| 611 | __u64 size; | 611 | __u64 size; |
| 612 | }; | 612 | }; |
| 613 | 613 | ||
| 614 | #define DRM_CAP_DUMB_BUFFER 0x1 | ||
| 615 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | ||
| 616 | #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 | ||
| 617 | #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 | ||
| 618 | #define DRM_CAP_PRIME 0x5 | ||
| 619 | #define DRM_PRIME_CAP_IMPORT 0x1 | ||
| 620 | #define DRM_PRIME_CAP_EXPORT 0x2 | ||
| 621 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 | ||
| 622 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 | ||
| 623 | |||
| 614 | /** DRM_IOCTL_GET_CAP ioctl argument type */ | 624 | /** DRM_IOCTL_GET_CAP ioctl argument type */ |
| 615 | struct drm_get_cap { | 625 | struct drm_get_cap { |
| 616 | __u64 capability; | 626 | __u64 capability; |
| 617 | __u64 value; | 627 | __u64 value; |
| 618 | }; | 628 | }; |
| 619 | 629 | ||
| 630 | /** | ||
| 631 | * DRM_CLIENT_CAP_STEREO_3D | ||
| 632 | * | ||
| 633 | * if set to 1, the DRM core will expose the stereo 3D capabilities of the | ||
| 634 | * monitor by advertising the supported 3D layouts in the flags of struct | ||
| 635 | * drm_mode_modeinfo. | ||
| 636 | */ | ||
| 637 | #define DRM_CLIENT_CAP_STEREO_3D 1 | ||
| 638 | |||
| 639 | /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ | ||
| 640 | struct drm_set_client_cap { | ||
| 641 | __u64 capability; | ||
| 642 | __u64 value; | ||
| 643 | }; | ||
| 644 | |||
| 620 | #define DRM_CLOEXEC O_CLOEXEC | 645 | #define DRM_CLOEXEC O_CLOEXEC |
| 621 | struct drm_prime_handle { | 646 | struct drm_prime_handle { |
| 622 | __u32 handle; | 647 | __u32 handle; |
| @@ -649,6 +674,7 @@ struct drm_prime_handle { | |||
| 649 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) | 674 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) |
| 650 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) | 675 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) |
| 651 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) | 676 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) |
| 677 | #define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) | ||
| 652 | 678 | ||
| 653 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) | 679 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) |
| 654 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) | 680 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) |
| @@ -774,17 +800,6 @@ struct drm_event_vblank { | |||
| 774 | __u32 reserved; | 800 | __u32 reserved; |
| 775 | }; | 801 | }; |
| 776 | 802 | ||
| 777 | #define DRM_CAP_DUMB_BUFFER 0x1 | ||
| 778 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | ||
| 779 | #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 | ||
| 780 | #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 | ||
| 781 | #define DRM_CAP_PRIME 0x5 | ||
| 782 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 | ||
| 783 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 | ||
| 784 | |||
| 785 | #define DRM_PRIME_CAP_IMPORT 0x1 | ||
| 786 | #define DRM_PRIME_CAP_EXPORT 0x2 | ||
| 787 | |||
| 788 | /* typedef area */ | 803 | /* typedef area */ |
| 789 | #ifndef __KERNEL__ | 804 | #ifndef __KERNEL__ |
| 790 | typedef struct drm_clip_rect drm_clip_rect_t; | 805 | typedef struct drm_clip_rect drm_clip_rect_t; |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 113d32457fa4..c2c4ace3db61 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
| @@ -44,20 +44,35 @@ | |||
| 44 | 44 | ||
| 45 | /* Video mode flags */ | 45 | /* Video mode flags */ |
| 46 | /* bit compatible with the xorg definitions. */ | 46 | /* bit compatible with the xorg definitions. */ |
| 47 | #define DRM_MODE_FLAG_PHSYNC (1<<0) | 47 | #define DRM_MODE_FLAG_PHSYNC (1<<0) |
| 48 | #define DRM_MODE_FLAG_NHSYNC (1<<1) | 48 | #define DRM_MODE_FLAG_NHSYNC (1<<1) |
| 49 | #define DRM_MODE_FLAG_PVSYNC (1<<2) | 49 | #define DRM_MODE_FLAG_PVSYNC (1<<2) |
| 50 | #define DRM_MODE_FLAG_NVSYNC (1<<3) | 50 | #define DRM_MODE_FLAG_NVSYNC (1<<3) |
| 51 | #define DRM_MODE_FLAG_INTERLACE (1<<4) | 51 | #define DRM_MODE_FLAG_INTERLACE (1<<4) |
| 52 | #define DRM_MODE_FLAG_DBLSCAN (1<<5) | 52 | #define DRM_MODE_FLAG_DBLSCAN (1<<5) |
| 53 | #define DRM_MODE_FLAG_CSYNC (1<<6) | ||
