intel: Add support for userptr objects
[platform/upstream/libdrm.git] / intel / intel_bufmgr.h
index 2eb9742..be83a56 100644 (file)
@@ -61,9 +61,8 @@ struct _drm_intel_bo {
        unsigned long align;
 
        /**
-        * Last seen card virtual address (offset from the beginning of the
-        * aperture) for the object.  This should be used to fill relocation
-        * entries when calling drm_intel_bo_emit_reloc()
+        * Deprecated field containing (possibly the low 32-bits of) the last
+        * seen virtual card address.  Use offset64 instead.
         */
        unsigned long offset;
 
@@ -84,6 +83,13 @@ struct _drm_intel_bo {
         * MM-specific handle for accessing object
         */
        int handle;
+
+       /**
+        * Last seen card virtual address (offset from the beginning of the
+        * aperture) for the object.  This should be used to fill relocation
+        * entries when calling drm_intel_bo_emit_reloc()
+        */
+       uint64_t offset64;
 };
 
 enum aub_dump_bmp_format {
@@ -107,6 +113,11 @@ drm_intel_bo *drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr,
                                            const char *name,
                                            unsigned long size,
                                            unsigned int alignment);
+drm_intel_bo *drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
+                                       const char *name,
+                                       void *addr, uint32_t tiling_mode,
+                                       uint32_t stride, unsigned long size,
+                                       unsigned long flags);
 drm_intel_bo *drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr,
                                       const char *name,
                                       int x, int y, int cpp,