From patchwork Thu Jul 23 18:39:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6855581 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3BF369F1D4 for ; Thu, 23 Jul 2015 18:38:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74FA320717 for ; Thu, 23 Jul 2015 18:38:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B768206E3 for ; Thu, 23 Jul 2015 18:38:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753754AbbGWSip (ORCPT ); Thu, 23 Jul 2015 14:38:45 -0400 Received: from mga11.intel.com ([192.55.52.93]:6268 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752923AbbGWSio (ORCPT ); Thu, 23 Jul 2015 14:38:44 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 23 Jul 2015 11:38:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,532,1432623600"; d="scan'208";a="611678781" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 23 Jul 2015 11:38:42 -0700 From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Robert Jarzmik , Lars-Peter Clausen , Jun Nie , Vinod Koul Subject: [PATCH 3/3] Documentation: dmaengine: Add DMA_CTRL_REUSE documentation Date: Fri, 24 Jul 2015 00:09:52 +0530 Message-Id: <1437676792-13465-3-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437676792-13465-1-git-send-email-vinod.koul@intel.com> References: <1437676792-13465-1-git-send-email-vinod.koul@intel.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Vinod Koul --- Documentation/dmaengine/provider.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt index 8b8eb7c57c1f..88f0b18c4ca1 100644 --- a/Documentation/dmaengine/provider.txt +++ b/Documentation/dmaengine/provider.txt @@ -351,6 +351,23 @@ where to put them) - This can be acked by invoking async_tx_ack() - If set, does not mean descriptor can be reused + * DMA_CTRL_REUSE + - If set, the descriptor can be reused after being completed. It should + not be freed by provider if this flag is set. + - The descriptor should be prepared for reuse by invoking + dmaengine_desc_set_reuse() which will set DMA_CTRL_REUSE. + - dmaengine_desc_set_reuse() will succeed only when channel support + reusable descriptor as exhibited by capablities + - As a consequence, if a device driver wants to skip the dma_map_sg() and + dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used, + it can resubmit the transfer right after its completion. + - Descriptor can be freed in few ways + - Clearing DMA_CTRL_REUSE by invoking dmaengine_desc_clear_reuse() + and submitting for last txn + - Explicitly invoking dmaengine_desc_free(), this can succeed only + when DMA_CTRL_REUSE is already set + - Terminating the channel + General Design Notes --------------------