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


Groups > linux.kernel > #1286456

Re: [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping to slave devices

From Peter Ujfalusi <peter.ujfalusi@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping to slave devices
Date 2015-12-08 14:20 +0100
Message-ID <qDqls-2QG-9@gated-at.bofh.it> (permalink)
References <qBDd8-6lI-9@gated-at.bofh.it> <qBDd8-6lI-23@gated-at.bofh.it> <qBE9b-6XG-1@gated-at.bofh.it> <qBEiS-71h-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/03/2015 05:46 PM, Peter Ujfalusi wrote:
> On 12/03/2015 05:38 PM, Arnd Bergmann wrote:
>> On Thursday 03 December 2015 16:33:12 Peter Ujfalusi wrote:
>>> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
>>> index 0675e268d577..46b305ea0d21 100644
>>> --- a/drivers/dma/edma.c
>>> +++ b/drivers/dma/edma.c
>>> @@ -2297,6 +2297,12 @@ static int edma_probe(struct platform_device *pdev)
>>>                 edma_set_chmap(&ecc->slave_chans[i], ecc->dummy_slot);
>>>         }
>>>  
>>> +       if (info->slave_map) {
>>> +               ecc->dma_slave.filter_map.map = info->slave_map;
>>> +               ecc->dma_slave.filter_map.mapcnt = info->slavecnt;
>>> +               ecc->dma_slave.filter_map.filter_fn = edma_filter_fn;
>>> +       }
>>> +
>>>
>>
>> Just a minor comment here: I think all three assignments can be done
>> unconditionally.
> 
> True.
> 
>> As I mentioned before, I'd also remove 'struct dma_filter'
>> and put the three members in struct dma_device directly. In fact, the
>> filter function can go with the other function pointers for consistency.
> 
> I just like to keep things in one place ;)
> I don't have strong stand on keeping the intermediate 'struct dma_filter'
> Let's hear from Vinod regarding to this


One remaining design issue is on how and where to place the filter related
variables/pointers:

Keep it separated as it was in the RFC and v01 series:

struct dma_slave_map {
        const char *devname;
        const char *slave;
        void *param;
};

struct dma_filter {
        dma_filter_fn fn;
        int mapcnt;
        const struct dma_slave_map *map;
};


struct dma_device {
	...
	struct dma_filter filter;
	...
};

Or to have them under the dma_device directly:

struct dma_device {
	...
	int filter_mapcnt;
	const struct dma_slave_map *filter_map;
	...
	dma_filter_fn filter_fn;
	...
};

Vinod: what is your preference for this?

Thanks,
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 0/4] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-03 15:40 +0100
  [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping to slave devices Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-03 15:40 +0100
    Re: [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping to slave devices Arnd Bergmann <arnd@arndb.de> - 2015-12-03 16:40 +0100
      Re: [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping  to slave devices Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-03 16:50 +0100
        Re: [PATCH 4/4] dmaengine: edma: Add support for DMA filter mapping  to slave devices Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-08 14:20 +0100
  [PATCH 3/4] dmaengine: core: Introduce new, universal API to request a channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-03 15:40 +0100
    Re: [PATCH 3/4] dmaengine: core: Introduce new, universal API to request a channel Arnd Bergmann <arnd@arndb.de> - 2015-12-03 16:40 +0100
      Re: [PATCH 3/4] dmaengine: core: Introduce new, universal API to request a channel Arnd Bergmann <arnd@arndb.de> - 2015-12-03 16:50 +0100
      Re: [PATCH 3/4] dmaengine: core: Introduce new, universal API to  request a channel Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-03 16:50 +0100
    Re: [PATCH 3/4] dmaengine: core: Introduce new, universal API to  request a channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-03 17:40 +0100
  Re: [PATCH 0/4] dmaengine: New 'universal' API for requesting channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-03 17:40 +0100

csiph-web