OpenCloudOS-Kernel/drivers/gpu/drm/amd
Lukas Wunner 4a7885476a 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: d38ceaf99e ("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
2016-06-24 08:49:30 +02:00
..
acp drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU 2016-05-25 09:44:15 -04:00
amdgpu drm/amdgpu: Don't leak runtime pm ref on driver unload 2016-06-24 08:49:30 +02:00
amdkfd drm/amdkfd: Clean up inline handling 2016-06-21 21:32:52 +02:00
include drm/amd/amdgpu: Add name field to amd_ip_funcs (v2) 2016-05-11 12:31:26 -04:00
powerplay drm/amd/powerplay/hwmgr: use kmemdup 2016-05-19 11:01:02 -04:00
scheduler drm/amd: cleanup remaining spaces and tabs v2 2016-05-11 12:31:20 -04:00