From patchwork Mon Mar 13 19:20:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9621889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 413C360244 for ; Mon, 13 Mar 2017 19:21:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28B6E284F4 for ; Mon, 13 Mar 2017 19:21:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D5502850D; Mon, 13 Mar 2017 19:21:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD537284F4 for ; Mon, 13 Mar 2017 19:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753789AbdCMTVR (ORCPT ); Mon, 13 Mar 2017 15:21:17 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33540 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753213AbdCMTVA (ORCPT ); Mon, 13 Mar 2017 15:21:00 -0400 Received: by mail-qk0-f194.google.com with SMTP id j127so38543069qke.0; Mon, 13 Mar 2017 12:20:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AftrMmXev9cMI968ocDPk1tefyeVAmnjj10XnP+EM3U=; b=kYrKgeE2wn6u1+eyUx7el2Ixg2elXNQlqy4Z7D3zznfFyBZO5C7YIpS9s7oV4bwvRn HJtgMbC8LdUFJkvSdtTStkXQh6hFGeXGk7pTTqGQfRlv8zDKl5+nre6wC4R9xE0JVYMO OazDUBSsbUnKNsl7HCcRuHfWroC2mJrHV8X0iN5WAPbKUiWPz/vG+sCq+8CbWKpvtR0+ uubhLAZz5YerKvUhhB8ZBRE8vZSbtCDMqRnpQHlavp8Lh25dNdZ63nUBUS2DG38BdeQZ EjY2vR1mQmhi5OcSp9hxAKnuanI68zUE81BzfRwwGO+qf06JtytIheVqeUV9n5HueNdf letA== X-Gm-Message-State: AMke39mFyrnnZCBch4zbUCnvQwMzbXo1Mw0VNR/npfdVUb5pZfWsoQ0mn/uTp1bub+0TLg== X-Received: by 10.55.155.143 with SMTP id d137mr31446500qke.97.1489432859010; Mon, 13 Mar 2017 12:20:59 -0700 (PDT) Received: from localhost.localdomain ([179.159.9.225]) by smtp.gmail.com with ESMTPSA id a19sm12821047qta.48.2017.03.13.12.20.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 12:20:58 -0700 (PDT) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Laurent Pinchart , Javier Martinez Canillas , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [RFC 06/10] [media] v4l: add V4L2_EVENT_BUF_QUEUED event Date: Mon, 13 Mar 2017 16:20:31 -0300 Message-Id: <20170313192035.29859-7-gustavo@padovan.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170313192035.29859-1-gustavo@padovan.org> References: <20170313192035.29859-1-gustavo@padovan.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Add a new event the userspace can subscribe to receive notifications about when a buffer was enqueued onto the driver. The event provides the index of the enqueued buffer. Signed-off-by: Gustavo Padovan --- include/uapi/linux/videodev2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 3b6cfa6..5b44fd0 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2133,6 +2133,7 @@ struct v4l2_streamparm { #define V4L2_EVENT_FRAME_SYNC 4 #define V4L2_EVENT_SOURCE_CHANGE 5 #define V4L2_EVENT_MOTION_DET 6 +#define V4L2_EVENT_BUF_QUEUED 7 #define V4L2_EVENT_PRIVATE_START 0x08000000 /* Payload for V4L2_EVENT_VSYNC */ @@ -2185,6 +2186,10 @@ struct v4l2_event_motion_det { __u32 region_mask; }; +struct v4l2_event_buf_queued { + __u32 index; +}; + struct v4l2_event { __u32 type; union { @@ -2193,6 +2198,7 @@ struct v4l2_event { struct v4l2_event_frame_sync frame_sync; struct v4l2_event_src_change src_change; struct v4l2_event_motion_det motion_det; + struct v4l2_event_buf_queued buf_queued; __u8 data[64]; } u; __u32 pending;