Mesa (master): broadcom/vc4: Skip BO labeling when in simulator mode.

Eric Anholt anholt at kemper.freedesktop.org
Tue Oct 17 19:40:44 UTC 2017


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct 13 12:16:04 2017 -0700

broadcom/vc4: Skip BO labeling when in simulator mode.

It was calling down into i915 trying to label the BO, which is definitely
not the right thing.

---

 src/gallium/drivers/vc4/vc4_bufmgr.c    | 2 +-
 src/gallium/drivers/vc4/vc4_simulator.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index b300fa5bd0..d06d55f864 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -69,7 +69,7 @@ vc4_bo_label(struct vc4_screen *screen, struct vc4_bo *bo, const char *fmt, ...)
                 .len = strlen(name),
                 .name = (uintptr_t)name,
         };
-        drmIoctl(screen->fd, DRM_IOCTL_VC4_LABEL_BO, &label);
+        vc4_ioctl(screen->fd, DRM_IOCTL_VC4_LABEL_BO, &label);
 
         ralloc_free(name);
 }
diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c
index cf9821236f..e70ade7d35 100644
--- a/src/gallium/drivers/vc4/vc4_simulator.c
+++ b/src/gallium/drivers/vc4/vc4_simulator.c
@@ -654,6 +654,10 @@ vc4_simulator_ioctl(int fd, unsigned long request, void *args)
                  */
                 return 0;
 
+        case DRM_IOCTL_VC4_LABEL_BO:
+                /* This is just debug information, nothing to do. */
+                return 0;
+
         case DRM_IOCTL_VC4_GET_TILING:
         case DRM_IOCTL_VC4_SET_TILING:
                 /* Disable these for now, since the sharing with i965 requires




More information about the mesa-commit mailing list