Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp754859rwe; Fri, 26 Aug 2022 13:55:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5xnjclb69/QxGzE7RLxFh6s8lPaulDE6cW5OSqDrEyCi3iYkONzB59do5HUfoNJ/asvkfz X-Received: by 2002:a17:90a:c1:b0:1f4:f757:6b48 with SMTP id v1-20020a17090a00c100b001f4f7576b48mr6197386pjd.56.1661547318737; Fri, 26 Aug 2022 13:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661547318; cv=none; d=google.com; s=arc-20160816; b=IiJmfDoMnY5FwEqS20nb4PDexIg8lJ30TyqFbOqNqBf4Kkhhzvwx5gugzUILvSQAAF UwZaXZcgVSCMeN9C8rS5SS222/nhBHwZHjQDfz2b9yph0HNkix5ktOf1JQkxDxFxK173 oTFU+Smgi61cFJZeKrWs/Xu6WtauHg3PGJ9qhXqtTEsJ/5uRpnLxA0yPu6kYTmNWqehB Uug/mxi0JcTsMVtBNkppKdR2MBN1KN5/bJTruKG/snv1fJq+0tRVHZ5j1Mp6WMC9z5jH ahHM1lSf4YuLuAcJPm5mclxNjmI3/22usaAdujtSKogrzrfWjV0EdYEhiK2PFHMrOY2b 0TiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=K/ePAycXqy51oFeXUt6JjGKkq1z8q/7xr7tRKH3+c5k=; b=MZm0eWBrHR1//h4CJ4GwUYrZzR1Rf4plgLFywjIfX1eRnbfmEl8i4MrzBqhkwGNwf2 YsaLqm5nbaXy1p/JIHqfrxTloeWLTZVS3+ptjI6b8P+8lgOKxpEFfRE8oG6sF7ZUbk44 RfwwUuJAAcMj+NpDwkfOj9hteZzqoKVGcXvcQ/SO7172PF8a90LNX8JvIMpKfI7oh/Iy YV0+DgpRFPa7Q1Si6r5eupw7gMFnJ+2R9WoJZuwaQk3AYlRiqB0wiyBpf4CNAr1WCHpx rtac9b2niO8rQGzIiQwV424BtpSHU1yzclhtDfPbl0DtwYXHb/ZTye/jaR+ADL32R009 LqMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=obakSEJ4; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a655acc000000b0041c033e9f54si2712925pgt.848.2022.08.26.13.55.05; Fri, 26 Aug 2022 13:55:18 -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=@gmail.com header.s=20210112 header.b=obakSEJ4; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245719AbiHZUlb (ORCPT + 99 others); Fri, 26 Aug 2022 16:41:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235031AbiHZUl2 (ORCPT ); Fri, 26 Aug 2022 16:41:28 -0400 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49935DB070 for ; Fri, 26 Aug 2022 13:41:27 -0700 (PDT) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-11e86b7379dso2254731fac.10 for ; Fri, 26 Aug 2022 13:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=K/ePAycXqy51oFeXUt6JjGKkq1z8q/7xr7tRKH3+c5k=; b=obakSEJ4izX3iVZj3KOtetmevh8RAX2xSvFVa7lOs66USdVv4m+7jIkQj1Ee92YRzX vwdQC9/B3BhuefYfKDrm9t20eHKN0JvZbcXejyyvF1paXlrHa7K9Wjwgp7oKCM2jvMQG tKJBFGvX0TDPsP1Y8Meus7j6M++aQddvKd28Xm7kNzV8c39UusrUtqyaCZrF0TjA7sKO ZDm2gjuL77EL/lFb51mfkRWM5tyJwN5OaU0+A1uaIOGh1me6gckcgIhe0e18w4USDjqW Hv6ildtotiYcRQgWJTMDj1UsfIthh++fIZ7OAe/gIwNrxolE1eBJNegl5ScCqzJJBjfW 5eHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=K/ePAycXqy51oFeXUt6JjGKkq1z8q/7xr7tRKH3+c5k=; b=F6dKK6JFkTy72KZ78eHi6vl9YXyHW1ceYcg2JFHogFYOfKYqIfZ1nH8u7GhY/effPK qF6+cYvltVKyCDENZsTPxoxVZw3GoycIaKzzPU04O0Lh9kPrCzfZL8CQBq57cdyKNZHC Za+uoGYXXKWZYOogAfQCzuemQbjKS/POh3WEnZnfiyC5xpBvxRFJ/iZVjhW+3A7q2hyJ PbacV4KOAYPTsS5p2v6XLxa1ia0xZ+dN1Go4u6avkpQYNPrsTDtJ5mWk27bTZdxpzAsH hU1KqNvmnADvlIfcOS18Z8BsnXATXVAxXxcSAj523FAhD1nCriqcAPere6zjb4M9q1Bv GgXg== X-Gm-Message-State: ACgBeo1QqW2cdJSTdaDSIUCwbIClXduSDp8OFMXGRYSZZOT6lmH9MHxJ d7tHXzaISpW3x0OQnAcxjvAXjGiRX+FSNVLaa1k= X-Received: by 2002:a05:6870:3484:b0:11e:4465:3d9b with SMTP id n4-20020a056870348400b0011e44653d9bmr2878995oah.46.1661546486597; Fri, 26 Aug 2022 13:41:26 -0700 (PDT) MIME-Version: 1.0 References: <20220826085754.2296572-1-yangyingliang@huawei.com> In-Reply-To: <20220826085754.2296572-1-yangyingliang@huawei.com> From: Alex Deucher Date: Fri, 26 Aug 2022 16:41:15 -0400 Message-ID: Subject: Re: [PATCH -next] drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume() To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com, pavan.ramayanam@amd.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Applied. Thanks! Alex On Fri, Aug 26, 2022 at 4:50 AM Yang Yingliang wrote: > > 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 > --- > 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; > -- > 2.25.1 >