Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741691

Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA controller

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA controller
Date 2017-09-28 18:20 +0200
Message-ID <uuJHA-2JP-21@gated-at.bofh.it> (permalink)
References <utKZ3-4P8-5@gated-at.bofh.it> <utKZ3-4P8-3@gated-at.bofh.it> <uuDiO-7d1-5@gated-at.bofh.it> <uuHFM-1y2-15@gated-at.bofh.it> <uuI8N-1Hr-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 28, 2017 at 05:35:59PM +0300, Dmitry Osipenko wrote:
> On 28.09.2017 17:06, Dmitry Osipenko wrote:
> > On 28.09.2017 12:29, Vinod Koul wrote:
> >>> +	default:
> >>> +		return -EINVAL;
> >>> +	}
> >>> +
> >>> +	ahb_seq  = burst << TEGRA_AHBDMA_CHANNEL_AHB_BURST_SHIFT;
> >>> +	ahb_seq |= TEGRA_AHBDMA_CHANNEL_ADDR_WRAP;
> >>> +	ahb_seq |= TEGRA_AHBDMA_CHANNEL_INTR_ENB;
> >>> +
> >>> +	writel_relaxed(ahb_seq,
> >>> +		       ahbdma_chan->regs + TEGRA_AHBDMA_CHANNEL_AHB_SEQ);
> >>> +
> >>> +	writel_relaxed(ahb_addr,
> >>> +		       ahbdma_chan->regs + TEGRA_AHBDMA_CHANNEL_AHB_PTR);
> >>
> >> oh no, you don't write to HW here. This can be called anytime when you have
> >> txn running! You should save these and use them in prep_ calls.
> >>
> > 
> > BTW, some of the DMA drivers have exactly the same problem. I now see that it is
> > actually documented explicitly in provider.txt, but that's inconsistent across
> > the actual drivers.
> > 
> 
> Also, shouldn't prep_ and dma_slave_config be protected with locking? I don't
> see DMA core doing any locking and seems none of the drivers too.

In prep when you modify the list yes (with vchan I suspect that maybe taken
care), but in general yes driver needs to do that

-- 
~Vinod

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Vinod Koul <vinod.koul@intel.com> - 2017-09-28 11:30 +0200
  Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Dmitry Osipenko <digetx@gmail.com> - 2017-09-28 14:20 +0200
  Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Dmitry Osipenko <digetx@gmail.com> - 2017-09-28 16:10 +0200
    Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Dmitry Osipenko <digetx@gmail.com> - 2017-09-28 16:40 +0200
      Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Vinod Koul <vinod.koul@intel.com> - 2017-09-28 18:20 +0200
        Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Dmitry Osipenko <digetx@gmail.com> - 2017-09-28 18:40 +0200
    Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA  controller Vinod Koul <vinod.koul@intel.com> - 2017-09-28 18:20 +0200

csiph-web