From: Lars-Peter Clausen <lars@metafoo.de>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vinod.koul@intel.com>,
Michal Simek <michal.simek@xilinx.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [RFC PATCH] dma: pl330: add Power Management support
Date: Fri, 05 Sep 2014 17:23:49 +0200 [thread overview]
Message-ID: <5409D585.1040302@metafoo.de> (raw)
In-Reply-To: <1409929562-29583-1-git-send-email-k.kozlowski@samsung.com>
On 09/05/2014 05:06 PM, Krzysztof Kozlowski wrote:
[...]
> @@ -2168,11 +2199,23 @@ static void pl330_issue_pending(struct dma_chan *chan)
> {
> struct dma_pl330_chan *pch = to_pchan(chan);
> unsigned long flags;
> + bool power_up;
>
> spin_lock_irqsave(&pch->lock, flags);
> + power_up = list_empty(&pch->work_list);
> list_splice_tail_init(&pch->submitted_list, &pch->work_list);
> spin_unlock_irqrestore(&pch->lock, flags);
>
> + if (power_up) {
> + /*
> + * Warn on nothing pending. This may break our pm_runtime
> + * usage counter as it is updated on work_list emptiness
> + * status.
> + */
> + WARN_ON(list_empty(&pch->work_list));
> + pm_runtime_get_sync(pch->dmac->ddma.dev);
Unfortunately this does not work. pm_runtime_get_sync() may sleep, where as
the issue_pending callback needs to be able to run from contexts in which
sleeping is not possible.
> + }
> +
> pl330_tasklet((unsigned long)pch);
> }
>
[...]
next prev parent reply other threads:[~2014-09-05 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 15:06 [RFC PATCH] dma: pl330: add Power Management support Krzysztof Kozlowski
2014-09-05 15:23 ` Lars-Peter Clausen [this message]
2014-09-08 8:11 ` Krzysztof Kozlowski
2014-09-08 12:39 ` Krzysztof Kozlowski
2014-09-08 8:06 ` Michal Simek
2014-09-08 8:15 ` Krzysztof Kozlowski
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=5409D585.1040302@metafoo.de \
--to=lars@metafoo.de \
--cc=b.zolnierkie@samsung.com \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=k.kozlowski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=michal.simek@xilinx.com \
--cc=vinod.koul@intel.com \
/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.