diff options
author | Lucas Stach <[email protected]> | 2019-08-02 14:48:09 +0200 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2019-10-18 19:05:21 +0200 |
commit | 0bdf5420f1ef7174fc81f57c307cd446bb673fc8 (patch) | |
tree | d85426fd3b1a7b6858851dc6f978ac0a1690ddb7 /src/etnaviv/drm/etnaviv_drmif.h | |
parent | e5cc66dfad0a811338ef088b9b4be17cadc01dea (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_drmif.h')
-rw-r--r-- | src/etnaviv/drm/etnaviv_drmif.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etnaviv/drm/etnaviv_drmif.h b/src/etnaviv/drm/etnaviv_drmif.h index ff08ab50dbc..c2dd034cc2e 100644 --- a/src/etnaviv/drm/etnaviv_drmif.h +++ b/src/etnaviv/drm/etnaviv_drmif.h @@ -28,6 +28,7 @@ #define ETNAVIV_DRMIF_H_ #include <xf86drm.h> +#include <stdbool.h> #include <stdint.h> struct etna_bo; @@ -92,6 +93,7 @@ struct etna_device *etna_device_new_dup(int fd); struct etna_device *etna_device_ref(struct etna_device *dev); void etna_device_del(struct etna_device *dev); int etna_device_fd(struct etna_device *dev); +bool etnaviv_device_softpin_capable(struct etna_device *dev); /* gpu functions: */ @@ -124,6 +126,7 @@ int etna_bo_get_name(struct etna_bo *bo, uint32_t *name); uint32_t etna_bo_handle(struct etna_bo *bo); int etna_bo_dmabuf(struct etna_bo *bo); uint32_t etna_bo_size(struct etna_bo *bo); +uint32_t etna_bo_gpu_va(struct etna_bo *bo); void * etna_bo_map(struct etna_bo *bo); int etna_bo_cpu_prep(struct etna_bo *bo, uint32_t op); void etna_bo_cpu_fini(struct etna_bo *bo); @@ -192,6 +195,8 @@ struct etna_reloc { }; void etna_cmd_stream_reloc(struct etna_cmd_stream *stream, const struct etna_reloc *r); +void etna_cmd_stream_ref_bo(struct etna_cmd_stream *stream, + struct etna_bo *bo, uint32_t flags); /* performance monitoring functions: */ |