OSDN Git Service

freedreno: ocd
[android-x86/external-libdrm.git] / intel / intel_bufmgr.h
index 2167e43..a1abbcd 100644 (file)
 #include <stdint.h>
 #include <stdio.h>
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 struct drm_clip_rect;
 
 typedef struct _drm_intel_bufmgr drm_intel_bufmgr;
@@ -61,9 +65,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 +87,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 +117,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,
@@ -149,6 +164,8 @@ int drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
 int drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name);
 int drm_intel_bo_busy(drm_intel_bo *bo);
 int drm_intel_bo_madvise(drm_intel_bo *bo, int madv);
+int drm_intel_bo_use_48b_address_range(drm_intel_bo *bo, uint32_t enable);
+int drm_intel_bo_set_softpin_offset(drm_intel_bo *bo, uint64_t offset);
 
 int drm_intel_bo_disable_reuse(drm_intel_bo *bo);
 int drm_intel_bo_is_reusable(drm_intel_bo *bo);
@@ -171,6 +188,9 @@ int drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo);
 void drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start);
 void drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable);
 
+void
+drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr,
+                                     const char *filename);
 void drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable);
 void drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo,
                                   int x1, int y1, int width, int height,
@@ -241,6 +261,17 @@ void drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
 void drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, FILE *out);
 void drm_intel_decode(struct drm_intel_decode *ctx);
 
+int drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
+                      uint32_t offset,
+                      uint64_t *result);
+
+int drm_intel_get_reset_stats(drm_intel_context *ctx,
+                             uint32_t *reset_count,
+                             uint32_t *active,
+                             uint32_t *pending);
+
+int drm_intel_get_subslice_total(int fd, unsigned int *subslice_total);
+int drm_intel_get_eu_total(int fd, unsigned int *eu_total);
 
 /** @{ Compatibility defines to keep old code building despite the symbol rename
  * from dri_* to drm_intel_*
@@ -283,4 +314,8 @@ void drm_intel_decode(struct drm_intel_decode *ctx);
 
 /** @{ */
 
+#if defined(__cplusplus)
+}
+#endif
+
 #endif /* INTEL_BUFMGR_H */