From patchwork Fri Oct 20 21:50:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo F. Padovan" X-Patchwork-Id: 45073 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5fFB-0001pv-CT; Fri, 20 Oct 2017 21:54:17 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753262AbdJTVus (ORCPT + 1 other); Fri, 20 Oct 2017 17:50:48 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:45870 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753184AbdJTVuo (ORCPT ); Fri, 20 Oct 2017 17:50:44 -0400 Received: by mail-qt0-f196.google.com with SMTP id p1so20181421qtg.2; Fri, 20 Oct 2017 14:50:44 -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=jlqt+0gVIdJBUMcKA78nEQb9GzqMQX6ZQnCVwJ0cEQY=; b=CaOfjg3oHvRKMQ40SBN6rI7FjR53OQcYQONndIVAsPvWZCct/UJrmtWQNfyAHVBoyg c/J2/zHDASA70uGfbO5k74srl/ErWSQazpU/k2DjBeAI1KBMHSQPrrA2ZcmvJKLUAzJv 7DzAfznngukC2ZTmqo45LSlgEu0Nf7MNz6ESCP/gdwjUOlE8jp3GmHvDqyY3r3X/aE2p lHmxCanns6vYzCuqXfts3UKI0YLLgYaznDWqJBUi2NJf9j2XtULLIVBrjv+1jFQc1gXU XG3Sl+OvNGwyTSq/JHvBnIGviL9jj6dN1ZlYx5+ry2DzFUOHWEpYPNTcGPfzG0RmWRA4 1rHA== X-Gm-Message-State: AMCzsaXNGh9+FnmXpBo3ry320QzIT6a8P3n9Fv7Xi+ifTF6Rx7yboEJn gPkEPuRGBAp1f8uowpeqbkS9yxE8 X-Google-Smtp-Source: ABhQp+Q56aW1ftNrLAoU7+yOP7KgHUUYyJTg7By38pMIYjeX1qKWsSbX24WZ+s7vRw876Rc1+dfy4A== X-Received: by 10.200.22.12 with SMTP id p12mr9003768qtj.142.1508536243948; Fri, 20 Oct 2017 14:50:43 -0700 (PDT) Received: from localhost.localdomain (189-19-125-192.dsl.telesp.net.br. [189.19.125.192]) by smtp.gmail.com with ESMTPSA id j4sm1167039qkf.75.2017.10.20.14.50.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 14:50:43 -0700 (PDT) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [RFC v4 06/17] [media] vb2: add .send_out_fence() to notify userspace of out_fence_fd Date: Fri, 20 Oct 2017 19:50:01 -0200 Message-Id: <20171020215012.20646-7-gustavo@padovan.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020215012.20646-1-gustavo@padovan.org> References: <20171020215012.20646-1-gustavo@padovan.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Gustavo Padovan With the upcoming explicit synchronization support to V4L2 we need a way to notify userspace of the out_fence_fd when buffers are queued to the driver - buffers with in-fences attached to it can only be queued once the fence signal, so the queueing to the driver might be deferred. v2: rename to .send_out_fence() Signed-off-by: Gustavo Padovan --- include/media/videobuf2-core.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index ef9b64398c8c..96af4eb49e52 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -408,6 +408,7 @@ struct vb2_ops { * will return an error. * @copy_timestamp: copy the timestamp from a userspace structure to * the vb2_buffer struct. + * @send_out_fence: send an out_fence fd of the buffer queued to userspace. */ struct vb2_buf_ops { int (*verify_planes_array)(struct vb2_buffer *vb, const void *pb); @@ -415,6 +416,7 @@ struct vb2_buf_ops { int (*fill_vb2_buffer)(struct vb2_buffer *vb, const void *pb, struct vb2_plane *planes); void (*copy_timestamp)(struct vb2_buffer *vb, const void *pb); + void (*send_out_fence)(struct vb2_buffer *vb); }; /**