From 5a770bbce1427f204f0c10da736918bbe9bc0b98 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 24 Feb 2013 08:46:48 +0100 Subject: v4l2-drm-example: Don't enqueue initial page flip There's no need to enqueue an initial page flip. Don't do it. Signed-off-by: Laurent Pinchart --- v4l2-drm-example/dmabuf-sharing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'v4l2-drm-example') diff --git a/v4l2-drm-example/dmabuf-sharing.c b/v4l2-drm-example/dmabuf-sharing.c index 6c7abe5..0483f27 100644 --- a/v4l2-drm-example/dmabuf-sharing.c +++ b/v4l2-drm-example/dmabuf-sharing.c @@ -482,9 +482,9 @@ int main(int argc, char *argv[]) &drm.con_id, 1, &drm.mode); BYE_ON(ret, "drmModeSetCrtc failed: %s\n", ERRSTR); - /* Enqueue the first buffer to DRM and all other buffers to V4L2 */ - drm_page_flip(&drm, &buffers[0]); - + /* The first buffer is used for the initial CRTC frame buffer. Enqueue + * all others to V4L2. + */ for (unsigned int i = 1; i < s.buffer_count; ++i) v4l2_queue_buffer(&v4l2, &buffers[i]); @@ -499,7 +499,7 @@ int main(int argc, char *argv[]) /* buffer currently used by drm */ stream.v4l2 = &v4l2; - stream.current_buffer = -1; + stream.current_buffer = 0; stream.buffers = buffers; stream.num_buffers = s.buffer_count; -- cgit v1.2.3