From 58d81d9dc21b8fe719959d97890eb4fb2e390840 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 30 Jun 2017 14:00:01 -0700 Subject: [PATCH] i965: Add a comment about not needing VALGRIND_MALLOCLIKE_BLOCK. At first glance this seems missing, since we handle it manually for CPU and WC maps. Although a bit inconsistent, it's actually not necessary. Thanks to Chris Wilson for explaining this to me. Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index 6cb91f9..abd0722 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c @@ -736,7 +736,9 @@ brw_bo_map_gtt(struct brw_context *brw, struct brw_bo *bo, unsigned flags) return NULL; } - /* and mmap it */ + /* and mmap it. We don't need to use VALGRIND_MALLOCLIKE_BLOCK + * because Valgrind will already intercept this mmap call. + */ bo->map_gtt = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED, bufmgr->fd, mmap_arg.offset); if (bo->map_gtt == MAP_FAILED) { -- 2.7.4