All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Rajesh Gumasta <rgumasta@nvidia.com>, <ldewangan@nvidia.com>,
	<vkoul@kernel.org>, <dan.j.williams@intel.com>,
	<thierry.reding@gmail.com>, <p.zabel@pengutronix.de>,
	<dmaengine@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <kyarlagadda@nvidia.com>, Pavan Kunapuli <pkunapuli@nvidia.com>
Subject: Re: [Patch v2 2/4] dmaengine: tegra: Add Tegra GPC DMA driver
Date: Fri, 7 Aug 2020 17:03:00 +0100	[thread overview]
Message-ID: <a1b9f491-39c4-253e-ba89-f29ab8184cfe@nvidia.com> (raw)
In-Reply-To: <1596699006-9934-3-git-send-email-rgumasta@nvidia.com>


On 06/08/2020 08:30, Rajesh Gumasta wrote:
> Adding GPC DMA controller driver for Tegra186 and Tegra194. The driver
> supports dma transfers between memory to memory, IO peripheral to memory
> and memory to IO peripheral.
> 
> Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
> Signed-off-by: Rajesh Gumasta <rgumasta@nvidia.com>
> ---
>  drivers/dma/Kconfig         |   12 +
>  drivers/dma/Makefile        |    1 +
>  drivers/dma/tegra-gpc-dma.c | 1472 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 1485 insertions(+)
>  create mode 100644 drivers/dma/tegra-gpc-dma.c

...

> +static void tdc_start_head_req(struct tegra_dma_channel *tdc)
> +{
> +	struct tegra_dma_sg_req *sg_req;
> +	struct virt_dma_desc *vdesc;
> +
> +	if (list_empty(&tdc->pending_sg_req))
> +		return;
> +
> +	if (tdc->is_pending)
> +		return;
> +
> +	vdesc = vchan_next_desc(&tdc->vc);
> +	if (!vdesc)
> +		return;
> +	list_del(&vdesc->node);
> +	tdc->dma_desc = vd_to_tegra_dma_desc(vdesc);
> +	tdc->is_pending = true;
> +	tdc->dma_desc->tdc = tdc;
> +	sg_req = list_first_entry(&tdc->pending_sg_req,
> +				  typeof(*sg_req), node);
> +	tegra_dma_start(tdc, sg_req);
> +	sg_req->configured = true;
> +	tdc->busy = true;
> +}


I really don't understand this. First we get a descriptor for the
vchan_next_desc and then we get a sg_req from another list. I really
don't see why we need to have two lists here. Seems overly complicated.

Jon

-- 
nvpublic

  parent reply	other threads:[~2020-08-07 16:03 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06  7:30 [Patch v2 0/4] Add Nvidia Tegra GPC-DMA driver Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 1/4] dt-bindings: dma: Add DT binding document Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 2/4] dmaengine: tegra: Add Tegra GPC DMA driver Rajesh Gumasta
2020-08-06 13:46   ` Dmitry Osipenko
2020-08-06 13:56     ` Rajesh Gumasta
2020-08-06 14:22       ` Dmitry Osipenko
2020-08-06 14:49   ` Dmitry Osipenko
2020-08-06 15:02   ` Dmitry Osipenko
2020-08-07 16:03   ` Jon Hunter [this message]
2020-08-07 16:23   ` Jon Hunter
2020-08-06  7:30 ` [Patch v2 3/4] arm64: configs: enable tegra gpc dma Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 4/4] arm64: tegra: Add GPCDMA node in dt Rajesh Gumasta
2020-08-07 16:26   ` Jon Hunter
2021-01-14 10:11 ` [Patch v2 0/4] Add Nvidia Tegra GPC-DMA driver Jon Hunter
2021-01-15  5:56   ` Vinod Koul
2021-01-15 13:21     ` Jon Hunter
2021-01-15 13:42       ` Rajesh Gumasta
2021-08-27  6:04         ` [PATCH v3 " Akhil R
2021-08-27  6:04           ` [PATCH v3 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-02 10:42             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-08-27 17:23             ` kernel test robot
2021-08-27 17:23               ` kernel test robot
2021-08-28 11:29             ` kernel test robot
2021-08-28 11:29               ` kernel test robot
2021-09-01 20:56             ` Jon Hunter
2021-09-02 10:57               ` Jon Hunter
2021-09-02 10:17             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-02 11:35             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-02 10:36             ` Jon Hunter
2021-09-08 14:32           ` [PATCH v4 0/4] Add Nvidia Tegra GPC-DMA driver Akhil R
2021-09-08 14:32             ` [PATCH v4 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-08 16:44               ` Jon Hunter
2021-09-15  8:08                 ` Akhil R
2021-09-08 14:32             ` [PATCH v4 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-08 14:32             ` [PATCH v4 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-08 14:32             ` [PATCH v4 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-08 16:45               ` Jon Hunter
2021-09-08 16:44             ` [PATCH v4 0/4] Add Nvidia Tegra GPC-DMA driver Jon Hunter
2021-09-13  4:08               ` Akhil R
2021-09-16 12:18             ` [PATCH v5 " Akhil R
2021-09-16 12:18               ` [PATCH v5 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-16 14:30                 ` Jon Hunter
2021-09-16 12:18               ` [PATCH v5 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-16 12:18               ` [PATCH v5 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-16 12:18               ` [PATCH v5 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-16 14:33                 ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1b9f491-39c4-253e-ba89-f29ab8184cfe@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kyarlagadda@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pkunapuli@nvidia.com \
    --cc=rgumasta@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.