OSDN Git Service

Android: update CleanSpec.mk
[android-x86/external-libdrm.git] / xf86drmMode.h
index 5b390d9..3cd27ae 100644 (file)
@@ -369,15 +369,16 @@ extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
                        uint32_t *buf_id);
 /* ...with a specific pixel format */
 extern int drmModeAddFB2(int fd, uint32_t width, uint32_t height,
-                        uint32_t pixel_format, uint32_t bo_handles[4],
-                        uint32_t pitches[4], uint32_t offsets[4],
+                        uint32_t pixel_format, const uint32_t bo_handles[4],
+                        const uint32_t pitches[4], const uint32_t offsets[4],
                         uint32_t *buf_id, uint32_t flags);
 
 /* ...with format modifiers */
 int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height,
-                              uint32_t pixel_format, uint32_t bo_handles[4],
-                              uint32_t pitches[4], uint32_t offsets[4],
-                              uint64_t modifier[4], uint32_t *buf_id, uint32_t flags);
+                              uint32_t pixel_format, const uint32_t bo_handles[4],
+                              const uint32_t pitches[4], const uint32_t offsets[4],
+                              const uint64_t modifier[4], uint32_t *buf_id,
+                                  uint32_t flags);
 
 /**
  * Destroies the given framebuffer.
@@ -520,6 +521,28 @@ extern int drmModeCreatePropertyBlob(int fd, const void *data, size_t size,
                                     uint32_t *id);
 extern int drmModeDestroyPropertyBlob(int fd, uint32_t id);
 
+/*
+ * DRM mode lease APIs. These create and manage new drm_masters with
+ * access to a subset of the available DRM resources
+ */
+
+extern int drmModeCreateLease(int fd, const uint32_t *objects, int num_objects, int flags, uint32_t *lessee_id);
+
+typedef struct drmModeLesseeList {
+       uint32_t count;
+       uint32_t lessees[0];
+} drmModeLesseeListRes, *drmModeLesseeListPtr;
+
+extern drmModeLesseeListPtr drmModeListLessees(int fd);
+
+typedef struct drmModeObjectList {
+       uint32_t count;
+       uint32_t objects[0];
+} drmModeObjectListRes, *drmModeObjectListPtr;
+
+extern drmModeObjectListPtr drmModeGetLease(int fd);
+
+extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
 
 #if defined(__cplusplus)
 }