Mesa (master): etnaviv: check for softpin availability on Halti5 devices

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 18 17:11:34 UTC 2019


Module: Mesa
Branch: master
Commit: 5bc3fcf620d428f9413623eee4e14ae753e35b2c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bc3fcf620d428f9413623eee4e14ae753e35b2c

Author: Lucas Stach <l.stach at pengutronix.de>
Date:   Fri Aug  2 14:53:08 2019 +0200

etnaviv: check for softpin availability on Halti5 devices

Halti5 uses texture descriptors to control the samplers, and thus needs to
know the GPU virtual address for the texture buffers to fill into the
descriptor buffer. Without softpin userspace has no control over the GPU
VM and also no way to fix up the texture descriptor buffer, so there is
no point in creating a screen on a Halti5 device without softpin being
available.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
Reviewed-by: Jonathan Marek <jonathan at marek.ca>

---

 src/gallium/drivers/etnaviv/etnaviv_screen.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index d9449cd4ec9..7feb0cd6831 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -897,6 +897,11 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
    if (!etna_get_specs(screen))
       goto fail;
 
+   if (screen->specs.halti >= 5 && !etnaviv_device_softpin_capable(dev)) {
+      DBG("halti5 requires softpin");
+      goto fail;
+   }
+
    screen->options = (nir_shader_compiler_options) {
       .lower_fpow = true,
       .lower_sub = true,




More information about the mesa-commit mailing list