lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ea03144c-f3c1-656a-3b99-062a00850c58@nxp.com>
Date:   Wed, 1 Nov 2023 11:17:38 +0200
From:   Iuliana Prodan <iuliana.prodan@....com>
To:     Shengjiu Wang <shengjiu.wang@....com>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "shengjiu.wang@...il.com" <shengjiu.wang@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>
Cc:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV

On 11/1/2023 9:40 AM, Shengjiu Wang wrote:
> SSI and SPDIF are dual fifo interface, when support ASRC P2P
> with SSI and SPDIF, the src fifo or dst fifo number can be
> two.
>
> The p2p watermark level bit 13 and 14 are designed for
> these use case. This patch is to complete this function
> in driver.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> Signed-off-by: Joy Zou <joy.zou@....com>

Acked-by: Iuliana Prodan <iuliana.prodan@....com>

Thanks,
Iulia

> ---
>   drivers/dma/imx-sdma.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index f81ecf5863e8..892e23cc0ce8 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -137,7 +137,11 @@
>    *						0: Source on AIPS
>    *	12		Destination Bit(DP)	1: Destination on SPBA
>    *						0: Destination on AIPS
> - *	13-15		---------		MUST BE 0
> + *	13		Source FIFO		1: Source is dual FIFO
> + *						0: Source is single FIFO
> + *	14		Destination FIFO	1: Destination is dual FIFO
> + *						0: Destination is single FIFO
> + *	15		---------		MUST BE 0
>    *	16-23		Higher WML		HWML
>    *	24-27		N			Total number of samples after
>    *						which Pad adding/Swallowing
> @@ -168,6 +172,8 @@
>   #define SDMA_WATERMARK_LEVEL_SPDIF	BIT(10)
>   #define SDMA_WATERMARK_LEVEL_SP		BIT(11)
>   #define SDMA_WATERMARK_LEVEL_DP		BIT(12)
> +#define SDMA_WATERMARK_LEVEL_SD		BIT(13)
> +#define SDMA_WATERMARK_LEVEL_DD		BIT(14)
>   #define SDMA_WATERMARK_LEVEL_HWML	(0xFF << 16)
>   #define SDMA_WATERMARK_LEVEL_LWE	BIT(28)
>   #define SDMA_WATERMARK_LEVEL_HWE	BIT(29)
> @@ -1259,6 +1265,16 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
>   		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;
>   
>   	sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
> +
> +	/*
> +	 * Limitation: The p2p script support dual fifos in maximum,
> +	 * So when fifo number is larger than 1, force enable dual
> +	 * fifos.
> +	 */
> +	if (sdmac->n_fifos_src > 1)
> +		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD;
> +	if (sdmac->n_fifos_dst > 1)
> +		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD;
>   }
>   
>   static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ