From nobody Sat Feb 7 11:52:10 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E8D7C433FE for ; Wed, 19 Oct 2022 13:56:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231998AbiJSN4S (ORCPT ); Wed, 19 Oct 2022 09:56:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233847AbiJSNyK (ORCPT ); Wed, 19 Oct 2022 09:54:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A5A1D52EF; Wed, 19 Oct 2022 06:36:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F014B822ED; Wed, 19 Oct 2022 08:56:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A149C433D6; Wed, 19 Oct 2022 08:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169776; bh=jjZFb/3xxXBTdxZlxFA5QPA8Bp9bYyu1DPgojX1INGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W8frYP/u/55cWo6ZeHayBsHBjGS9RkUZBk98l16ANtps1YKn6/7/P4tZuexhQoLyH u4BWzHjp6Bvq7vfZIF9NlHIMD7N/Fcbpr3YSlAmhFKDah//BKIPLzXRIG2lWkRP7if dq+gM5soqPNfrB94eBXNEKVUdkkiynVmtRyMA2x0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Alex Deucher , Sasha Levin Subject: [PATCH 6.0 377/862] drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume() Date: Wed, 19 Oct 2022 10:27:44 +0200 Message-Id: <20221019083306.650323864@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yang Yingliang [ Upstream commit 6b11af6d1c8f5d4135332bb932baaa06e511173d ] Add missing pci_disable_device() if amdgpu_device_resume() fails. Fixes: 8e4d5d43cc6c ("drm/amdgpu: Handling of amdgpu_device_resume return v= alue for graceful teardown") Signed-off-by: Yang Yingliang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_drv.c index 429fcdf28836..de7144b06e93 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2563,8 +2563,11 @@ static int amdgpu_pmops_runtime_resume(struct device= *dev) amdgpu_device_baco_exit(drm_dev); } ret =3D amdgpu_device_resume(drm_dev, false); - if (ret) + if (ret) { + if (amdgpu_device_supports_px(drm_dev)) + pci_disable_device(pdev); return ret; + } =20 if (amdgpu_device_supports_px(drm_dev)) drm_dev->switch_power_state =3D DRM_SWITCH_POWER_ON; --=20 2.35.1