From patchwork Wed Oct 19 08:27:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5548 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp349172wrs; Wed, 19 Oct 2022 07:11:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5MzkeXD0V6GbgxE03/v/8DmuirjVFSQrQNudwlMDd4oceehh0wN/eWTm/wv8eaY5JtP9sX X-Received: by 2002:a17:906:5daa:b0:791:8933:f9f0 with SMTP id n10-20020a1709065daa00b007918933f9f0mr6917905ejv.335.1666188688433; Wed, 19 Oct 2022 07:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666188688; cv=none; d=google.com; s=arc-20160816; b=vnCfaDq+rzD/lNF/EFWDI2eEVbYatgA047LzqCLC+pvn7fajmYX+77Nok/YsFIgBWo HD1KSFrbhHfrjwn+hkN1IVzKSLuvA1bJUqPpW8ZXwePnZVhe/yRFHGNvR0j+b4GnaImr Xo+0wRB+8QZ3tEVrav3VSdEayUlpalmwGmzVeh66N79SKcy6IDIjjSBaaQc7mlG7rHF+ +ifBgZxxH2fHjpE4H0HE8gQzeCoVD2Uhw+RaEozBcjrXQMuDJZymBIJhi8g/mQsDvmyE tjFct9w6VlDialrShT4X96+jWSRSmUs+w2lV/84SIYmRisVdBjXtg83Yr5HMJC8DaDnW x8mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X9uiL9EXdNu5qNs5Z0I5RipBrKxA0xPOkyDlOc8yStI=; b=b0O6PAXJUH03Fh+rh4gn0uZ1gUghxt/uSoIek7P+4eMFJBJGz5RUkfMiurb5UwiFxP Q+8x+mhNk8fQ1LLN/nWLwtgTCoVacCmt4zDn1mG/JhmJP6JddTeHdbqSBT+vNcpiiAGh BsVMurC5rGoRHzaDRtW2TjyQOS/pH6l5r4TI4wc9nKyB/1BzTcocE8LVvKNuScC1FZYE RrRm9rPHTKBRnORiokRmwoPw2t0JIq8qwfgc0DOoKkNq68sAlSHI9q8cOL6j8iZQqsXM XciVuGcOjAwsgSmq2WpvioCg1//LaGcdHgljHfTB3xr9BQkUxg8tpT0evdtMEUJYjdUu 8uOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="W8frYP/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a1709063a0900b00769d94690fesi12627534eje.326.2022.10.19.07.10.43; Wed, 19 Oct 2022 07:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="W8frYP/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbiJSN4S (ORCPT + 99 others); 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 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747125470504838839?= X-GMAIL-MSGID: =?utf-8?q?1747125470504838839?= 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 value 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 = amdgpu_device_resume(drm_dev, false); - if (ret) + if (ret) { + if (amdgpu_device_supports_px(drm_dev)) + pci_disable_device(pdev); return ret; + } if (amdgpu_device_supports_px(drm_dev)) drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;