From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 5B7C84779B1; Tue, 16 Jun 2026 17:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781629847; cv=none; b=Sg6zciJZpe9FRyqEq/6dsg5IMQCf0Hn7gDj02kMr6e66GtzKaIL32HPLshy1l86HauosJSOu9GkiPwg3SVEe4dz72BhZhgZKvfKxFaqYbyTarZkNk1iaZR9equmBudgMcAWbnZykFsO9YZeiIAgyOICgJKvq3cV4uI2UyuE+Bzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781629847; c=relaxed/simple; bh=W185l6DrtvHaPgcNzO9qpp4vfaTPR6vMhoZZw4BBxXw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WbYj6dhZFmamxK+ul85CkGHh4na0cstmUpQgM+8DxuUwq3peQikXtUfRBs/tdy9B/0vdPn7rY7z4/CbC7fk1ojDmX8WcVEmJpVzdhUS2TWXVMYKgyAKaXY8VwPqA/jiSlLv0JLU1JXBwY2xaQeNq+GvQcf/345G+FJPamcF0Ag0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=o8PrCFGL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="o8PrCFGL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F137C1F00A3A; Tue, 16 Jun 2026 17:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781629846; bh=PDGkwPFK4NmciK0n5CZd03L43q5EhuBYkmgo5LwrDTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=o8PrCFGL54eYXQN6Agk/t+pWqVxsYI/BE4RMztL1eDuAVVyEoYXNXYlvcHScBflN4 55Yx/r1/2rBlcATIq/5WeIaNo2A5mOLgwgsG52giifCJytCtUgsm7/orcVFRc4KMtF ry/sjUcJZJgsSXxooeEYkAon9/wp76UNc+iQ11D8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Christian=20K=C3=B6nig?= , Vitaly Prosyak , Alex Deucher Subject: [PATCH 6.6 363/452] drm/amdgpu: restart the CS if some parts of the VM are still invalidated Date: Tue, 16 Jun 2026 20:29:50 +0530 Message-ID: <20260616145136.158449521@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145117.796205997@linuxfoundation.org> References: <20260616145117.796205997@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian König commit 40396ffdf6120e2380706c59e1a84d7e765a37b6 upstream. Make sure that we only submit work with full up to date VM page tables. Backport to 7.1 and older. Signed-off-by: Christian König Reviewed-by: Vitaly Prosyak Tested-by: Vitaly Prosyak Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 59720bfd8c6dbebeb8d5a7ab64241b007efd9213) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1272,6 +1272,7 @@ static int amdgpu_cs_submit(struct amdgp { struct amdgpu_fpriv *fpriv = p->filp->driver_priv; struct amdgpu_job *leader = p->gang_leader; + struct amdgpu_vm *vm = &fpriv->vm; struct amdgpu_bo_list_entry *e; struct drm_gem_object *gobj; unsigned long index; @@ -1317,7 +1318,8 @@ static int amdgpu_cs_submit(struct amdgp e->range); e->range = NULL; } - if (r) { + + if (r || !list_empty(&vm->invalidated)) { r = -EAGAIN; mutex_unlock(&p->adev->notifier_lock); return r;