From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33C4CC43334 for ; Tue, 21 Jun 2022 12:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sNYyP6MZowhy8f3amk9nVnK5i8cds2SZh3yYRlPxC+E=; b=h/mCO/1QLK/jGr xkGiiB838EHCqirWucd+5iFFurE6b8tdA3xHYRYq/uZg89jy6LySjzHx/AOPGAKyL3YGPfw074JnJ q+audU5rQFNpJqsm/AxgvwFEaMOCaDEPFIXJtWlVBk+FLNfyJlznfcK7wQKoBDR2PykEjwCo5zotm bkNXrWc9kStSegBwIlXFUH+CHFwkXMJ/lrAWY6kg2S3eSTaDT8g17effrsjmp3JmTVDfO19PRKilE NAzFP6RRd5cd8vibZkzun1mELj7Qg5Ip/Yc4HhU0sejRbADZ2fFlpgNCxArR50tWXS+ULzkUM5cOE 3XxT7hKSuPKf4ObHlzFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3dO8-005Ttz-St; Tue, 21 Jun 2022 12:53:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3dO5-005TsJ-Aj for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 12:53:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B303D165C; Tue, 21 Jun 2022 05:53:43 -0700 (PDT) Received: from [10.57.85.30] (unknown [10.57.85.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 508173F534; Tue, 21 Jun 2022 05:53:42 -0700 (PDT) Message-ID: Date: Tue, 21 Jun 2022 13:53:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] dmaengine: sun6i: Set the maximum segment size Content-Language: en-GB To: Samuel Holland , Chen-Yu Tsai , Jernej Skrabec , Vinod Koul Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev References: <20220617034209.57337-1-samuel@sholland.org> From: Robin Murphy In-Reply-To: <20220617034209.57337-1-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_055345_466537_3C92E125 X-CRM114-Status: GOOD ( 16.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-06-17 04:42, Samuel Holland wrote: > The sun6i DMA engine supports segment sizes up to 2^25-1 bytes. This is > explicitly stated in newer SoC documentation (H6, D1), and it is implied > in older documentation by the 25-bit width of the "bytes left in the > current segment" register field. > > Exposing the real segment size limit (instead of the 64k default) > reduces the number of SG list segments needed for a transaction. > > Signed-off-by: Samuel Holland > --- > Tested on A64, verified that the maximum ALSA PCM period increased, and > that audio playback still worked. > > drivers/dma/sun6i-dma.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c > index b7557f437936..1425f87d97b7 100644 > --- a/drivers/dma/sun6i-dma.c > +++ b/drivers/dma/sun6i-dma.c > @@ -9,6 +9,7 @@ > > #include > #include > +#include > #include > #include > #include > @@ -1334,6 +1335,8 @@ static int sun6i_dma_probe(struct platform_device *pdev) > INIT_LIST_HEAD(&sdc->pending); > spin_lock_init(&sdc->lock); > > + dma_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(25)); Similarly to my comment on the DRM patch, "SZ_32M - 1" might be clearer here. Thanks, Robin. > + > dma_cap_set(DMA_PRIVATE, sdc->slave.cap_mask); > dma_cap_set(DMA_MEMCPY, sdc->slave.cap_mask); > dma_cap_set(DMA_SLAVE, sdc->slave.cap_mask); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel