All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] dmaengine: add peripheral configuration
Date: Wed, 7 Oct 2020 14:49:45 +0300	[thread overview]
Message-ID: <5784e3cb-8d22-58f1-5211-a450b60949a9@ti.com> (raw)
In-Reply-To: <20201007112807.GW2968@vkoul-mobl>

Hi Vinod,

On 07/10/2020 14.28, Vinod Koul wrote:
> Hi Peter,
> 
> On 02-10-20, 11:48, Peter Ujfalusi wrote:
> 
>> It depends which is best for the use case.
>> I see the metadata useful when you need to send different
>> metadata/configuration with each transfer.
>> It can be also useful when you need it seldom, but for your use case and
>> setup the dma_slave_config extended with
>>
>> enum dmaengine_peripheral peripheral_type;
>> void *peripheral_config;
>>
>> would be a bit more explicit.
>>
>> I would then deal with the peripheral config in this way:
>> when the DMA driver's device_config is called, I would take the
>> parameters and set a flag that the config needs to be processed as it
>> has changed.
>> In the next prep_slave_sg() then I would prepare the TREs with the
>> config and clear the flag that the next transfer does not need the
>> configuration anymore.
>>
>> In this way each dmaengine_slave_config() will trigger at the next
>> prep_slave_sg time configuration update for the peripheral to be
>> included in the TREs.
>> The set_config would be internal to the DMA driver, clients just need to
>> update the configuration when they need to and everything is taken care of.
> 
> Ok I am going to drop the dmaengine_peripheral and make
> peripheral_config as as you proposed.
> 
> So will add following to dma_slave_config:
>         void *peripheral_config;
> 
> Driver can define the config they would like and use.
> 
> We can eventually look at common implementations and try to unify once
> we have more users

Sound good to me!

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply	other threads:[~2020-10-07 11:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  6:34 [PATCH v3 0/3] dmaengine: Add support for QCOM GSI dma controller Vinod Koul
2020-09-23  6:34 ` [PATCH v3 1/3] dt-bindings: dmaengine: Document qcom,gpi dma binding Vinod Koul
2020-09-29 18:44   ` Rob Herring
2020-10-01 11:14     ` Vinod Koul
2020-09-23  6:34 ` [PATCH v3 2/3] dmaengine: add peripheral configuration Vinod Koul
2020-09-29  8:06   ` Peter Ujfalusi
2020-09-30  5:47     ` Peter Ujfalusi
2020-10-01 11:23     ` Vinod Koul
2020-10-02  8:48       ` Peter Ujfalusi
2020-10-07 11:28         ` Vinod Koul
2020-10-07 11:49           ` Peter Ujfalusi [this message]
2020-09-23  6:34 ` [PATCH v3 3/3] dmaengine: qcom: Add GPI dma driver Vinod Koul

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=5784e3cb-8d22-58f1-5211-a450b60949a9@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --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.