[PATCH] drm/nouveau: handle -EACCES runtime PM return code (original) (raw)
Thierry Reding thierry.reding at gmail.com
Mon Feb 10 04:34:25 PST 2014
- Previous message: [PATCH] drm/nouveau: handle -EACCES runtime PM return code
- Next message: [PATCH] drm/nouveau: handle -EACCES runtime PM return code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Feb 10, 2014 at 02:58:12PM +0900, Alexandre Courbot wrote:
pmruntimeget*() 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 at nvidia.com> --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +- drivers/gpu/drm/nouveau/nouveauconnector.c | 2 +- drivers/gpu/drm/nouveau/nouveaudrm.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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140210/5f88f505/attachment.pgp>
- Previous message: [PATCH] drm/nouveau: handle -EACCES runtime PM return code
- Next message: [PATCH] drm/nouveau: handle -EACCES runtime PM return code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]