Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352875pxb; Mon, 20 Sep 2021 19:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFhOfCt9OzAh08yr4Aa/f8hI7AuKLXJ6oOergj1bdCReXELTsYV1FTtE1mIqgEa3ebXFlo X-Received: by 2002:a6b:8e50:: with SMTP id q77mr20979905iod.96.1632192626606; Mon, 20 Sep 2021 19:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192626; cv=none; d=google.com; s=arc-20160816; b=KucNVICy6xLnBkqC7gOoQmaB3IlcEbIEcOiCMCO0hY5i/NNE/4TrIOoNuV2Kzk/RF4 6aAIl5nuIGFy2H2PLMRDBAKLvCRNnke9lGj1GZ+Tn5WyOoHVWVDrFmoqe8qZBMEyrl+c QlJhtU8a3y456PU0LjmyURWaQMwUWqwiuuSQ/SJFhZWSaMDfaFP5n6xlIuUGAXKqXpXS zfecmAj5BtcT1eXmPImuxO3ttYtwj50JQf282Zb7hbxPHHOP1sUgR4t5GI1l+YR4F4WX QVsX6H45w4WgCL/cWh5uB8k/K3NUA+5/tMI0HupgAJwmkDB5j9CLkmljXfk8+PW3un/R h2zw== 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=adXxWMEitSumP7Mm6rg74psGv1SUsgqiLypN0/YVMsE=; b=Y5mmlXUH8naJ+699Z4Vlv3J5Xbdjthvz5zCDXTtYc/BXh51lLd1M7PRQYoZOaCO6KK Jo3cbd4Lnlj9nwGtpqIeyi5qxq1C/wzMXX17cKfJZgtULe347CFTKPlIUStaVWK/m5h7 uKCmCi5rBfDMn3zIbF7Re7KDxeIU5P72BBhgXL8SSKEMohIjsCl3aqRNpW+9ZA3GmtkA /wYn4Y7j2cWHoWy6INglrleUwHdcatF9tclIhuHn1JgP4bNcdkeYw/hqs1+fSP2m7hYR K98nTBFh9/NkEg9tWtEjRbKrBOtcdu0OhF67OOerA4OzgTlRSsfTcZG9fA3VIqhWAGuP niVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dMtl7GR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si3385715jac.12.2021.09.20.19.50.15; Mon, 20 Sep 2021 19:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dMtl7GR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1353477AbhITSlL (ORCPT + 99 others); Mon, 20 Sep 2021 14:41:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:53088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380865AbhITSg2 (ORCPT ); Mon, 20 Sep 2021 14:36:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 03E0163315; Mon, 20 Sep 2021 17:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158972; bh=C4cH0UDDur67eRlFyBuo6RkYsdbJ2WoZPBYTLr1K/+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dMtl7GR3SBC1Zj8zkSLgHJ569tYmL9m2CHZE3IxZ7h2rZjdpkO49C+FHmyxjyFYaK JMTevyl6K4DqDvQBRWtjgmji/uMdLU0H4TTrK1aUR95kIFdBJngEjIBpkBv4foBqHi 7VixY7TqKnZ89iBnQ77bBw/kFGtsl9cCCmSrMMKo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Zhu , Felix Kuehling , Alex Deucher Subject: [PATCH 5.14 018/168] drm/amdgpu: move iommu_resume before ip init/resume Date: Mon, 20 Sep 2021 18:42:36 +0200 Message-Id: <20210920163922.243795663@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Zhu commit f02abeb0779700c308e661a412451b38962b8a0b upstream. Separate iommu_resume from kfd_resume, and move it before other amdgpu ip init/resume. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211277 Signed-off-by: James Zhu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2342,6 +2342,10 @@ static int amdgpu_device_ip_init(struct if (r) goto init_failed; + r = amdgpu_amdkfd_resume_iommu(adev); + if (r) + goto init_failed; + r = amdgpu_device_ip_hw_init_phase1(adev); if (r) goto init_failed; @@ -3096,6 +3100,10 @@ static int amdgpu_device_ip_resume(struc { int r; + r = amdgpu_amdkfd_resume_iommu(adev); + if (r) + return r; + r = amdgpu_device_ip_resume_phase1(adev); if (r) return r; @@ -4534,6 +4542,10 @@ int amdgpu_do_asic_reset(struct list_hea dev_warn(tmp_adev->dev, "asic atom init failed!"); } else { dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n"); + r = amdgpu_amdkfd_resume_iommu(tmp_adev); + if (r) + goto out; + r = amdgpu_device_ip_resume_phase1(tmp_adev); if (r) goto out;