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


Groups > linux.kernel > #1515062

Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel

From Peter Ujfalusi <peter.ujfalusi@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel
Date 2016-11-04 09:10 +0100
Message-ID <szHJv-7wH-7@gated-at.bofh.it> (permalink)
References <sz39n-6oi-1@gated-at.bofh.it> <szmvo-1Zs-39@gated-at.bofh.it> <szq5X-4mP-1@gated-at.bofh.it> <szrY5-5yQ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Laurent,

On 11/03/2016 05:12 PM, Laurent Pinchart wrote:
>> It is a bit misleading that it used dma_request_slave_channel_compat()
>> for getting the channel.
>>
>> I think what would be correct is:
>> dma_cap_mask_t mask;
>>
>> dma_cap_zero(mask);
>> dma_cap_set(DMA_SLAVE, mask);
>> hist->dma_ch = dma_request_chan_by_mask(&mask);
>>
>> We will get any DMA channel capable of slave configuration, but we will
>> configure no DMA request number for the channel.
> 
> I believe that should work. It could in theory result in a different behaviour 
> as it could return a DMA channel not handled by the OMAP SDMA engine, but I 
> don't think that would be an issue.

Yes, that could be the case if we would have more than one DMAs in SoCs
where the omap3isp is used, but we only have sDMA.

The reason why I would like to move the driver to use the generic API is
that my plan is to remove the legacy sDMA support in the future so the
filter_fn is not going to be available outside of the DMAengine driver.

I do believe that this is safe to do in this way and if the IP shows up
somewhere else where we have more than one DMAs - which is unlikely -
I'm sure it can be fixed up, but w/o device it is hard to guess what
needs to be done.
FWIW: if omap3isp shows up where we have sDMA and eDMA we can set the
mask as DMA_SLAVE | DMA_MEMCPY as eDMA does not set both for a channel -
it is either slave or memcpy.

>> and document this in the driver...
> 

-- 
Péter

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


Thread

[PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-11-02 13:50 +0100
  Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-11-02 22:20 +0100
    Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to  requesting DMA channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-11-03 10:30 +0100
      Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to  requesting DMA channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-11-03 14:20 +0100
        Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-11-03 16:20 +0100
          Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to  requesting DMA channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-11-04 09:10 +0100
      Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-11-03 16:20 +0100

csiph-web