All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Akhil R <akhilrajeev@nvidia.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"digetx@gmail.com" <digetx@gmail.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
	"wsa@kernel.org" <wsa@kernel.org>
Subject: Re: [PATCH v3] i2c: tegra: Share same DMA channel for RX and TX
Date: Thu, 23 Mar 2023 10:50:17 +0100	[thread overview]
Message-ID: <ZBwg2Rnc6d5EQ3pu@orome> (raw)
In-Reply-To: <SJ1PR12MB63395F16F399E67733EED69BC0879@SJ1PR12MB6339.namprd12.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2264 bytes --]

On Thu, Mar 23, 2023 at 09:26:00AM +0000, Akhil R wrote:
> > On 22/03/2023 12:00, Akhil R wrote:
> > >> On 22/03/2023 10:24, Akhil R wrote:
> > >>> Allocate only one DMA channel for I2C and share it for both TX and RX
> > >>> instead of using two different DMA hardware channels with the same
> > >>> slave ID. Since I2C supports only half duplex, there is no impact on
> > >>> perf with this.
> > >>>
> > >>> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> > >>
> > >> Just to confirm. This impacts all Tegra devices from Tegra20 to the
> > >> latest. Does this work for all Tegra and the different DMA controllers
> > >> that they have?
> > >>
> > > Yes, It should. I could see in the APB DMA driver that the same channel
> > > could be used for TX and RX and the direction is configured only during
> > > dma_prep_*() calls.
> > > I did not test it on a Tegra with APB DMA, but since it works very similar
> > > to GPC DMA there should not be any impact.
> > 
> > 
> > OK. BTW, this does not apply cleanly on top of -next. It appears that
> > this is based on top "i2c: tegra: Fix PEC support for SMBUS block read"
> > and that one needs to be applied first. This can be avoided if you send
> > as a series.
> > 
> Oh. Okay. I used 'git am --3way' when I tried, and the conflict went unnoticed.
> Shall I send a new version on top of -next?
> The two patches were added in different contexts and that’s why I did not
> combine them as a series.

It's usually best to combine them in a series even if they are in
slightly different contexts. This is especially true if they cause
conflicts between one another. If you send them as a series, you can
resolve the conflicts yourself (you may not even have conflicts locally
if you create the patches in the same branch), but if you send them
separately the maintainer will end up having to resolve the conflicts
(or apply in the right order).

It's best if you resolve the conflicts because you know better than the
maintainer (usually) or specify any dependencies to make it easier for
the maintainer to do the right thing.

But again, in the vast majority of cases, it's best to combine all the
work on one driver in a single series before sending out.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-03-23  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 10:24 [PATCH v3] i2c: tegra: Share same DMA channel for RX and TX Akhil R
2023-03-22 11:07 ` Jon Hunter
2023-03-22 12:00   ` Akhil R
2023-03-22 13:42     ` Jon Hunter
2023-03-23  9:26       ` Akhil R
2023-03-23  9:50         ` Thierry Reding [this message]
2023-03-23 12:16           ` Akhil R
2023-03-23 13:52             ` Thierry Reding

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=ZBwg2Rnc6d5EQ3pu@orome \
    --to=thierry.reding@gmail.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=christian.koenig@amd.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=wsa@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.