From: Kenneth Graunke Date: Fri, 30 Jun 2017 21:00:01 +0000 (-0700) Subject: i965: Add a comment about not needing VALGRIND_MALLOCLIKE_BLOCK. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58d81d9dc21b8fe719959d97890eb4fb2e390840;p=mesa.git 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 --- diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index 6cb91f9a23a..abd0722ba6e 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) {