All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vkoul@kernel.org>, Viresh Kumar <vireshk@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: [v1,2/2] dmaengine: dw: implement per-channel protection control setting
Date: Mon, 05 Nov 2018 17:06:20 +0100	[thread overview]
Message-ID: <25273848.Yt2vXhTyVK@debian64> (raw)

On Monday, November 5, 2018 3:27:41 PM CET Andy Shevchenko wrote:
> On Mon, Nov 05, 2018 at 04:22:54PM +0200, Andy Shevchenko wrote:
> > On Sun, Nov 04, 2018 at 06:01:39PM +0100, Christian Lamparter wrote:
> 
> > > +	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
> > > +	size_t chanidx = (size_t)(dwc - dw->chan);
> > 
> > We have mask field, so, index is a first set bit out of mask, __ffs(mask).
> > 
> > 	unsigned int protctl = dw->pdata->protctl[__ffs(mask)];
> 
> dwc->mask, of course.
Ok, will do. I'll sent a v2 later this week.

> Also, it's possible to use (though better to check) dwc->chan.chan_id,
> though I dunno if it's reliable.
dwc->chan.chan_id is subjected to the chan_allocation setting. 
So, if it's set to CHAN_ALLOCATION_DESCENDING the dt prop array values
for the protctl would need to be reversed as well in order to match the
other per-channel settings (for example multiblock).
So, let's not do that since this gets very confusing.

WARNING: multiple messages have this Message-ID (diff)
From: Christian Lamparter <chunkeey@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vkoul@kernel.org>, Viresh Kumar <vireshk@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v1 2/2] dmaengine: dw: implement per-channel protection control setting
Date: Mon, 05 Nov 2018 17:06:20 +0100	[thread overview]
Message-ID: <25273848.Yt2vXhTyVK@debian64> (raw)
In-Reply-To: <20181105142741.GI10650@smile.fi.intel.com>

On Monday, November 5, 2018 3:27:41 PM CET Andy Shevchenko wrote:
> On Mon, Nov 05, 2018 at 04:22:54PM +0200, Andy Shevchenko wrote:
> > On Sun, Nov 04, 2018 at 06:01:39PM +0100, Christian Lamparter wrote:
> 
> > > +	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
> > > +	size_t chanidx = (size_t)(dwc - dw->chan);
> > 
> > We have mask field, so, index is a first set bit out of mask, __ffs(mask).
> > 
> > 	unsigned int protctl = dw->pdata->protctl[__ffs(mask)];
> 
> dwc->mask, of course.
Ok, will do. I'll sent a v2 later this week.

> Also, it's possible to use (though better to check) dwc->chan.chan_id,
> though I dunno if it's reliable.
dwc->chan.chan_id is subjected to the chan_allocation setting. 
So, if it's set to CHAN_ALLOCATION_DESCENDING the dt prop array values
for the protctl would need to be reversed as well in order to match the
other per-channel settings (for example multiblock).
So, let's not do that since this gets very confusing.

             reply	other threads:[~2018-11-05 16:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 16:06 Christian Lamparter [this message]
2018-11-05 16:06 ` [PATCH v1 2/2] dmaengine: dw: implement per-channel protection control setting Christian Lamparter
  -- strict thread matches above, loose matches on Subject: below --
2018-11-06 18:36 [v1,1/2] dt-bindings: dmaengine: dw-dmac: add protection control property Christian Lamparter
2018-11-06 18:36 ` [PATCH v1 1/2] " Christian Lamparter
2018-11-05 23:06 [v1,1/2] " Rob Herring
2018-11-05 23:06 ` [PATCH v1 1/2] " Rob Herring
2018-11-05 16:23 [v1,2/2] dmaengine: dw: implement per-channel protection control setting Andy Shevchenko
2018-11-05 16:23 ` [PATCH v1 2/2] " Andy Shevchenko
2018-11-05 14:27 [v1,2/2] " Andy Shevchenko
2018-11-05 14:27 ` [PATCH v1 2/2] " Andy Shevchenko
2018-11-05 14:23 [v1,1/2] dt-bindings: dmaengine: dw-dmac: add protection control property Andy Shevchenko
2018-11-05 14:23 ` [PATCH v1 1/2] " Andy Shevchenko
2018-11-05 14:22 [v1,2/2] dmaengine: dw: implement per-channel protection control setting Andy Shevchenko
2018-11-05 14:22 ` [PATCH v1 2/2] " Andy Shevchenko
2018-11-04 17:01 [v1,2/2] " Christian Lamparter
2018-11-04 17:01 ` [PATCH v1 2/2] " Christian Lamparter
2018-11-04 17:01 [v1,1/2] dt-bindings: dmaengine: dw-dmac: add protection control property Christian Lamparter
2018-11-04 17:01 ` [PATCH v1 1/2] " Christian Lamparter

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=25273848.Yt2vXhTyVK@debian64 \
    --to=chunkeey@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=vireshk@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.