etnaviv: drm: add softpin interface
[mesa.git] / src / etnaviv / drm / etnaviv_priv.h
index 0c770f705407c07ae5aa31396c0bf573b6502c1d..2ab0e473ea919cfeb978c00edc43b5c8acc370be 100644 (file)
@@ -44,6 +44,7 @@
 #include "util/macros.h"
 #include "util/u_atomic.h"
 #include "util/u_debug.h"
+#include "util/vma.h"
 
 #include "etnaviv_drmif.h"
 #include "drm-uapi/etnaviv_drm.h"
@@ -76,6 +77,9 @@ struct etna_device {
 
        struct etna_bo_cache bo_cache;
 
+       int use_softpin;
+       struct util_vma_heap address_space;
+
        int closefd;        /* call close(fd) upon destruction */
 };
 
@@ -97,6 +101,7 @@ struct etna_bo {
        uint32_t        flags;
        uint32_t        name;           /* flink global handle (DRI2 name) */
        uint64_t        offset;         /* offset to mmap() */
+       uint32_t        va;             /* GPU virtual address */
        int             refcnt;
 
        /*
@@ -150,8 +155,8 @@ struct etna_cmd_stream_priv {
        uint32_t nr_bos, max_bos;
 
        /* notify callback if buffer reset happened */
-       void (*reset_notify)(struct etna_cmd_stream *stream, void *priv);
-       void *reset_notify_priv;
+       void (*force_flush)(struct etna_cmd_stream *stream, void *priv);
+       void *force_flush_priv;
 
        void *bo_table;
 };