iris: Fix memzone_for_address for the surface and binder zones
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Jan 2019 20:20:43 +0000 (12:20 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:11 +0000 (10:26 -0800)
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 <tapani.palli@intel.com>
src/gallium/drivers/iris/iris_bufmgr.c

index b4851711b4a7b30882184f9012d6a131800492d6..837908e9ebb47eac89cae5124a503f688b0814a4 100644 (file)
@@ -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;