From f5d5114d9da2e9bea5f54500d2747bdcf185142d Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 17 Feb 2022 11:35:30 +0100 Subject: [PATCH] clients/simple-dmabuf-*: Increase buffer limit to four In certain situations these clients crash a lot due to the low buffer limit. Four buffers is also what EGL allows without blocking and what is arguably the upper limit of what a compositor should demand. Signed-off-by: Robert Mader (cherry picked from commit 3e6ef529f812ee1d21f7cf92279e29421cf87200) --- clients/simple-dmabuf-egl.c | 2 +- clients/simple-dmabuf-feedback.c | 2 +- clients/simple-dmabuf-v4l.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/simple-dmabuf-egl.c b/clients/simple-dmabuf-egl.c index 33df4cf9..ef0d9de6 100644 --- a/clients/simple-dmabuf-egl.c +++ b/clients/simple-dmabuf-egl.c @@ -131,7 +131,7 @@ struct buffer { int release_fence_fd; }; -#define NUM_BUFFERS 3 +#define NUM_BUFFERS 4 struct window { struct display *display; diff --git a/clients/simple-dmabuf-feedback.c b/clients/simple-dmabuf-feedback.c index 43e5670f..7a58594c 100644 --- a/clients/simple-dmabuf-feedback.c +++ b/clients/simple-dmabuf-feedback.c @@ -47,7 +47,7 @@ #include #include -#define NUM_BUFFERS 3 +#define NUM_BUFFERS 4 /* We have to hack the DRM-backend to pretend that planes of the underlying * hardware don't support this format. If you change the value of this constant, diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c index 85dd7a3d..a19570f9 100644 --- a/clients/simple-dmabuf-v4l.c +++ b/clients/simple-dmabuf-v4l.c @@ -127,7 +127,7 @@ struct buffer { int data_offsets[VIDEO_MAX_PLANES]; }; -#define NUM_BUFFERS 3 +#define NUM_BUFFERS 4 struct window { struct display *display;