diff options
author | Lukas Wunner <[email protected]> | 2016-06-08 18:47:27 +0200 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2016-06-24 08:49:25 +0200 |
commit | c1b16b45607976c76a3c41b8a319172b8b83f996 (patch) | |
tree | 5af32bc2aec71f1ce16f62696f890e055514b694 /lib/mpi/mpi-cmp.c | |
parent | 2a3467063ae3b17264578626dec2377dd48cd1c3 (diff) |
drm/nouveau: Don't leak runtime pm ref on driver unload
nouveau_drm_load() calls pm_runtime_put() if nouveau_runtime_pm != 0,
but nouveau_drm_unload() calls pm_runtime_get_sync() unconditionally.
We therefore leak a runtime pm ref whenever nouveau is loaded with
runpm=0 and then unloaded. The GPU will subsequently never runtime
suspend even if nouveau is loaded again with runpm=1.
Fix by taking the runtime pm ref under the same condition that it was
released on driver load.
Fixes: 5addcf0a5f0f ("nouveau: add runtime PM support (v0.9)")
Cc: Dave Airlie <[email protected]>
Cc: Ben Skeggs <[email protected]>
Reported-by: Karol Herbst <[email protected]>
Tested-by: Karol Herbst <[email protected]>
Tested-by: Peter Wu <[email protected]>
Signed-off-by: Lukas Wunner <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/1544b82007037601fbc510b1a50edc56c529e75f.1465392124.git.lukas@wunner.de
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions