diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-06-08 16:47:27 (GMT) |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-24 06:49:27 (GMT) |
commit | 19de659cb7216eb1c04889bd1a248593f296e19f (patch) | |
tree | 1f1619d6c661a99fb3d9797c5760ff23cdff433e /lib/idr.c | |
parent | 55c868a322fd8687884f0192da8b997d443cad07 (diff) | |
download | linux-19de659cb7216eb1c04889bd1a248593f296e19f.tar.xz |
drm/radeon: Don't leak runtime pm ref on driver unload
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@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/aaf71106c042126817aeca8b8e54ed468ab61ef7.1465392124.git.lukas@wunner.de
Diffstat (limited to 'lib/idr.c')
0 files changed, 0 insertions, 0 deletions