Received: by 10.223.185.116 with SMTP id b49csp4168269wrg; Mon, 26 Feb 2018 12:26:40 -0800 (PST) X-Google-Smtp-Source: AH8x2242GALJDtDuPd8wa5KAo9E4NQGE4DK7vlOgMr5aCg4yPvLaGxWklaQ5u5pgE0bhwSOgILAH X-Received: by 10.99.121.140 with SMTP id u134mr9210733pgc.89.1519676800009; Mon, 26 Feb 2018 12:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519676799; cv=none; d=google.com; s=arc-20160816; b=EkOMGg5dJ/DT661TLx/T0xTIW6wvaBLDS/uY+RZLUqjdg/daLyH47bgH+SIH9pIIi6 aLmlwrD8t153f94YvgonK2uQyG17TfT807fGd4NfU6wjKJxptrFOOCWRdYlPXpf4xHvF vPMXzn2wD3n02JR4rCeXFjiuwJRJwsIYZpXYbT9AvuWQ88btnMcQLZCtlYgFxkgL6Oki 9R5kp+/ys8dfBjNBWQGZfr+idSLlY6JzJS0JNEs5X7K6tkJdVavujjDwwqBKA8Jcd1yG WZyusch1ysvGYiWZ/hg749xYoDRA+4W1RwmIX7oBYbk5e6Rzng6MnCy2DTOi3wqBUxsE FYhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FXJhg8IuVYkbw5I9EUU6KXESrd4LXUpysHULgRmanRo=; b=oT3dtsRZ6aCwLtWofxO+QNalqrTPwtjn+a3FPjoQt3JIYB667Ht5X68aX8/51b4azx /C31o1mW1eOgr1P3ZFMNQa71kFBYl+J4yosd3ZdAayBUYZ9dgeTIaMv0onx/6blEuBzl imC06EaZjdw40QE8KHLa+v25VEyygSrbB1VZEiMplbURkTR1LmhC680p4EBrwP8i5OHx APSmqvycqEY9N5qz7E+tBRGzYpomLH2cex0Ym9lCgfML5eGEsxTNvZC5MjoR3UKRVCKV e1c9sBJfVuBRzixY4Dgdla3JSyb025QwCY+MyuVOb96lQmIqHb2ThGytWUEnGzshsvoy NkYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13-v6si7234374pln.750.2018.02.26.12.26.24; Mon, 26 Feb 2018 12:26:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753165AbeBZUZ3 (ORCPT + 99 others); Mon, 26 Feb 2018 15:25:29 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35420 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752060AbeBZUZZ (ORCPT ); Mon, 26 Feb 2018 15:25:25 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AEE13F4A; Mon, 26 Feb 2018 20:25:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Alex Deucher Subject: [PATCH 4.14 52/54] drm/amdgpu: Avoid leaking PM domain on driver unbind (v2) Date: Mon, 26 Feb 2018 21:22:29 +0100 Message-Id: <20180226202147.352798805@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180226202144.375869933@linuxfoundation.org> References: <20180226202144.375869933@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Deucher 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: Lukas Wunner Reported-by: Lukas Wunner Signed-off-by: Alex Deucher Signed-off-by: Lukas Wunner (v1) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2076,8 +2076,6 @@ int amdgpu_device_init(struct amdgpu_dev * 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; if (!pci_is_thunderbolt_attached(adev->pdev))