[PATCH] drm/vmwgfx: reserve fence slots on new resources
Christian König
ckoenig.leichtzumerken at gmail.com
Fri Apr 22 09:20:02 UTC 2022
When resources are allocated dynamically during an IOCTL we need to make sure
that a fence slot is reserved so that the resulting fence can be added in the
end.
Signed-off-by: Christian König <christian.koenig at amd.com>
Fixes: c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot mandatory v4")
---
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index a7d62a4eb47b..edce228f737c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -399,6 +399,10 @@ static int vmw_resource_do_validate(struct vmw_resource *res,
ret = func->create(res);
if (unlikely(ret != 0))
return ret;
+
+ ret = dma_resv_reserve_fences(res->backup->base.base.resv, 1);
+ if (unlikely(ret))
+ goto out_bind_failed;
}
if (func->bind &&
--
2.25.1
More information about the dri-devel
mailing list