public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <nigel@nigelcunningham.com.au>
To: Yao Yuan <yao.yuan@freescale.com>, Li Leo <LeoLi@freescale.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	"stefan@agner.ch" <stefan@agner.ch>,
	Arnd Bergmann <arnd@arndb.de>,
	Dan Williams <dan.j.williams@intel.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2] dmaengine: fsl-edma: add PM suspend/resume support
Date: Mon, 17 Aug 2015 16:48:49 +1000	[thread overview]
Message-ID: <55D183D1.9020401@nigelcunningham.com.au> (raw)
In-Reply-To: <CY1PR0301MB1562103588FB0C6BEFDDBF3C83790@CY1PR0301MB1562.namprd03.prod.outlook.com>

Hi Yao.

On 17/08/15 13:59, Yao Yuan wrote:
> On Sat, Aug 15, 2015 at 7:48 AM, pku.leo < pku.leo@gmail.com > wrote:
>> On Fri, Aug 14, 2015 at 1:24 AM, Yao Yuan <yao.yuan@freescale.com> wrote:
>>> Hi Leo,
>>>
>>> Thanks for your review.
>>> About those two methods for DMA suspend that you have mentioned. We
>> have a lot of the discussions in other DMA driver like DMA for Freescale
>> PowerPC.
>>> Finally, we think the device which used the DMA transmission service should
>> cancel the transmission service in its suspend.
>>> So DMA in suspend should be idle.
>> If that's the case you should clearly state this in the commit message and in
>> code, although I don't know if it is safe to make such assumption.  There could
>> be user of the DMA that doesn't track the completion of transfers.
> I think it should be safe. In my opinion, even some client(the user of the DMA) forget to cancel its DMA transmission,
> It will just lead to PM failed but no other system and data risk.
> Although we should first fix the behavior of the client.
> Once you are no need the DMA transmission, why not stop it?
>
> Is it right?
Think of it from the end user perspective. Would you like your laptop (or whatever) to refuse to suspend because of this condition? The user may well expect that closing the lid on their laptop will reliably lead to it suspending to ram. Returning a failure here could result in a loss of data if the condition is not detected and the machine subsequently runs out of power.

I do agree that whatever is submitting DMA should be stopped first; ideally this driver would always be idle because whatever producers of work exist would already have been quiesced and output flushed.

Regards,

Nigel

  reply	other threads:[~2015-08-17  6:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  8:56 [PATCH v2] dmaengine: fsl-edma: add PM suspend/resume support Yuan Yao
2015-08-11 10:33 ` Yao Yuan
2015-08-13 20:58 ` Li Yang
2015-08-14  6:24   ` Yao Yuan
2015-08-14 23:48     ` Li Yang
2015-08-17  3:59       ` Yao Yuan
2015-08-17  6:48         ` Nigel Cunningham [this message]
2015-08-17  7:22           ` Yao Yuan
2015-08-17 19:10             ` Li Yang
2015-08-20  4:08               ` Vinod Koul
2015-09-07  7:41                 ` Yao Yuan
2015-09-09  3:02                   ` Li Leo

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=55D183D1.9020401@nigelcunningham.com.au \
    --to=nigel@nigelcunningham.com.au \
    --cc=LeoLi@freescale.com \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=stefan@agner.ch \
    --cc=vinod.koul@intel.com \
    --cc=yao.yuan@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox