aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer2016-10-13 02:53:36 -0500
committerMichel Dänzer2016-10-13 02:53:36 -0500
commit9433b702fc164c3fe9e17d646eeaaa5de17a52de (patch)
tree250bd1aa47e1312d7ab155cf4d90a38d72cbecc8 /include
parenta44c9c31b7b38b3eedf3d26648f9e68dcc377c4c (diff)
downloadexternal-libgbm-9433b702fc164c3fe9e17d646eeaaa5de17a52de.tar.gz
external-libgbm-9433b702fc164c3fe9e17d646eeaaa5de17a52de.tar.xz
external-libgbm-9433b702fc164c3fe9e17d646eeaaa5de17a52de.zip
headers: Sync drm{,_mode}.h with the kernel
Generated using make headers_install, based on linus master commit b67be92feb486f800d80d72c67fd87b47b79b18e. Acked-by: Daniel Vetter <daniel@ffwll.ch>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm.h17
-rw-r--r--include/drm/drm_mode.h49
2 files changed, 63 insertions, 3 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index b4ebaa96..f6fd5c2c 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -59,6 +59,10 @@ typedef unsigned long drm_handle_t;
59 59
60#endif 60#endif
61 61
62#if defined(__cplusplus)
63extern "C" {
64#endif
65
62#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ 66#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
63#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ 67#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
64#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ 68#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
@@ -636,6 +640,7 @@ struct drm_gem_open {
636#define DRM_CAP_CURSOR_WIDTH 0x8 640#define DRM_CAP_CURSOR_WIDTH 0x8
637#define DRM_CAP_CURSOR_HEIGHT 0x9 641#define DRM_CAP_CURSOR_HEIGHT 0x9
638#define DRM_CAP_ADDFB2_MODIFIERS 0x10 642#define DRM_CAP_ADDFB2_MODIFIERS 0x10
643#define DRM_CAP_PAGE_FLIP_TARGET 0x11
639 644
640/** DRM_IOCTL_GET_CAP ioctl argument type */ 645/** DRM_IOCTL_GET_CAP ioctl argument type */
641struct drm_get_cap { 646struct drm_get_cap {
@@ -685,8 +690,16 @@ struct drm_prime_handle {
685 __s32 fd; 690 __s32 fd;
686}; 691};
687 692
693#if defined(__cplusplus)
694}
695#endif
696
688#include "drm_mode.h" 697#include "drm_mode.h"
689 698
699#if defined(__cplusplus)
700extern "C" {
701#endif
702
690#define DRM_IOCTL_BASE 'd' 703#define DRM_IOCTL_BASE 'd'
691#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) 704#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
692#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) 705#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
@@ -878,4 +891,8 @@ typedef struct drm_agp_info drm_agp_info_t;
878typedef struct drm_scatter_gather drm_scatter_gather_t; 891typedef struct drm_scatter_gather drm_scatter_gather_t;
879typedef struct drm_set_version drm_set_version_t; 892typedef struct drm_set_version drm_set_version_t;
880 893
894#if defined(__cplusplus)
895}
896#endif
897
881#endif 898#endif
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 7a7856e0..df0e3504 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -29,6 +29,10 @@
29 29
30#include "drm.h" 30#include "drm.h"
31 31
32#if defined(__cplusplus)
33extern "C" {
34#endif
35
32#define DRM_DISPLAY_INFO_LEN 32 36#define DRM_DISPLAY_INFO_LEN 32
33#define DRM_CONNECTOR_NAME_LEN 32 37#define DRM_CONNECTOR_NAME_LEN 32
34#define DRM_DISPLAY_MODE_LEN 32 38#define DRM_DISPLAY_MODE_LEN 32
@@ -202,6 +206,7 @@ struct drm_mode_get_plane_res {
202#define DRM_MODE_ENCODER_VIRTUAL 5 206#define DRM_MODE_ENCODER_VIRTUAL 5
203#define DRM_MODE_ENCODER_DSI 6 207#define DRM_MODE_ENCODER_DSI 6
204#define DRM_MODE_ENCODER_DPMST 7 208#define DRM_MODE_ENCODER_DPMST 7
209#define DRM_MODE_ENCODER_DPI 8
205 210
206struct drm_mode_get_encoder { 211struct drm_mode_get_encoder {
207 __u32 encoder_id; 212 __u32 encoder_id;
@@ -241,6 +246,7 @@ struct drm_mode_get_encoder {
241#define DRM_MODE_CONNECTOR_eDP 14 246#define DRM_MODE_CONNECTOR_eDP 14
242#define DRM_MODE_CONNECTOR_VIRTUAL 15 247#define DRM_MODE_CONNECTOR_VIRTUAL 15
243#define DRM_MODE_CONNECTOR_DSI 16 248#define DRM_MODE_CONNECTOR_DSI 16
249#define DRM_MODE_CONNECTOR_DPI 17
244 250
245struct drm_mode_get_connector { 251struct drm_mode_get_connector {
246 252
@@ -514,7 +520,13 @@ struct drm_color_lut {
514 520
515#define DRM_MODE_PAGE_FLIP_EVENT 0x01 521#define DRM_MODE_PAGE_FLIP_EVENT 0x01
516#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 522#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
517#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC) 523#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
524#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
525#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
526 DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
527#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \
528 DRM_MODE_PAGE_FLIP_ASYNC | \
529 DRM_MODE_PAGE_FLIP_TARGET)
518 530
519/* 531/*
520 * Request a page flip on the specified crtc. 532 * Request a page flip on the specified crtc.
@@ -537,8 +549,7 @@ struct drm_color_lut {
537 * 'as soon as possible', meaning that it not delay waiting for vblank. 549 * 'as soon as possible', meaning that it not delay waiting for vblank.
538 * This may cause tearing on the screen. 550 * This may cause tearing on the screen.
539 * 551 *
540 * The reserved field must be zero until we figure out something 552 * The reserved field must be zero.
541 * clever to use it for.
542 */ 553 */
543 554
544struct drm_mode_crtc_page_flip { 555struct drm_mode_crtc_page_flip {
@@ -549,6 +560,34 @@ struct drm_mode_crtc_page_flip {
549 __u64 user_data; 560 __u64 user_data;
550}; 561};
551 562
563/*
564 * Request a page flip on the specified crtc.
565 *
566 * Same as struct drm_mode_crtc_page_flip, but supports new flags and
567 * re-purposes the reserved field:
568 *
569 * The sequence field must be zero unless either of the
570 * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
571 * the ABSOLUTE flag is specified, the sequence field denotes the absolute
572 * vblank sequence when the flip should take effect. When the RELATIVE
573 * flag is specified, the sequence field denotes the relative (to the
574 * current one when the ioctl is called) vblank sequence when the flip
575 * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
576 * make sure the vblank sequence before the target one has passed before
577 * calling this ioctl. The purpose of the
578 * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
579 * the target for when code dealing with a page flip runs during a
580 * vertical blank period.
581 */
582
583struct drm_mode_crtc_page_flip_target {
584 __u32 crtc_id;
585 __u32 fb_id;
586 __u32 flags;
587 __u32 sequence;
588 __u64 user_data;
589};
590
552/* create a dumb scanout buffer */ 591/* create a dumb scanout buffer */
553struct drm_mode_create_dumb { 592struct drm_mode_create_dumb {
554 __u32 height; 593 __u32 height;
@@ -621,4 +660,8 @@ struct drm_mode_destroy_blob {
621 __u32 blob_id; 660 __u32 blob_id;
622}; 661};
623 662
663#if defined(__cplusplus)
664}
665#endif
666
624#endif 667#endif