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.za...@pengutronix.de>
Signed-off-by: Lucas Stach <l.st...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to