Linux-Next discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the amdgpu tree with the drm-fixes tree
Date: Mon, 8 Jun 2026 12:29:57 +0100	[thread overview]
Message-ID: <aiantThfzBd9yRkF@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]

Hi all,

Today's linux-next merge of the amdgpu tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

between commit:

  40396ffdf6120 ("drm/amdgpu: restart the CS if some parts of the VM are still invalidated")

from the drm-fixes tree and commit:

  59720bfd8c6db ("drm/amdgpu: restart the CS if some parts of the VM are still invalidated")

from the amdgpu tree.

I fixed it up (see below) 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.

diff --combined drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 548a4f14a9f81,fc071efd4c255..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@@ -60,11 -60,6 +60,6 @@@ static int amdgpu_cs_parser_init(struc
  	if (!p->ctx)
  		return -EINVAL;
  
- 	if (atomic_read(&p->ctx->guilty)) {
- 		amdgpu_ctx_put(p->ctx);
- 		return -ECANCELED;
- 	}
- 
  	amdgpu_sync_create(&p->sync);
  	drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
  		      DRM_EXEC_IGNORE_DUPLICATES, 0);
@@@ -850,6 -845,7 +845,6 @@@ static int amdgpu_cs_parser_bos(struct 
  	struct amdgpu_vm *vm = &fpriv->vm;
  	struct amdgpu_bo_list_entry *e;
  	struct drm_gem_object *obj;
 -	unsigned long index;
  	unsigned int i;
  	int r;
  
@@@ -960,7 -956,7 +955,7 @@@
  		goto out_free_user_pages;
  	}
  
 -	drm_exec_for_each_locked_object(&p->exec, index, obj) {
 +	drm_exec_for_each_locked_object(&p->exec, obj) {
  		r = amdgpu_cs_bo_validate(p, gem_to_amdgpu_bo(obj));
  		if (unlikely(r))
  			goto out_free_user_pages;
@@@ -1157,7 -1153,7 +1152,7 @@@ static int amdgpu_cs_vm_handling(struc
  			return r;
  	}
  
 -	r = amdgpu_vm_handle_moved(adev, vm, &p->exec.ticket);
 +	r = amdgpu_vm_handle_moved(adev, vm, drm_exec_ticket(&p->exec));
  	if (r)
  		return r;
  
@@@ -1200,6 -1196,7 +1195,6 @@@ static int amdgpu_cs_sync_rings(struct 
  	struct drm_gpu_scheduler *sched;
  	struct drm_gem_object *obj;
  	struct dma_fence *fence;
 -	unsigned long index;
  	unsigned int i;
  	int r;
  
@@@ -1210,7 -1207,7 +1205,7 @@@
  		return r;
  	}
  
 -	drm_exec_for_each_locked_object(&p->exec, index, obj) {
 +	drm_exec_for_each_locked_object(&p->exec, obj) {
  		struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
  
  		struct dma_resv *resv = bo->tbo.base.resv;
@@@ -1280,6 -1277,7 +1275,6 @@@ static int amdgpu_cs_submit(struct amdg
  	struct amdgpu_vm *vm = &fpriv->vm;
  	struct amdgpu_bo_list_entry *e;
  	struct drm_gem_object *gobj;
 -	unsigned long index;
  	unsigned int i;
  	uint64_t seq;
  	int r;
@@@ -1323,14 -1321,14 +1318,14 @@@
  		e->range = NULL;
  	}
  
- 	if (r || !list_empty(&vm->invalidated)) {
+ 	if (r || !list_empty(&vm->individual.moved)) {
  		r = -EAGAIN;
  		mutex_unlock(&p->adev->notifier_lock);
  		return r;
  	}
  
  	p->fence = dma_fence_get(&leader->base.s_fence->finished);
 -	drm_exec_for_each_locked_object(&p->exec, index, gobj) {
 +	drm_exec_for_each_locked_object(&p->exec, gobj) {
  
  		ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo);
  
@@@ -1361,7 -1359,7 +1356,7 @@@
  	cs->out.handle = seq;
  	leader->uf_sequence = seq;
  
 -	amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->exec.ticket);
 +	amdgpu_vm_bo_trace_cs(&fpriv->vm, drm_exec_ticket(&p->exec));
  	for (i = 0; i < p->gang_size; ++i) {
  		amdgpu_job_free_resources(p->jobs[i]);
  		trace_amdgpu_cs_ioctl(p->jobs[i]);
@@@ -1796,7 -1794,7 +1791,7 @@@ int amdgpu_cs_find_mapping(struct amdgp
  	*map = mapping;
  
  	/* Double check that the BO is reserved by this CS */
 -	if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != &parser->exec.ticket)
 +	if (dma_resv_locking_ctx((*bo)->tbo.base.resv) != drm_exec_ticket(&parser->exec))
  		return -EINVAL;
  
  	/* Make sure VRAM is allocated contigiously */

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-06-08 11:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 11:29 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-05 13:37 linux-next: manual merge of the amdgpu tree with the drm-fixes tree Mark Brown
2026-02-27 14:00 Mark Brown
2021-07-23  2:58 Stephen Rothwell
2021-07-23  3:08 ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiantThfzBd9yRkF@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox