diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-06-08 19:47:27 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-24 09:49:30 +0300 |
commit | 4a7885476aa06725261393552ebeee423246784f (patch) | |
tree | fc2f9cd18d84e498f18a8c8ccdd19f2bf36ab55a /drivers/sh | |
parent | 8fecb6a9e69c184b5f7295162568dec7d9fab483 (diff) | |
download | linux-4a7885476aa06725261393552ebeee423246784f.tar.xz |
drm/amdgpu: Don't leak runtime pm ref on driver unload
amdgpu_driver_load_kms() calls pm_runtime_put_autosuspend() if
amdgpu_device_is_px(dev), but amdgpu_driver_unload_kms() calls
pm_runtime_get_sync() unconditionally. We therefore leak a runtime pm
ref whenever amdgpu is unloaded on a non-PX machine or if runpm=0. The
GPU will subsequently never runtime suspend after loading amdgpu again.
Fix by taking the runtime pm ref under the same condition that it was
released on driver load.
Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
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/86364eeb5711323608930c4f0f69046792ff6d3c.1465392124.git.lukas@wunner.de
Diffstat (limited to 'drivers/sh')
0 files changed, 0 insertions, 0 deletions