[PATCH 0/9] Fix runtime pm ref leaks

Lukas Wunner lukas at wunner.de
Tue May 24 16:03:27 UTC 2016


In preparation for runtime pm on muxed dual GPU laptops,
I've fixed all runtime pm ref leaks I could find in nouveau,
radeon and amdgpu.

To ease reviewing, I've pushed this series to GitHub:
https://github.com/l1k/linux/commits/drm_runpm_fixes_v1

@Alex Deucher: I do not have an AMD GPU so couldn't test this
beyond verifying that it compiles. Please double-check the patches
and test them internally at AMD. By the way, I've noticed that
nouveau takes a runtime pm ref in ->preclose and releases it in
->postclose. This is missing in radeon and amdgpu. Please check
if it is needed.

Thanks,

Lukas

Lukas Wunner (9):
  drm/nouveau: Don't leak runtime pm ref on driver unload
  drm/nouveau: Forbid runtime pm on driver unload
  drm/radeon: Don't leak runtime pm ref on driver unload
  drm/radeon: Don't leak runtime pm ref on driver load
  drm/radeon: Forbid runtime pm on driver unload
  drm/amdgpu: Don't leak runtime pm ref on driver unload
  drm/amdgpu: Don't leak runtime pm ref on driver load
  drm/amdgpu: Forbid runtime pm on driver unload
  drm: Turn off crtc before tearing down its data structure

 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 +++++++++---
 drivers/gpu/drm/drm_crtc.c              | 13 ++++++++++++-
 drivers/gpu/drm/nouveau/nouveau_drm.c   |  6 +++++-
 drivers/gpu/drm/radeon/radeon_device.c  |  4 ++++
 drivers/gpu/drm/radeon/radeon_kms.c     |  5 ++++-
 5 files changed, 34 insertions(+), 6 deletions(-)

-- 
2.8.1



More information about the dri-devel mailing list