From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932622AbcIFH4g (ORCPT ); Tue, 6 Sep 2016 03:56:36 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:46651 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753873AbcIFH4e (ORCPT ); Tue, 6 Sep 2016 03:56:34 -0400 Subject: Re: [PATCH] [media] v4l: omap_vout: vrfb: Convert to dmaengine To: References: <20160818102259.5815-1-peter.ujfalusi@ti.com> CC: , , , , From: Peter Ujfalusi Message-ID: <68ffa8c1-f1fe-4d31-a0ba-66077a151adf@ti.com> Date: Tue, 6 Sep 2016 10:56:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160818102259.5815-1-peter.ujfalusi@ti.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 08/18/16 13:22, Peter Ujfalusi wrote: > The dmaengine driver for sDMA now have support for interleaved transfer. > This trasnfer type was open coded with the legacy omap-dma API, but now > we can move it to dmaengine. > > Signed-off-by: Peter Ujfalusi > --- > The dmaengine driver for sDMA now have support for interleaved transfer. > This trasnfer type was open coded with the legacy omap-dma API, but now > we can move it to dmaengine. > > Signed-off-by: Peter Ujfalusi > --- > Hi, > > I do not have access to any hardware where I could test if the conversion works > correctly. I think it should. The dmaengine part looks fine to me - not that > this means too much as I have written it ;) > Based on debugging the code with starring at it I think the old and the new way > would end up setting up the DMA in a same way. However the dmaengine driver will > set CSDP_DST_PACKED | CSDP_SRC_PACKED. > > Laurent: would you be able to test this? I managed to test the dmaengine interleaved with: https://github.com/omap-audio/linux-audio/blob/peter/linux-next-wip/drivers/misc/ovv_dmaengine.c Basically I have ripped the relevant code from omap_vout_vrfb.c, added the dmaengine implementation. Then: 0. allocate and init the three buffers 1. copy from buffer0 to buffer1 with legacy omap-dma 2. copy from buffer0 to buffer2 with legacy omap-dma 3. compare buffer1 and buffer2 4. reinit buffer2 5. copy from buffer0 to buffer2 with dmaengine 6. compare buffer1 and buffer2 The result is: [ 100.578943] ovv_init: ENTER [ 100.626871] ovv_setup_buffers: pattern is good [ 100.774526] ovv_setup_buffers: pattern is good [ 100.911386] ovv_setup_buffers: pattern is good [ 101.136397] ovv_get_legacy_dma: got channel: 6 [ 101.140859] ovv_get_dmaengine_dma: got channel [ 101.160475] omap_vout_vrfb_dma_tx_callback: ENTER [ 101.180357] omap_vout_vrfb_dma_tx_callback: ENTER [ 101.470146] ovv_init: Legacy vs Legacy: they are identical [ 101.595408] ovv_init: pattern is good [ 101.599104] dmaengine_callback: ENTER [ 101.888070] ovv_init: Legacy vs dmaengine: they are identical -- Péter > > Regards, > Peter > > drivers/media/platform/omap/omap_vout_vrfb.c | 133 ++++++++++++++++----------- > drivers/media/platform/omap/omap_voutdef.h | 6 +- > 2 files changed, 83 insertions(+), 56 deletions(-) > > diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c > index b8638e4e1627..957ff7621652 100644 > --- a/drivers/media/platform/omap/omap_vout_vrfb.c > +++ b/drivers/media/platform/omap/omap_vout_vrfb.c > @@ -16,7 +16,6 @@ > #include > #include > > -#include > #include