summaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm/etnaviv_priv.h
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2019-08-02 14:48:09 +0200
committerLucas Stach <[email protected]>2019-10-18 19:05:21 +0200
commit0bdf5420f1ef7174fc81f57c307cd446bb673fc8 (patch)
treed85426fd3b1a7b6858851dc6f978ac0a1690ddb7 /src/etnaviv/drm/etnaviv_priv.h
parente5cc66dfad0a811338ef088b9b4be17cadc01dea (diff)
etnaviv: drm: add softpin interface
If softpin is available on the kernel side, we transparently replace the relocs with self-managed GPU virtual addresses. This allows to skip some work at the kernel side, as it doesn't need to touch the command stream anymore before submitting it to the hardware. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
Diffstat (limited to 'src/etnaviv/drm/etnaviv_priv.h')
-rw-r--r--src/etnaviv/drm/etnaviv_priv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h
index a4b6a9df254..2ab0e473ea9 100644
--- a/src/etnaviv/drm/etnaviv_priv.h
+++ b/src/etnaviv/drm/etnaviv_priv.h
@@ -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;
/*