From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 712FD13F016; Tue, 27 Feb 2024 14:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042842; cv=none; b=Xrt3wcUWSQOaQcKc4Ec7WxsXrRHdBQ9SosueM62A3EoaFsd7wwpoX+UkaN+4tdqj/lVq2pzpr3WQRHBzS/MQ9ruF19YW38mD1dM8wcVDV/Md95wYkZ5bfPpuOyuYf+ITtp7t0mr3krX6IIBCkGY1KvnXymZzZdYDex//UVUtCO8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042842; c=relaxed/simple; bh=YToi3ooYWjVo/t4aynsi5qX9ZMilkcNgGThLqf0XeCU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gX3vjOe5TXxRQNmSnO+bG/tDUSROyKviX7ExAatIBJJ18rGwf7wchy2fLMNmDfoLwI3ymVvammx/P7IycM3mNEz3YBSdFrL7RJDULIOxAFnudnbjEVTSYAARC0UU3F2YpTAewXXXfdWMPNkjqcgMa2GygmtqFwwb8YfGUuxI5x0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pRIuT5Dm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pRIuT5Dm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2C56C433F1; Tue, 27 Feb 2024 14:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709042842; bh=YToi3ooYWjVo/t4aynsi5qX9ZMilkcNgGThLqf0XeCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pRIuT5Dmem97nODtZsSlDia7vcQwe4hFlRKFF+EwDoUtkWeXs/SXf+BD2qhzrjoLx D8RcFqhmEbzP4S99sNVioT982Iknzz4qUXVWN+LzAvbZW+xa4elnCtRwSO0Dg+0bJV I3B5QdkVmhAJjcQJZ3a2kMwYrEpf2orY0Jqe6mR0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yifan Zhang , James Zhu , Felix Kuehling , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 140/245] drm/amdgpu: init iommu after amdkfd device init Date: Tue, 27 Feb 2024 14:25:28 +0100 Message-ID: <20240227131619.758142249@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131615.098467438@linuxfoundation.org> References: <20240227131615.098467438@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yifan Zhang [ Upstream commit 286826d7d976e7646b09149d9bc2899d74ff962b ] This patch is to fix clinfo failure in Raven/Picasso: Number of platforms: 1 Platform Profile: FULL_PROFILE Platform Version: OpenCL 2.2 AMD-APP (3364.0) Platform Name: AMD Accelerated Parallel Processing Platform Vendor: Advanced Micro Devices, Inc. Platform Extensions: cl_khr_icd cl_amd_event_callback Platform Name: AMD Accelerated Parallel Processing Number of devices: 0 Signed-off-by: Yifan Zhang Reviewed-by: James Zhu Tested-by: James Zhu Acked-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 5f6c32ec674d3..222a1d9ecf163 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2487,10 +2487,6 @@ 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; @@ -2529,6 +2525,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) if (!adev->gmc.xgmi.pending_reset) amdgpu_amdkfd_device_init(adev); + r = amdgpu_amdkfd_resume_iommu(adev); + if (r) + goto init_failed; + amdgpu_fru_get_product_info(adev); init_failed: -- 2.43.0