From patchwork Wed Apr 6 00:34:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 12802230 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 BB62EC433F5 for ; Wed, 6 Apr 2022 00:34:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4165C10EE8B; Wed, 6 Apr 2022 00:34:12 +0000 (UTC) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gabe.freedesktop.org (Postfix) with ESMTPS id C300510EE8B; Wed, 6 Apr 2022 00:34:11 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4KY59V1grWz4xY1; Wed, 6 Apr 2022 10:34:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1649205247; bh=QqgDmsFvSYcgWUESimdJ8L2VbsOjXioSTdWO5yoK+sc=; h=Date:From:To:Cc:Subject:From; b=rLk73Ha/H0NukY3HR2rCuYtPehs1SnGxxMUO12TO+iC+BdxvU/NtX8VODTKI18Ire dHn7QTHafzv+jbWMpLJlUZW559uyF6T8bxANz9yOXmvZhQnnieKsvog0Yys9f37AV6 ARfxov3RnOGAke0TatW4FcMNxZ1IxleoVEnMXdUtoH16ANL0VUGWOqQqFzYXUNdgQf Zd3BTmfgxZAySLkJQH5lguNtOANau84S6KSV0Q0/tLWu5CyQp+Dt2e/QA6b54ftK+n aRwNLOLNGQFl6iNBdRCX87QQBsorL/n5ayAPweM5ytoWpHA6Df0xQkmwnn4qKaM/jq uQYTsVdfTZPig== Date: Wed, 6 Apr 2022 10:34:05 +1000 From: Stephen Rothwell To: Alex Deucher , Daniel Vetter , Intel Graphics , DRI Message-ID: <20220406103405.299c06b9@canb.auug.org.au> MIME-Version: 1.0 Subject: [Intel-gfx] linux-next: manual merge of the amdgpu tree with the drm-misc tree X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , Linux Next Mailing List , Christian =?utf-8?b?S8O2bmln?= , Linux Kernel Mailing List Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi all, Today's linux-next merge of the amdgpu tree got a conflict in: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c between commit: fee2ede15542 ("drm/ttm: rework bulk move handling v5") from the drm-misc tree and commit: 184a69ca4d41 ("drm/amdgpu: separate VM PT handling into amdgpu_vm_pt.c") from the amdgpu tree. I fixed it up (I used this file from the latter and added the following patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. From: Stephen Rothwell Date: Wed, 6 Apr 2022 10:28:53 +1000 Subject: [PATCH] fix up for "drm/ttm: rework bulk move handling v5" Signed-off-by: Stephen Rothwell --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c index 958d7ed97882..a29933fa001f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c @@ -630,7 +630,14 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry) if (!entry->bo) return; + shadow = amdgpu_bo_shadowed(entry->bo); + if (shadow) { + ttm_bo_set_bulk_move(&shadow->tbo, NULL); + amdgpu_bo_unref(&shadow); + } + + ttm_bo_set_bulk_move(&entry->bo->tbo, NULL); entry->bo->vm_bo = NULL; list_del(&entry->vm_status); amdgpu_bo_unref(&shadow); @@ -653,8 +660,6 @@ static void amdgpu_vm_pt_free_dfs(struct amdgpu_device *adev, struct amdgpu_vm_pt_cursor cursor; struct amdgpu_vm_bo_base *entry; - vm->bulk_moveable = false; - for_each_amdgpu_vm_pt_dfs_safe(adev, vm, start, cursor, entry) amdgpu_vm_pt_free(entry);