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 C8905466B74; Tue, 16 Jun 2026 16:10:45 +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=1781626246; cv=none; b=JkcjmVFVoBkSCSl3WwqmOCYzTBCzUMs12etQ5XsIRBZ1wwxcsR57JRaRHcafFCpFdYusYtehQfY0WVzvhcGZ6jH16h3xVrxAKm90kSFVLN0GbRwyTtzO4jLgSryzPUOdCoU456tsnx6lTR77/S2gwNHpaI64WMQ80EKWxj36YMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781626246; c=relaxed/simple; bh=MDOeOo/6SLgRCrFbfHQMLaCK8VMtzsewGbvBv/rv9qY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tQnjZ3+UAwCVFENbMGhmp41g2iLbqdr4F+vQIjyFeXL/rzRrADnyObMUQ5lhU5tJafnduWzn8lM7Dve7qGprldXQ3vKt5kupKJn5HRa9jyAsxv+tcRmT77GKLHMNX2x/XOmso10LmHuhvKsL34KXqYauXNFnyBeb98runUPaoAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=c4d6wHiu; 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="c4d6wHiu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C98CB1F000E9; Tue, 16 Jun 2026 16:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781626245; bh=G8caWg0dV06aoJc4OAdnG/ejJzNkhlLDC6rLjffgP/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c4d6wHiuCD/KTGSQp9/I5fUWqVAKVGcHV1hdwMbsRSkdYrBLyZ3ZmctGnKC3JNkq9 a7ViWDVFTYdAGALjY861P1rMfqP0Y+qnIaA0AXR2wzeeHQ7vl3x1EizVEqRW/pnPoy ic0qeMyWyxGlwUsUSKMq2byme7HhldEslYKJmWOY= 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.18 292/325] drm/amdgpu: restart the CS if some parts of the VM are still invalidated Date: Tue, 16 Jun 2026 20:31:28 +0530 Message-ID: <20260616145113.358474596@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145057.827196531@linuxfoundation.org> References: <20260616145057.827196531@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.18-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 @@ -1282,6 +1282,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; @@ -1327,7 +1328,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;