summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-02-21 11:49:03 -0500
committerRob Clark <robdclark@gmail.com>2017-02-21 11:49:03 -0500
commitc6a1571a9b6a55b6d00040bac6172ffb4fd2d3b8 (patch)
tree0cf0f3ba17ed5b4ee6893d7916e68e036d84d3be /common.h
parent9180f2feccc3f98b68f42cb0c8687ada74a78685 (diff)
downloadkmscube-c6a1571a9b6a55b6d00040bac6172ffb4fd2d3b8.tar.gz
split gbm out
Diffstat (limited to 'common.h')
-rw-r--r--common.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..8f3a827
--- /dev/null
+++ b/common.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017 Rob Clark <rclark@redhat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _COMMON_H
+#define _COMMON_H
+
+#include <gbm.h>
+
+struct gbm {
+ struct gbm_device *dev;
+ struct gbm_surface *surface;
+};
+
+const struct gbm * init_gbm(int drm_fd, int w, int h);
+
+#endif /* _COMMON_H */