Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a58e848 authored by Alex Deucher's avatar Alex Deucher Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: Avoid leaking PM domain on driver unbind (v2)



commit 458d876eb869d5a88b53074c6c271b8b9adc0f07 upstream.

We only support vga_switcheroo and runtime pm on PX/HG systems
so forcing runpm to 1 doesn't do anything useful anyway.

Only call vga_switcheroo_init_domain_pm_ops() for PX/HG so
that the cleanup path is correct as well.  This mirrors what
radeon does as well.

v2: rework the patch originally sent by Lukas (Alex)

Acked-by: default avatarLukas Wunner <lukas@wunner.de>
Reported-by: default avatarLukas Wunner <lukas@wunner.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de> (v1)
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a66f973
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1678,8 +1678,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
	 * ignore it */
	vga_client_register(adev->pdev, adev, NULL, amdgpu_vga_set_decode);

	if (amdgpu_runtime_pm == 1)
		runtime = true;
	if (amdgpu_device_is_px(ddev))
		runtime = true;
	vga_switcheroo_register_client(adev->pdev, &amdgpu_switcheroo_ops, runtime);