[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1479082460.717629626@decadent.org.uk>
Date: Mon, 14 Nov 2016 00:14:20 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org,
"Alex Deucher" <alexander.deucher@....com>,
"Dave Airlie" <airlied@...hat.com>,
"Lukas Wunner" <lukas@...ner.de>,
"Daniel Vetter" <daniel.vetter@...ll.ch>
Subject: [PATCH 3.16 019/346] drm/radeon: Don't leak runtime pm ref on
driver unload
3.16.39-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <lukas@...ner.de>
commit 19de659cb7216eb1c04889bd1a248593f296e19f upstream.
radeon_driver_load_kms() calls pm_runtime_put_autosuspend() if
radeon_is_px(dev), but radeon_driver_unload_kms() calls
pm_runtime_get_sync() unconditionally. We therefore leak a runtime pm
ref whenever radeon is unloaded on a non-PX machine or if runpm=0. The
GPU will subsequently never runtime suspend after loading radeon again.
Fix by taking the runtime pm ref under the same condition that it was
released on driver load.
Fixes: 10ebc0bc0934 ("drm/radeon: add runtime PM support (v2)")
Cc: Dave Airlie <airlied@...hat.com>
Cc: Alex Deucher <alexander.deucher@....com>
Signed-off-by: Lukas Wunner <lukas@...ner.de>
Acked-by: Alex Deucher <alexander.deucher@....com>
Signed-off-by: Daniel Vetter <daniel.vetter@...ll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/aaf71106c042126817aeca8b8e54ed468ab61ef7.1465392124.git.lukas@wunner.de
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/gpu/drm/radeon/radeon_kms.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -61,7 +61,9 @@ int radeon_driver_unload_kms(struct drm_
if (rdev->rmmio == NULL)
goto done_free;
- pm_runtime_get_sync(dev->dev);
+ if (radeon_is_px(dev)) {
+ pm_runtime_get_sync(dev->dev);
+ }
radeon_acpi_fini(rdev);
Powered by blists - more mailing lists