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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73774C4332F for ; Wed, 20 Apr 2022 11:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352981AbiDTLqX (ORCPT ); Wed, 20 Apr 2022 07:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378104AbiDTLqW (ORCPT ); Wed, 20 Apr 2022 07:46:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555CD41601; Wed, 20 Apr 2022 04:43:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E7AA661935; Wed, 20 Apr 2022 11:43:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD892C385A4; Wed, 20 Apr 2022 11:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650455016; bh=7JNN+lLGpQd2vOnQsY9fUp5J7u+gxy2utrkR2mPkKNY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fg15V7pkLZEYA7XL7RgFYyLq3JceRQss/63jRVpGH7h/9ZeuXBC7R4auxD/Y2Cgh6 ISUVZO3E5n5ep7pSD5siEAiSVNj64+Qk6IyUMl0iIXurKZ9QpgJF0ZRFaaof/p3p2S AfpB1vW9nT0NKTi8j3bS/YzhTI17TIlFPW6CzaA4lkTcuNjUdTz32PxY4uSkBsAMGw 0ASTOG8YV/S1svg9zbSo6IeLzUQxd4MzSgUs4RZIOQagOaFuhI6k64cbUL7LqjDILT RxUiEQNWnkuWq2WrK9PZSZSXpiw9G0Dq3KQnITP8rt8DVljMhBPIBCWiDtQxvk2BKY Paqfx2Hb2sMjQ== Date: Wed, 20 Apr 2022 17:13:32 +0530 From: Vinod Koul To: Aidan MacDonald Cc: paul@crapouillou.net, linux-mips@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: jz4780: set DMA maximum segment size Message-ID: References: <20220411153618.49876-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220411153618.49876-1-aidanmacdonald.0x0@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On 11-04-22, 16:36, Aidan MacDonald wrote: > Set the maximum segment size, since the hardware can do transfers larger > than the default 64 KiB returned by dma_get_max_seg_size(). > > The maximum segment size is limited by the 24-bit transfer count field > in DMA descriptors. The number of bytes is equal to the transfer count > times the transfer size unit, which is selected by the driver based on > the DMA buffer address and length of the transfer. The size unit can be > as small as 1 byte, so set the maximum segment size to 2^24-1 bytes to > ensure the transfer count will not overflow regardless of the size unit > selected by the driver. Applied, thanks -- ~Vinod