[PATCH] drm/vmwgfx: reserve fence slots on new resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux