From: Kenneth Graunke Date: Fri, 18 Jan 2019 20:20:43 +0000 (-0800) Subject: iris: Fix memzone_for_address for the surface and binder zones X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f33204f0524390b7428ea68fcc024063e4ef358;p=mesa.git iris: Fix memzone_for_address for the surface and binder zones We use > for IRIS_MEMZONE_DYNAMIC because IRIS_BORDER_COLOR_POOL_ADDRESS lives at the very start of that zone. However, IRIS_MEMZONE_SURFACE and IRIS_MEMZONE_BINDER are normal zones. They used to be a single zone (surface) with a single binder BO at the beginning, similar to the border color pool. But when I moved us to multiple binders, I made them have a real zone (if a small one). So both zones should use >=. Reviewed-by: Tapani Pälli --- diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index b4851711b4a..837908e9ebb 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -259,10 +259,10 @@ memzone_for_address(uint64_t address) if (address > IRIS_MEMZONE_DYNAMIC_START) return IRIS_MEMZONE_DYNAMIC; - if (address > IRIS_MEMZONE_SURFACE_START) + if (address >= IRIS_MEMZONE_SURFACE_START) return IRIS_MEMZONE_SURFACE; - if (address > IRIS_MEMZONE_BINDER_START) + if (address >= IRIS_MEMZONE_BINDER_START) return IRIS_MEMZONE_BINDER; return IRIS_MEMZONE_SHADER;