Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2069753pxa; Sun, 16 Aug 2020 22:47:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXh66UgE3Bx6yjidKx46BmUvZGgYiql4DT5cKiiBFUURG7pF/A/mp3tscdnmn1GOs5NvTZ X-Received: by 2002:aa7:da0e:: with SMTP id r14mr13721336eds.236.1597643250143; Sun, 16 Aug 2020 22:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597643250; cv=none; d=google.com; s=arc-20160816; b=U7YeX8M1uJhnHXPNpft57B6TavDwntiG7Av4VstIAb0yhDt9A9Y+AI8j/pJfousgSj ZI9FFHrxmZwOFp/RXvc7TXTmPzfa6+nhFiTB16pRTEyaK51Lp8PKiks1OWUg4vLtoJhv dzXfy1frZufCiZwqBypXaodnhN+pCoi+RXWafxifiHOo7gp1RrzdIFbW1/EV/lIcqMvr iL1SBI8K+uDDfpKwoQ3kHwAD02IKfuocxPx/d610VRe8WR3M6ykT39TRAyOF8INbMSLF 44Kq0EuX0hznRmylTPhgAts9mDqmNwGn4Ew8FwwYQbTpX4+9NJkZQcuFPO5eoVxNKz0v 3bxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:dkim-signature; bh=axBvRpQZzCPycSw6ntiiiAJSZk4XBzsVTeP/HKObJM4=; b=UdPbD/bvBqQIaCMg37dnb6d7SHbOQrJOSW099G9Wm0PGrhTLMU27Zkk4PEUJB5X7t3 gPemuKoPtU6/2MVWbmsMz7TpA1ml+hNjAoRr0LyGBcL0QHAccLiFkGM5QRPxHT4I1N9t Gbw4XpsuxHBxGDOUoOHtcB9LaOv+QnDyD7NfONtyyAQ9R3ZN5unqpGN47m7V3Z5u7W1F vKVJMnXBqqtxfnFmbK74XqXbrtWgU4V9IOnVSfN+Hw1BWdYaYJAjKqhAXXtMdnCaXNIz cdrNeBiuyAxe6jA8WctAi8zO6SAHplAFWIcc/nIRVkeLYBD9yzDOuWX2Re5RYgtmbMgD rw6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@skidata.com header.s=selector1 header.b=WtYTGKnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=skidata.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si10055515ejd.148.2020.08.16.22.47.07; Sun, 16 Aug 2020 22:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@skidata.com header.s=selector1 header.b=WtYTGKnT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=skidata.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbgHQFph (ORCPT + 99 others); Mon, 17 Aug 2020 01:45:37 -0400 Received: from mail1.skidata.com ([91.230.2.99]:13562 "EHLO mail1.skidata.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbgHQFpd (ORCPT ); Mon, 17 Aug 2020 01:45:33 -0400 X-Greylist: delayed 435 seconds by postgrey-1.27 at vger.kernel.org; Mon, 17 Aug 2020 01:45:30 EDT DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=skidata.com; i=@skidata.com; q=dns/txt; s=selector1; t=1597643131; x=1629179131; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=VYLBjYz9lx/nrXI3opLlz8j0PHFlXG1/ZEX5YI80V6Y=; b=WtYTGKnTmQpZ5x95Mjrtm4Z+2r4cq1cDd4zgMaFbUmYw5ZqfFVAKLzsI qFMORePP4Gm3U+CNyiGicy7oL6ogX3Shsjcl+URUA6xGu8mcbahuL4oRU fdgjOu+5nNVI7245a8TPs2fM4UieXVIEjfi4AE/b0FdGAqsqe8NYmkJUA nthQDLkrZxTZRGIEMZtFqJBToNg7WTfD0bkcCUFGarDQUC0RzjpGkOC7O KXoRR04L6AuDM8ODMnRS3mS2OTjVYsB03pJj3UZ4XOhPeDu9QO4hs1gvC N/49SAq8YcLIyBj61grb/nqm4tfYDqlxVljsYtJAjXneGA++SmP9ykayO Q==; IronPort-SDR: svI9QV3IU5oopAVv5yamxDgdlocA1iJY3YSUF4EoHghv0pgx7rr8qYaXkKz5Omkxq2uybaSfdj 1dD7IDxYChlmXsW52gUikLfeYy0fDPtToSUvTzOiSLEDrAr1H5ycWGdiqrHMmlVmzVGFcjGjCn vyiYzbUfXj4k21HYamaZ92VvdFf1lutJUyxZ0kD6RwOaFA6yq59RZ3P9gLdmKUd6AbU7Ummw4D Y2lkzlC6cjdyZtDG5ddHSKZVBFRj2gbaypEpl+VvtyBmVS+EJKOQQZ0r5NVceKThI+XQuyf8Qn 3/U= X-IronPort-AV: E=Sophos;i="5.76,322,1592863200"; d="scan'208";a="26161391" Date: Mon, 17 Aug 2020 07:38:13 +0200 From: Richard Leitner To: Robin Gong CC: , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v12 03/12] Revert "dmaengine: imx-sdma: refine to load context only once" Message-ID: <20200817053813.GA551027@pcleri> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> <1597161231-32303-4-git-send-email-yibin.gong@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1597161231-32303-4-git-send-email-yibin.gong@nxp.com> X-Originating-IP: [192.168.111.252] X-ClientProxiedBy: sdex6srv.skidata.net (192.168.111.84) To sdex5srv.skidata.net (192.168.111.83) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 11, 2020 at 11:53:42PM +0800, Robin Gong wrote: > This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because > in spi-imx case, burst length may be changed dynamically. > > Signed-off-by: Robin Gong > Acked-by: Sascha Hauer Hi Robin, thanks for the pointer to this patch. As you suggested I've tested the two patches on my custom i.MX6DL board. Therefore please feel free to add: Tested-by: Richard Leitner regards;rl > --- > drivers/dma/imx-sdma.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c > index 270992c..d305b80 100644 > --- a/drivers/dma/imx-sdma.c > +++ b/drivers/dma/imx-sdma.c > @@ -377,7 +377,6 @@ struct sdma_channel { > unsigned long watermark_level; > u32 shp_addr, per_addr; > enum dma_status status; > - bool context_loaded; > struct imx_dma_data data; > struct work_struct terminate_worker; > }; > @@ -984,9 +983,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) > int ret; > unsigned long flags; > > - if (sdmac->context_loaded) > - return 0; > - > if (sdmac->direction == DMA_DEV_TO_MEM) > load_address = sdmac->pc_from_device; > else if (sdmac->direction == DMA_DEV_TO_DEV) > @@ -1029,8 +1025,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) > > spin_unlock_irqrestore(&sdma->channel_0_lock, flags); > > - sdmac->context_loaded = true; > - > return ret; > } > > @@ -1069,7 +1063,6 @@ static void sdma_channel_terminate_work(struct work_struct *work) > vchan_get_all_descriptors(&sdmac->vc, &head); > spin_unlock_irqrestore(&sdmac->vc.lock, flags); > vchan_dma_desc_free_list(&sdmac->vc, &head); > - sdmac->context_loaded = false; > } > > static int sdma_terminate_all(struct dma_chan *chan) > @@ -1337,7 +1330,6 @@ static void sdma_free_chan_resources(struct dma_chan *chan) > > sdmac->event_id0 = 0; > sdmac->event_id1 = 0; > - sdmac->context_loaded = false; > > sdma_set_channel_priority(sdmac, 0); > > -- > 2.7.4 > > -- Richard Leitner Hardware R&D / Senior Embedded Linux Engineer SKIDATA | Driving Your Digital Future SKIDATA GmbH Untersbergstra?e 40 | 5083 Gr?dig/Salzburg | Austria [t] +43-6246-888-4245 | [m] +43-664-88616370 [w] www.skidata.com