From patchwork Fri Oct 20 21:50:04 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: 45071 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 1e5fEv-0001pv-OE; Fri, 20 Oct 2017 21:54:02 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752917AbdJTVxp (ORCPT + 1 other); Fri, 20 Oct 2017 17:53:45 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:45203 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753296AbdJTVux (ORCPT ); Fri, 20 Oct 2017 17:50:53 -0400 Received: by mail-qk0-f196.google.com with SMTP id f199so16014405qke.2; Fri, 20 Oct 2017 14:50:53 -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=tNxxG3Mw4KZr4G0dIhzFZ0LJ7x8dWzdPINkzGXZyLv8=; b=PpGTVLnlnZPWSFVyvsNumGKD6YvitjshfdNcYQeXLoNg7U7xS6VcPWU/Z4JA6xoDsi pAL6knvDjp1jf9c/Nlfk8XIoOjkOYmrYWPDJ8ZLKMYZ/h5XdcZFm+hypYAv05GJ2pOvE uQ0bwInZPVKoqrgD3GX6FCruva7h/RybnRQB0KGv/xfLxPOB19HrqdY6+7zaYl7jvpWS Z3/WdPDixBSV21X8oMnfI6gqFOFpwB++X62J36tN0qVd0xTl48rYlsgJfKkb+sX8PG1E DKybX//pqNtvlly/d/FnxmYhfEdG4bMWKLSB0RQsbkk8fCKWCuyPAZ02BBpQd9BlO1N5 BowQ== X-Gm-Message-State: AMCzsaWK9MeYqKPQQ5aGgClc0KhAnmGWAXR1qFBovMzu6i93l88Wa5wH btZ6MJssRmYjAaH8GQg3OS8HV4Qu X-Google-Smtp-Source: ABhQp+R+oWdviVxkj2320N7eDEpxx2UsXhQT9LS8w6UFanvE/3KO6D+pzniFReL/6Q3vFdDVvh0j6g== X-Received: by 10.55.209.27 with SMTP id s27mr9208148qki.4.1508536252907; Fri, 20 Oct 2017 14:50:52 -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.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 14:50:52 -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 09/17] [media] vb2: add 'ordered_in_vb2' property to queues Date: Fri, 20 Oct 2017 19:50:04 -0200 Message-Id: <20171020215012.20646-10-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 By setting this member on vb2_queue the driver tell vb2 core that it requires the buffers queued in QBUF to be queued with same order to the driver. 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 6dd3f0181107..fc333e10e7d8 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -505,6 +505,9 @@ struct vb2_buf_ops { * the same order they are dequeued from the driver. The default * is not ordered unless the driver sets this flag. As of now it * is mandatory for using explicit fences. + * @ordered_in_vb2: set by the driver to tell vb2 te guarantee the order + * of buffer queue from userspace with QBUF() until they are + * queued to the driver. * @fileio: file io emulator internal data, used only if emulator is active * @threadio: thread io internal data, used only if thread is active */ @@ -558,6 +561,7 @@ struct vb2_queue { unsigned int copy_timestamp:1; unsigned int last_buffer_dequeued:1; unsigned int ordered_in_driver:1; + unsigned int ordered_in_vb2:1; struct vb2_fileio_data *fileio; struct vb2_threadio_data *threadio;