All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Sekhar Nori <nsekhar@ti.com>, d-gerlach@ti.com
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	tony@atomide.com, nm@ti.com
Subject: Re: [PATCH v9] ARM: omap: edma: add suspend resume hook
Date: Fri, 14 Nov 2014 18:07:15 +0100	[thread overview]
Message-ID: <546636C3.8070202@zonque.org> (raw)
In-Reply-To: <546635DB.4020202@ti.com>

Hi Sekhar,

On 11/14/2014 06:03 PM, Sekhar Nori wrote:
> I think I have asked this before, and I am still not sure why this call 
> to pm_runtime_get_sync() is needed here. From my testing today, this 
> does seem to be a a no-op and this call returns from rpm_resume() 
> because of this check:
> 
> 	else if (dev->power.disable_depth == 1 && dev->power.is_suspended
> 	    && dev->power.runtime_status == RPM_ACTIVE)
> 		retval = 1;

Yes. IIRC, it was in fact not needed.

> So, AFAICS, the net effect is an increment of dev->power.usage_count
> (which is already greater than 0) and its subsequent decrement at the
> end of the function.
> 
> After removing this call I did not see any EDMA malfunction as well 
> (can access MMC/SD just fine after suspend/resume cycle).
> 
> So, any objections to merging this patch with the attached hunk 
> applied?

Looks good to me, we can still add it back later if it turns out to be
needed.


Thanks,
Daniel


> Thanks,
> Sekhar
> 
> ---8<---
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 1f492d5be9c0..79de6a23047b 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1803,13 +1803,7 @@ static int edma_probe(struct platform_device *pdev)
>  
>  static int edma_pm_resume(struct device *dev)
>  {
> -       int i, j, r;
> -
> -       r = pm_runtime_get_sync(dev);
> -       if (r < 0) {
> -               dev_err(dev, "%s: get_sync returned %d\n", __func__, r);
> -               return r;
> -       }
> +       int i, j;
>  
>         for (j = 0; j < arch_num_cc; j++) {
>                 struct edma *cc = edma_cc[j];
> @@ -1844,8 +1838,6 @@ static int edma_pm_resume(struct device *dev)
>                 }
>         }
>  
> -       pm_runtime_put_sync(dev);
> -
>         return 0;
>  }
> 
> 


WARNING: multiple messages have this Message-ID (diff)
From: daniel@zonque.org (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9] ARM: omap: edma: add suspend resume hook
Date: Fri, 14 Nov 2014 18:07:15 +0100	[thread overview]
Message-ID: <546636C3.8070202@zonque.org> (raw)
In-Reply-To: <546635DB.4020202@ti.com>

Hi Sekhar,

On 11/14/2014 06:03 PM, Sekhar Nori wrote:
> I think I have asked this before, and I am still not sure why this call 
> to pm_runtime_get_sync() is needed here. From my testing today, this 
> does seem to be a a no-op and this call returns from rpm_resume() 
> because of this check:
> 
> 	else if (dev->power.disable_depth == 1 && dev->power.is_suspended
> 	    && dev->power.runtime_status == RPM_ACTIVE)
> 		retval = 1;

Yes. IIRC, it was in fact not needed.

> So, AFAICS, the net effect is an increment of dev->power.usage_count
> (which is already greater than 0) and its subsequent decrement at the
> end of the function.
> 
> After removing this call I did not see any EDMA malfunction as well 
> (can access MMC/SD just fine after suspend/resume cycle).
> 
> So, any objections to merging this patch with the attached hunk 
> applied?

Looks good to me, we can still add it back later if it turns out to be
needed.


Thanks,
Daniel


> Thanks,
> Sekhar
> 
> ---8<---
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 1f492d5be9c0..79de6a23047b 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1803,13 +1803,7 @@ static int edma_probe(struct platform_device *pdev)
>  
>  static int edma_pm_resume(struct device *dev)
>  {
> -       int i, j, r;
> -
> -       r = pm_runtime_get_sync(dev);
> -       if (r < 0) {
> -               dev_err(dev, "%s: get_sync returned %d\n", __func__, r);
> -               return r;
> -       }
> +       int i, j;
>  
>         for (j = 0; j < arch_num_cc; j++) {
>                 struct edma *cc = edma_cc[j];
> @@ -1844,8 +1838,6 @@ static int edma_pm_resume(struct device *dev)
>                 }
>         }
>  
> -       pm_runtime_put_sync(dev);
> -
>         return 0;
>  }
> 
> 

  reply	other threads:[~2014-11-14 17:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  8:52 [PATCH v9] ARM: omap: edma: add suspend resume hook Daniel Mack
2014-08-26  8:52 ` Daniel Mack
2014-11-05 15:57 ` Dave Gerlach
2014-11-05 15:57   ` Dave Gerlach
2014-11-05 16:04   ` Sekhar Nori
2014-11-05 16:04     ` Sekhar Nori
2014-11-05 18:10     ` Dave Gerlach
2014-11-05 18:10       ` Dave Gerlach
2014-11-06  8:33       ` Sekhar Nori
2014-11-06  8:33         ` Sekhar Nori
2014-11-06 14:36         ` Dave Gerlach
2014-11-06 14:36           ` Dave Gerlach
2014-11-14 17:03 ` Sekhar Nori
2014-11-14 17:03   ` Sekhar Nori
2014-11-14 17:07   ` Daniel Mack [this message]
2014-11-14 17:07     ` Daniel Mack
2014-11-17 15:03     ` Sekhar Nori
2014-11-17 15:03       ` Sekhar Nori

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=546636C3.8070202@zonque.org \
    --to=daniel@zonque.org \
    --cc=d-gerlach@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.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.