[Mesa-dev] [PATCH kmscube 2/2] drm-atomic: init out_fence_fd to -1

Lucas Stach l.stach at pengutronix.de
Fri Apr 28 16:18:53 UTC 2017


The current initial value of 0 is a valid fd, so this will trip up
the GPU submit on the first render, when used as an IN fence for rendering.

Reported-by: Philipp Zabel <p.zabel at pengutronix.de>
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 drm-atomic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drm-atomic.c b/drm-atomic.c
index c06e52fb25ba..0f3c4f285fb7 100644
--- a/drm-atomic.c
+++ b/drm-atomic.c
@@ -33,8 +33,9 @@
 
 #define VOID2U64(x) ((uint64_t)(unsigned long)(x))
 
-static struct drm drm;
-
+static struct drm drm = {
+	.kms_out_fence_fd = -1,
+};
 
 static int add_connector_property(drmModeAtomicReq *req, uint32_t obj_id,
 					const char *name, uint64_t value)
-- 
2.11.0



More information about the mesa-dev mailing list