From patchwork Fri Sep 1 01:50:36 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: 43677 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 1dnb7A-0002eG-65; Fri, 01 Sep 2017 01:51:20 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdIABvS (ORCPT + 1 other); Thu, 31 Aug 2017 21:51:18 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:33068 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbdIABvS (ORCPT ); Thu, 31 Aug 2017 21:51:18 -0400 Received: by mail-qt0-f195.google.com with SMTP id h15so840855qta.0 for ; Thu, 31 Aug 2017 18:51:17 -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=DU8bNP/fJErUZpQnV96Qs6k9Q5PyHsI1We6m7nNS8zo=; b=mc3pfcC0XpQ8ZwvNzxdsmt0TBruZwr6H+TIoB0M+hywoxYMTo0Zj1JM/syIYhMBgPb XhidhCXDyT1feks7yNE9ZFx7IMNng4hxTZt9CmOJpOXYcxjFpJ5cbqV7VlC7kpPgltql puyjxQzQ4B6WYMMlaEnfrh8Sp7AkfXUVy2NH+4uQ9PW/vZgBTxLWiWVn8+R0CNo8oS7/ 47I8KaMvxCYkLdvGwo7K235yl+lRuuJJjOpNsIBiCZ6Rc7fXY45dKeonTO80LtGTUvuo 3/vIJojEdo3l89EIxqXZPNH7Pr7seYtjNO1D3L+tuU+nRsyLuN1KBIMybDOYAetFX6nL OLAQ== X-Gm-Message-State: AHPjjUjwKXmSfQCSEjlZi5cTBnMuk5Li+deYYTAMq+j/Fgb3nr6lJ1Uc VQiZQLlPhAczp3Dkb3k= X-Google-Smtp-Source: ADKCNb6kMQM7rtMzYTP0S+JUuJ1BXyKASXTZWFLUAQ0ESoHi6twYpFjLDO7yFKS1BMzTZoyJs70dOg== X-Received: by 10.200.22.91 with SMTP id x27mr550846qtk.7.1504230677070; Thu, 31 Aug 2017 18:51:17 -0700 (PDT) Received: from localhost.localdomain ([187.10.21.246]) by smtp.gmail.com with ESMTPSA id o17sm6366232qkl.52.2017.08.31.18.51.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2017 18:51:16 -0700 (PDT) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Gustavo Padovan Subject: [PATCH v2 09/14] [media] vb2: add 'ordered' property to queues Date: Thu, 31 Aug 2017 22:50:36 -0300 Message-Id: <20170901015041.7757-10-gustavo@padovan.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170901015041.7757-1-gustavo@padovan.org> References: <20170901015041.7757-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 For explicit synchronization (and soon for HAL3/Request API) we need the v4l2-driver to guarantee the ordering in which the buffers were queued by userspace. This is already true for many drivers, but we never needed to say it. Signed-off-by: Gustavo Padovan --- include/media/videobuf2-core.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 46049dec7f61..ad419f7204a2 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -505,6 +505,9 @@ struct vb2_buf_ops { * @last_buffer_dequeued: used in poll() and DQBUF to immediately return if the * last decoded buffer was already dequeued. Set for capture queues * when a buffer with the V4L2_BUF_FLAG_LAST is dequeued. + * @ordered: if the driver can guarantee that the queue will be ordered or not. + * The default is not ordered unless the driver sets this flag. It + * is mandatory for using explicit fences. * @fileio: file io emulator internal data, used only if emulator is active * @threadio: thread io internal data, used only if thread is active */ @@ -557,6 +560,7 @@ struct vb2_queue { unsigned int is_output:1; unsigned int copy_timestamp:1; unsigned int last_buffer_dequeued:1; + unsigned int ordered:1; struct vb2_fileio_data *fileio; struct vb2_threadio_data *threadio;