From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F0A0C433FE for ; Tue, 9 Nov 2021 01:00:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DF166124D for ; Tue, 9 Nov 2021 01:00:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3DF166124D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E69AD89F07; Tue, 9 Nov 2021 01:00:00 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id E629C89F07; Tue, 9 Nov 2021 00:59:59 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D4C461353; Tue, 9 Nov 2021 00:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419599; bh=UENeAA502HIHNyO7CyFRjrTKbnGmtxfBOjhgp7HsDCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNTB/b7b9ta4ueNp5+q5kFJBViKu7PiWTp61gZkdwjNWZSnRJ1fwv8DenJwXxZvIQ gaBqw+cVc51VV/ohXToGzk0n4naHAcHzkbKsi/3RoWudb35L+xS3DzGp0R82a36+ri kIjIR3RBgf/DMtWaiWSNK0qrUT3HXhKyONHmLHCfUKeL7wrpkLN7J+V2juumyTSORQ PAM0Q5zj0oLs+3/ZSmtlvSmQEJ91MEvXhma6Qy5A2gnuX1tTb8QJKk8c0PJTYIKpYU JuYBWdXN3h0yR8juVvq/IfMOs/0+6MdIdVeNxX3zNTAQO3ovuWwwHFYlF4qd2ZzVt0 Fbzlzxwy/HxoA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 011/146] drm/amdgpu: move iommu_resume before ip init/resume Date: Mon, 8 Nov 2021 12:42:38 -0500 Message-Id: <20211108174453.1187052-11-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174453.1187052-1-sashal@kernel.org> References: <20211108174453.1187052-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , andrey.grodzovsky@amd.com, Jack.Zhang1@amd.com, evan.quan@amd.com, airlied@linux.ie, Felix Kuehling , Xinhui.Pan@amd.com, amd-gfx@lists.freedesktop.org, lijo.lazar@amd.com, shaoyun.liu@amd.com, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, Alex Deucher , James Zhu , christian.koenig@amd.com, Hawking.Zhang@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: James Zhu [ Upstream commit 9cec53c18a3170c7e5673c414da56aeecee94832 ] 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 Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index af9bdf16eefd4..f5ce8bcb313e5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2394,6 +2394,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) 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; -- 2.33.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67C7AC433EF for ; Tue, 9 Nov 2021 01:00:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CC0061279 for ; Tue, 9 Nov 2021 01:00:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2CC0061279 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 266E989FE8; Tue, 9 Nov 2021 01:00:01 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id E629C89F07; Tue, 9 Nov 2021 00:59:59 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D4C461353; Tue, 9 Nov 2021 00:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419599; bh=UENeAA502HIHNyO7CyFRjrTKbnGmtxfBOjhgp7HsDCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNTB/b7b9ta4ueNp5+q5kFJBViKu7PiWTp61gZkdwjNWZSnRJ1fwv8DenJwXxZvIQ gaBqw+cVc51VV/ohXToGzk0n4naHAcHzkbKsi/3RoWudb35L+xS3DzGp0R82a36+ri kIjIR3RBgf/DMtWaiWSNK0qrUT3HXhKyONHmLHCfUKeL7wrpkLN7J+V2juumyTSORQ PAM0Q5zj0oLs+3/ZSmtlvSmQEJ91MEvXhma6Qy5A2gnuX1tTb8QJKk8c0PJTYIKpYU JuYBWdXN3h0yR8juVvq/IfMOs/0+6MdIdVeNxX3zNTAQO3ovuWwwHFYlF4qd2ZzVt0 Fbzlzxwy/HxoA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 011/146] drm/amdgpu: move iommu_resume before ip init/resume Date: Mon, 8 Nov 2021 12:42:38 -0500 Message-Id: <20211108174453.1187052-11-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174453.1187052-1-sashal@kernel.org> References: <20211108174453.1187052-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Jack.Zhang1@amd.com, evan.quan@amd.com, airlied@linux.ie, Felix Kuehling , Xinhui.Pan@amd.com, amd-gfx@lists.freedesktop.org, lijo.lazar@amd.com, shaoyun.liu@amd.com, dri-devel@lists.freedesktop.org, Alex Deucher , James Zhu , christian.koenig@amd.com, Hawking.Zhang@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: James Zhu [ Upstream commit 9cec53c18a3170c7e5673c414da56aeecee94832 ] 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 Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index af9bdf16eefd4..f5ce8bcb313e5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2394,6 +2394,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) 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; -- 2.33.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0974FC433F5 for ; Tue, 9 Nov 2021 01:00:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7A1961353 for ; Tue, 9 Nov 2021 01:00:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241513AbhKIBCt (ORCPT ); Mon, 8 Nov 2021 20:02:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:58856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241498AbhKIBCo (ORCPT ); Mon, 8 Nov 2021 20:02:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D4C461353; Tue, 9 Nov 2021 00:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419599; bh=UENeAA502HIHNyO7CyFRjrTKbnGmtxfBOjhgp7HsDCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNTB/b7b9ta4ueNp5+q5kFJBViKu7PiWTp61gZkdwjNWZSnRJ1fwv8DenJwXxZvIQ gaBqw+cVc51VV/ohXToGzk0n4naHAcHzkbKsi/3RoWudb35L+xS3DzGp0R82a36+ri kIjIR3RBgf/DMtWaiWSNK0qrUT3HXhKyONHmLHCfUKeL7wrpkLN7J+V2juumyTSORQ PAM0Q5zj0oLs+3/ZSmtlvSmQEJ91MEvXhma6Qy5A2gnuX1tTb8QJKk8c0PJTYIKpYU JuYBWdXN3h0yR8juVvq/IfMOs/0+6MdIdVeNxX3zNTAQO3ovuWwwHFYlF4qd2ZzVt0 Fbzlzxwy/HxoA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: James Zhu , Felix Kuehling , Alex Deucher , Sasha Levin , christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, evan.quan@amd.com, Hawking.Zhang@amd.com, andrey.grodzovsky@amd.com, shaoyun.liu@amd.com, Jack.Zhang1@amd.com, lijo.lazar@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.15 011/146] drm/amdgpu: move iommu_resume before ip init/resume Date: Mon, 8 Nov 2021 12:42:38 -0500 Message-Id: <20211108174453.1187052-11-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174453.1187052-1-sashal@kernel.org> References: <20211108174453.1187052-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Zhu [ Upstream commit 9cec53c18a3170c7e5673c414da56aeecee94832 ] 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 Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index af9bdf16eefd4..f5ce8bcb313e5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2394,6 +2394,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) 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; -- 2.33.0