From patchwork Mon May 8 15:03:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9716347 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 1C0126035D for ; Mon, 8 May 2017 15:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D50B2842A for ; Mon, 8 May 2017 15:05:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AC1C284E4; Mon, 8 May 2017 15:05:08 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 802B32842A for ; Mon, 8 May 2017 15:05:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBD3C6E266; Mon, 8 May 2017 15:04:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id F38C26E259 for ; Mon, 8 May 2017 15:04:36 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 08 May 2017 08:04:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,309,1491289200"; d="scan'208";a="84085003" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga002.jf.intel.com with ESMTP; 08 May 2017 08:04:33 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 76290214B6; Mon, 8 May 2017 18:04:27 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id AA743200A5; Mon, 8 May 2017 18:03:32 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [RFC v4 17/18] docs-rst: Document precise V4L2_BUF_FLAG_NO_CACHE_SYNC flag behaviour Date: Mon, 8 May 2017 18:03:29 +0300 Message-Id: <1494255810-12672-18-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494255810-12672-1-git-send-email-sakari.ailus@linux.intel.com> References: <1494255810-12672-1-git-send-email-sakari.ailus@linux.intel.com> Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, posciak@chromium.org, m.szyprowski@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Document when should the user specify V4L2_BUF_FLAG_NO_CACHE_SYNC flag. Signed-off-by: Sakari Ailus --- Documentation/media/uapi/v4l/buffer.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/media/uapi/v4l/buffer.rst b/Documentation/media/uapi/v4l/buffer.rst index 9eb42bd..e1f93dd 100644 --- a/Documentation/media/uapi/v4l/buffer.rst +++ b/Documentation/media/uapi/v4l/buffer.rst @@ -570,6 +570,27 @@ Buffer Flags then read by another one, in which case the flag should be set in both :ref:`VIDIOC_QBUF` and :ref:`VIDIOC_DQBUF` ioctls. This flag has no effect on some devices / architectures. + + More specifically, this flag causes cache synchronisation to + be skipped for OUTPUT buffers when the buffer is queued. The + flag can be used if the buffer has been previously written to + by hardware but has not been written to by the CPU. + + Additionally, if this flag is specified for a CAPTURE buffer + when it is queued, cache synchronisation is skipped. This + signals that the application can guarantee that it has not + written to the buffer memory since it was last dequeued from + the device. + + Specifying this flag for a CAPTURE buffer when + dequeueing a buffer will skip cache maintenance for the buffer + memory. An application may not access the buffer memory in + that case but it may well be passed onwards to another device + in the system. + + Specifying this flag has no effect when dequeuing an OUTPUT + buffer. + * .. _`V4L2-BUF-FLAG-LAST`: - ``V4L2_BUF_FLAG_LAST``