public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: Ben Skeggs <bskeggs@redhat.com>,
	nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, gnurou@gmail.com
Subject: Re: [PATCH] drm/nouveau: handle -EACCES runtime PM return code
Date: Mon, 10 Feb 2014 13:34:25 +0100	[thread overview]
Message-ID: <20140210123424.GE20143@ulmo.nvidia.com> (raw)
In-Reply-To: <1392011892-4339-1-git-send-email-acourbot@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

On Mon, Feb 10, 2014 at 02:58:12PM +0900, Alexandre Courbot wrote:
> pm_runtime_get*() may return -EACCESS to indicate a device does not have

s/-EACCESS/-EACCES/

> runtime PM enabled. This is the case when the nouveau.runpm parameter is
> set to 0, and is not an error in that context. Handle this case without
> failure.
> 
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
>  drivers/gpu/drm/nouveau/dispnv04/crtc.c     | 2 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c       | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)

I'm not sure if the commit message is entirely accurate. Looking at the
various runtime power-management functions in nouveau_drm.c (such as
nouveau_pmops_runtime_suspend() for example), they seem to return
-EINVAL if the nouveau.runpm parameter is set to 0.

However it seems like -EACCES is indeed returned when runtime power-
management hasn't been enabled for a device. This is done automatically
for PCI devices, but not for platform devices. We don't support runtime
power-management on gk20a yet, therefore pm_runtime_enable() is never
called, causing disable_depth to remain at -1 and therefore runtime PM
helpers return -EACCES.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-02-10 12:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10  5:58 [PATCH] drm/nouveau: handle -EACCES runtime PM return code Alexandre Courbot
2014-02-10 12:34 ` Thierry Reding [this message]
2014-02-11  4:14   ` Alexandre Courbot
2014-02-12  5:00     ` [PATCH v2] " Alexandre Courbot
2014-02-14  1:59       ` Ben Skeggs

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=20140210123424.GE20143@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnurou@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.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