Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3230653imm; Sun, 7 Oct 2018 23:47:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vsy9XdPhMrl0m8pVvghdMC+8IrAHscXs21nHQsUboc/xzPmTlbq2X9R6S6wTXXymjQboD X-Received: by 2002:a63:608c:: with SMTP id u134-v6mr19530607pgb.266.1538981252646; Sun, 07 Oct 2018 23:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538981252; cv=none; d=google.com; s=arc-20160816; b=YCBl8SBpPy0ZfUGwklnwZGhlw1vKwysE6XegCfaJdiLwENczEeAhEr4RM6iBY0YA2p gA5EP/PangiasuVEXpBRFTJgad1ujsxq4lCO1MreV8XoGkFzddKEGoUtGS1vAQmi+tfA iUnUAcbOifdnSVK8Wu6oZKnEN9+5eEnHpCoWq4M3HtBDgx64BuKi6VxnNvM+hqvH9dx1 jVFZ5WJjdLSmzUNNmBs19sdQGzZjhkNhTI+22jRXp6PxLpO8VN4oXehfqX+gyPWcJ+6x +DcndhbBFwpVEjIk+EsXrSVw6Gx7TXaQAlhc3qgBd6KN+OAuHTC5+RfW087zUl0TbiiI 0ZAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=JzFjrOfLL4/DvsxbDYjb+g9bzA9eEfIxBmbTlDtlCDQ=; b=nviQDaTwSR8SSyooKxnAj08eIHghyIGHgcYtpaTSc1+ANuHq/jERhlecunZ5KDYaC9 DQI2Vr1cDDep2GNbWhcvhaYiVtRzoGMuuNUXnmkIH99zLp6PJuq81K29iQ9Bls2wACzU taEO/6VYTNgAKaA6SXfhjSCLWsZkkSQmI6eT8Ygp37wU9TeJmJrjLBV2wJqLOlL9a0LB sGj8INK78uMdfbdoW/R5P/A3rp4a6Lp3kpWSEMKXzopwerxJg8IPDlLk9gHVMr69oO1h 7IsF8yb9paj0Gw8w2dG4RLye6251MwSLAMs5Je1gl1cw0dsVaxfvJU4RhMBejymluGkc HToQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ks593vd1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125-v6si17725277pfg.138.2018.10.07.23.47.17; Sun, 07 Oct 2018 23:47:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ks593vd1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbeJHN5G (ORCPT + 99 others); Mon, 8 Oct 2018 09:57:06 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51979 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbeJHN5F (ORCPT ); Mon, 8 Oct 2018 09:57:05 -0400 Received: by mail-wm1-f66.google.com with SMTP id 143-v6so6910385wmf.1; Sun, 07 Oct 2018 23:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=JzFjrOfLL4/DvsxbDYjb+g9bzA9eEfIxBmbTlDtlCDQ=; b=Ks593vd1spStyM6Hr4zGLn7ix56z5XBXNI56nZ4bVfqR+G2Lhoi1Ldyc1IWODQ9aJq 9TLnpnN0Cj1ai6fL1esmLcOHY4SAgBRG3z3LFh6WFQYIcmFFD9qBsmJWeTnpDVJ0f0sS BH23v+d2d2P62RFRfcFqpDa5523xMt3GrNRL+xQDplFlcN17XtKpr3/2Ga+1ZJV9WpNo ThXKvR/6jf5yu+lnBuvHNnkbHRTV/++qaZeObHO8EIONhjvWaCmcLa/wp5s7nNlmQlRy y9E0LZnVR3et3IlThImqJyzkja0b7fluqZwq2JVwJmnqGiUQPLI29x3onyIzVXNIDI49 QRwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=JzFjrOfLL4/DvsxbDYjb+g9bzA9eEfIxBmbTlDtlCDQ=; b=ZVUfWgK5ik2cRi3qIGjRaztFC3xyOXxYEtGEySmaU7n0huGOG122bmRouYdwdmfXMJ mydpn/SoqEvuLyaDIqJGzrfVKhLFQLVjLGeaRpskq4niNE89wMYT4dbDGFrlYU2BdY16 Dh6LwuvDwgGcjSaFY7KcRXMPXCu0eVZew9jyUv4fR8oLDmfjTOFAuHHfvePRM1FROHut QGHZzJm/kkQ0p2hY+AVvXU1bamLxMBc2ESo0eO+erX/bR0YU/pbiW16NZ+IIrwH0W9B1 YqFkaSmf/Ffkzioh5deOKXkS35HXn/9rhKKcCvBxqYgBScGyc8/V+kxIYuaQKAVjISg5 PgWQ== X-Gm-Message-State: ABuFfoiZwris2+LQ/N/78gaLw4lxtQ2R/lSFFGPX/wDSothW5d6+ys4F 2bMqNZNcV2OUGxnlyUDnB8F7nI4ALzuFeFiA/Sk= X-Received: by 2002:a1c:9bc7:: with SMTP id d190-v6mr10404208wme.2.1538981213358; Sun, 07 Oct 2018 23:46:53 -0700 (PDT) MIME-Version: 1.0 References: <20180907062502.8241-1-andrea.merello@gmail.com> <20180907062502.8241-4-andrea.merello@gmail.com> <20180918162508.GD2613@vkoul-mobl> <20181002145647.GG19792@vkoul-mobl> In-Reply-To: <20181002145647.GG19792@vkoul-mobl> Reply-To: andrea.merello@gmail.com From: Andrea Merello Date: Mon, 8 Oct 2018 08:46:41 +0200 Message-ID: Subject: Re: [PATCH v5 4/7] dmaengine: xilinx_dma: program hardware supported buffer length To: Vinod Cc: dan.j.williams@intel.com, michal.simek@xilinx.com, appana.durga.rao@xilinx.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel , Rob Herring , Mark Rutland , devicetree , Radhey Shyam Pandey Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 2, 2018 at 4:56 PM Vinod wrote: > > On 28-09-18, 08:53, Andrea Merello wrote: > > On Tue, Sep 18, 2018 at 6:25 PM Vinod wrote: > > > > > @@ -964,7 +968,7 @@ static int xilinx_dma_calc_copysize(struct xilinx_dma_chan *chan, > > > > int size, int done) > > > > { > > > > size_t copy = min_t(size_t, size - done, > > > > - XILINX_DMA_MAX_TRANS_LEN); > > > > + chan->xdev->max_buffer_len); > > > > > > hmm why not add max_buffer_len in patch 1 again, and then use default > > > len as XILINX_DMA_MAX_TRANS_LEN and add multiple lengths here :) > > > > Sorry, I'm not getting your point. Could you please elaborate the "add > > multiple lengths here" thing ? > > IIRC (sorry been travelling and vacation), add > chan->xdev->max_buffer_len in patch 1 and initialize it to > XILINX_DMA_MAX_TRANS_LEN. Then in subsequent patches update the length. Ah ok. IMO introducing max_buffer_len seems more related to what 4/7 does (actually getting the max transfer len from DT, thus it is not constant anymore) rather than to what 1/7 does (commonizing the calculation of transfer len as it is).. This is why I've introduced it in 4/7.. .. But if you prefer this way, I'll change this :) .. Maybe we can change 1/7 commit message so that this change looks less off-topic.. But I have not found a very good title yet.. Something like "Prepare for DMA copy size calculation rework" ? > -- > ~Vinod