summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-02-06 23:42:34 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-02-06 23:42:34 +0000
commit4405a390febcaa372b13da893a680890bbea8cb1 (patch)
tree0dfddcac64b4ccee795b37f34e64fb951c263cf8 /sys/dev
parente04ae057e0c0cf6928302a099914f4637b856640 (diff)
Add new definitions from libdrm 2.4.59
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drm.h27
-rw-r--r--sys/dev/pci/drm/drm_mode.h20
2 files changed, 43 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drm.h b/sys/dev/pci/drm/drm.h
index 30ee9ae137a..28b5ecf2cfb 100644
--- a/sys/dev/pci/drm/drm.h
+++ b/sys/dev/pci/drm/drm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm.h,v 1.16 2014/08/14 03:57:44 jsg Exp $ */
+/* $OpenBSD: drm.h,v 1.17 2015/02/06 23:42:33 jsg Exp $ */
/**
* \file drm.h
* Header for the Direct Rendering Manager
@@ -48,6 +48,19 @@
#endif
#include <sys/ioccom.h>
+#include <sys/types.h>
+#ifndef _KERNEL
+typedef int8_t __s8;
+typedef uint8_t __u8;
+typedef int16_t __s16;
+typedef uint16_t __u16;
+typedef int32_t __s32;
+typedef uint32_t __u32;
+typedef int64_t __s64;
+typedef uint64_t __u64;
+#endif
+typedef unsigned long drm_handle_t;
+
#define DRM_IOCTL_NR(n) ((n) & 0xff)
#define DRM_IOC_VOID IOC_VOID
#define DRM_IOC_READ IOC_OUT
@@ -73,8 +86,6 @@
#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
-#include <sys/types.h>
-typedef unsigned long drm_handle_t; /**< To mapped regions */
typedef unsigned int drm_context_t; /**< GLXContext handle */
typedef unsigned int drm_drawable_t;
typedef unsigned int drm_magic_t; /**< Magic for authentication */
@@ -96,6 +107,14 @@ struct drm_clip_rect {
};
/**
+ * Drawable information.
+ */
+struct drm_drawable_info {
+ unsigned int num_rects;
+ struct drm_clip_rect *rects;
+};
+
+/**
* Texture region,
*/
struct drm_tex_region {
@@ -806,6 +825,7 @@ struct drm_event_vblank {
/* typedef area */
#ifndef __KERNEL__
typedef struct drm_clip_rect drm_clip_rect_t;
+typedef struct drm_drawable_info drm_drawable_info_t;
typedef struct drm_tex_region drm_tex_region_t;
typedef struct drm_hw_lock drm_hw_lock_t;
typedef struct drm_version drm_version_t;
@@ -839,6 +859,7 @@ typedef struct drm_update_draw drm_update_draw_t;
typedef struct drm_auth drm_auth_t;
typedef struct drm_irq_busid drm_irq_busid_t;
typedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
+
typedef struct drm_agp_buffer drm_agp_buffer_t;
typedef struct drm_agp_binding drm_agp_binding_t;
typedef struct drm_agp_info drm_agp_info_t;
diff --git a/sys/dev/pci/drm/drm_mode.h b/sys/dev/pci/drm/drm_mode.h
index 9ed0c13779a..60a7bf22137 100644
--- a/sys/dev/pci/drm/drm_mode.h
+++ b/sys/dev/pci/drm/drm_mode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_mode.h,v 1.5 2014/01/18 08:25:06 jsg Exp $ */
+/* $OpenBSD: drm_mode.h,v 1.6 2015/02/06 23:42:33 jsg Exp $ */
/*
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
@@ -175,6 +175,8 @@ struct drm_mode_get_plane_res {
#define DRM_MODE_ENCODER_LVDS 3
#define DRM_MODE_ENCODER_TVDAC 4
#define DRM_MODE_ENCODER_VIRTUAL 5
+#define DRM_MODE_ENCODER_DSI 6
+#define DRM_MODE_ENCODER_DPMST 7
struct drm_mode_get_encoder {
uint32_t encoder_id;
@@ -213,6 +215,7 @@ struct drm_mode_get_encoder {
#define DRM_MODE_CONNECTOR_TV 13
#define DRM_MODE_CONNECTOR_eDP 14
#define DRM_MODE_CONNECTOR_VIRTUAL 15
+#define DRM_MODE_CONNECTOR_DSI 16
struct drm_mode_get_connector {
@@ -242,6 +245,21 @@ struct drm_mode_get_connector {
#define DRM_MODE_PROP_BLOB (1<<4)
#define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */
+/* non-extended types: legacy bitmask, one bit per type: */
+#define DRM_MODE_PROP_LEGACY_TYPE ( \
+ DRM_MODE_PROP_RANGE | \
+ DRM_MODE_PROP_ENUM | \
+ DRM_MODE_PROP_BLOB | \
+ DRM_MODE_PROP_BITMASK)
+
+/* extended-types: rather than continue to consume a bit per type,
+ * grab a chunk of the bits to use as integer type id.
+ */
+#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0
+#define DRM_MODE_PROP_TYPE(n) ((n) << 6)
+#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1)
+#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2)
+
struct drm_mode_property_enum {
uint64_t value;
char name[DRM_PROP_NAME_LEN];