From patchwork Fri Jun 16 07:39:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9790791 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 F065960326 for ; Fri, 16 Jun 2017 07:39:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4C65280B0 for ; Fri, 16 Jun 2017 07:39:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9B462857E; Fri, 16 Jun 2017 07:39:42 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 9835B280B0 for ; Fri, 16 Jun 2017 07:39:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768AbdFPHjk (ORCPT ); Fri, 16 Jun 2017 03:39:40 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33367 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbdFPHjj (ORCPT ); Fri, 16 Jun 2017 03:39:39 -0400 Received: by mail-pf0-f196.google.com with SMTP id w12so4720045pfk.0 for ; Fri, 16 Jun 2017 00:39:39 -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=uUVaFUOUmNbF60geRrDiaDTFTA7nY3oJ5ab8JGuiyDg=; b=fxe0+YqfoNbZBWI1V825mhW19wCgAJTtuSFF1b9lyRw4HyeJKSHpUe6AZFM3idWJNM Gf93vNVIa3/7up6iUIA6BBkzTfjZAe4wftIH6OvChL5810c305VCi+hl1pH5fHrRDEkS Y60HOuNpkiyrRrRNLqTnuHWVbiuSEY6CAM1zybMyNIFNv9pyBZiArEK6aYO1NVuCcXBr 01fQSkNki5DR3IgtRhxN8iGXvoubuzGgbTF3WkK3dTt7qsD8vCqCLwIV5erlr8fZlo+Z gcpay/Zgg7JHDoj3FswTE8U9Q1qHNzj0zjLO7Z28bYPWMyo8KIakCNie9tRpnGHrxAY7 +wEg== X-Gm-Message-State: AKS2vOwKLMd7K9K3WU72y+yDGe/0Rqj2mEIpJmw450hcH+6S3CblqQmP VWJZJ7sM1E/neokyoRo= X-Received: by 10.84.218.76 with SMTP id f12mr10897155plm.269.1497598778729; Fri, 16 Jun 2017 00:39:38 -0700 (PDT) Received: from jade.nodan1.kt.home.ne.jp (202-72-64-244.koalanet.ne.jp. [202.72.64.244]) by smtp.gmail.com with ESMTPSA id a2sm2760568pfj.8.2017.06.16.00.39.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 00:39:38 -0700 (PDT) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Javier Martinez Canillas , Mauro Carvalho Chehab , Shuah Khan , Gustavo Padovan Subject: [PATCH 06/12] [media] v4l: add V4L2_EVENT_BUF_QUEUED event Date: Fri, 16 Jun 2017 16:39:09 +0900 Message-Id: <20170616073915.5027-7-gustavo@padovan.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170616073915.5027-1-gustavo@padovan.org> References: <20170616073915.5027-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 when a buffer is queued onto the driver. The event provides the index of the queued 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 750d511..c2eda75 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2150,6 +2150,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 */ @@ -2202,6 +2203,10 @@ struct v4l2_event_motion_det { __u32 region_mask; }; +struct v4l2_event_buf_queued { + __u32 index; +}; + struct v4l2_event { __u32 type; union { @@ -2210,6 +2215,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;