panvk: Rely on supported_bo_flags to mask PAN_KMOD_BO_FLAG_GPU_UNCACHED
Now that we have it hooked up at the props level, we can filter this flag out in panvk_device_adjust_bo_flags() and use this helper when creating our uncached mempool. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
This commit is contained in:
@@ -150,6 +150,10 @@ panvk_device_adjust_bo_flags(const struct panvk_device *device,
|
||||
if (PANVK_DEBUG(DUMP) || PANVK_DEBUG(TRACE))
|
||||
bo_flags &= ~PAN_KMOD_BO_FLAG_NO_MMAP;
|
||||
|
||||
if (!(device->kmod.dev->props.supported_bo_flags &
|
||||
PAN_KMOD_BO_FLAG_GPU_UNCACHED))
|
||||
bo_flags &= ~PAN_KMOD_BO_FLAG_GPU_UNCACHED;
|
||||
|
||||
return bo_flags;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ panvk_device_init_mempools(struct panvk_device *dev)
|
||||
panvk_pool_init(&dev->mempools.rw, dev, NULL, NULL, &rw_pool_props);
|
||||
|
||||
struct panvk_pool_properties rw_nc_pool_props = {
|
||||
.create_flags = PAN_ARCH <= 9 ? 0 : PAN_KMOD_BO_FLAG_GPU_UNCACHED,
|
||||
.create_flags =
|
||||
panvk_device_adjust_bo_flags(dev, PAN_KMOD_BO_FLAG_GPU_UNCACHED),
|
||||
.slab_size = 16 * 1024,
|
||||
.label = "Device RW uncached memory pool",
|
||||
.owns_bos = false,
|
||||
|
||||
Reference in New Issue
Block a user