From: Vinod Koul <vinod.koul@linux.intel.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] dma: shdma: transfer based runtime PM
Date: Mon, 29 Aug 2011 17:41:49 +0530 [thread overview]
Message-ID: <1314619909.1606.130.camel@vkoul-udesk3> (raw)
In-Reply-To: <Pine.LNX.4.64.1108260107550.17190@axis700.grange>
On Fri, 2011-08-26 at 01:11 +0200, Guennadi Liakhovetski wrote:
> On Thu, 25 Aug 2011, Koul, Vinod wrote:
> > Wont it be easy to to do:
> > - pm_runtime_get() in each submit
> > - pm_runtime_put() in each callback
> > Normal case above would work just fine
> > - In terminate case, count the number of issued transactions, and call
> > pm_runtime_put() for each canceled transaction
> > (i am assuming that for each timeout error, the client will call
> > terminate)
>
> As I said, this won't be very easy to do this in a robust way. You'd have
> to scan your list of DMA blocks and see, which of them belong to one
> descriptor, and once you reach the end of that descriptor, issue a put().
> Perhaps, this can be done, but my choice went to the currently presented
> solution.
If you count the number of descriptor submitted in your submitted list
and call _put for each, I see no reason why it wont be simple and better
than current approach.
Something like:
/* since callback is set for last descriptor of chain, we call runtime
* put for that desc alone
*/
list_for_each_entry_safe(desc, __desc, sh_chan->ld_queue, node) {
if (desc->async_tx.callback)
pm_runtime_put(device);
If i read shdma correctly, descriptors are put into ld_queue of channel
and any pending should be checked in this list alone.
For normal case again you check for the callback to decide if you need
to call pm_runtime_put() or not.
--
~Vinod
next prev parent reply other threads:[~2011-08-29 12:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 14:55 Guennadi Liakhovetski
2011-08-25 14:26 ` Koul, Vinod
2011-08-25 14:37 ` Guennadi Liakhovetski
2011-08-25 14:41 ` Koul, Vinod
2011-08-25 14:55 ` Guennadi Liakhovetski
2011-08-25 17:20 ` Koul, Vinod
2011-08-25 23:11 ` Guennadi Liakhovetski
2011-08-29 12:11 ` Vinod Koul [this message]
2011-08-29 12:21 ` Guennadi Liakhovetski
2011-08-29 12:48 ` Vinod Koul
2011-08-30 7:12 ` Guennadi Liakhovetski
2011-08-30 9:57 ` Vinod Koul
2011-08-30 11:32 ` Guennadi Liakhovetski
2011-09-05 8:10 ` Guennadi Liakhovetski
2011-09-05 13:06 ` Vinod Koul
2011-09-05 15:13 ` Vinod Koul
2011-09-05 15:23 ` Guennadi Liakhovetski
2011-09-25 14:19 ` Guennadi Liakhovetski
2011-09-28 4:23 ` 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=1314619909.1606.130.camel@vkoul-udesk3 \
--to=vinod.koul@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=g.liakhovetski@gmx.de \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®