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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9769CC433F5 for ; Tue, 12 Apr 2022 00:47:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1608810FAC8; Tue, 12 Apr 2022 00:47:09 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54CF110FAC8; Tue, 12 Apr 2022 00:47:07 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id BCA85617DA; Tue, 12 Apr 2022 00:47:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC6AC385A4; Tue, 12 Apr 2022 00:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649724425; bh=Ya7afj+D7KNw3CZW5DvBGMDCxih98osk7a0l9Chxy6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DV+O8Irp9YF2IgjeaGxbv4JANpP/Lx5MZBNEEfYkloazEvJWfrS1XP1BORKe42KJ1 hodtfXpaz4mN6tieHD4BXEogJRBgGd59uabQ4wML8NM4F6dQqQAm1giaAIoGKbTPVU r8ZSy2k7KHcGlLvb5mlvHEdUjHyDtvBPsAlbK6sHEMGTOTSV8Ky9EnhrMPXnqBNL2J 6D2itHh5qbzrszvr4zu3iPHJvXhctzARaaCHxrQF35CD71E05yL+zZtiHeBIR/rR7M +Ici/YAE5wc0JC5mZ/jMnHnrDqdkv/97bIKksXgCCO+Ow4hXT8T+bHnxVPn2nU6bJC 7KO8p+QRDAU6w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 04/41] drm/amdgpu: conduct a proper cleanup of PDB bo Date: Mon, 11 Apr 2022 20:46:16 -0400 Message-Id: <20220412004656.350101-4-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412004656.350101-1-sashal@kernel.org> References: <20220412004656.350101-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 , tao.zhou1@amd.com, Guchun Chen , airlied@linux.ie, Xinhui.Pan@amd.com, amd-gfx@lists.freedesktop.org, YiPeng.Chai@amd.com, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, Alex Deucher , victor.skvortsov@amd.com, john.clements@amd.com, =?UTF-8?q?Christian=20K=C3=B6nig?= , Hawking.Zhang@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Guchun Chen [ Upstream commit 2d505453f38e18d42ba7d5428aaa17aaa7752c65 ] Use amdgpu_bo_free_kernel instead of amdgpu_bo_unref to perform a proper cleanup of PDB bo. v2: update subject to be more accurate Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index c67e21244342..6dc16ccf6c81 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1652,7 +1652,7 @@ static int gmc_v9_0_sw_fini(void *handle) amdgpu_gem_force_release(adev); amdgpu_vm_manager_fini(adev); amdgpu_gart_table_vram_free(adev); - amdgpu_bo_unref(&adev->gmc.pdb0_bo); + amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0); amdgpu_bo_fini(adev); return 0; -- 2.35.1