Skip to contentSkip to conversation

linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Nov 15, 2022 – Nov 16, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

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

between commit:

eca13f3c67b6 ("drm/amdgpu: use the last IB as gang leader v2")

from the drm-misc-fixes tree and commit:

1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm-misc 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.

Signature · 36 lines
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de5cb056c9ad,0528c2b1db6e..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@@ -1197,10 -1201,7 +1203,10 @@@ static int amdgpu_cs_sync_rings(struct 
  	}
  
  	for (i = 0; i < p->gang_size; ++i) {
 +		if (p->jobs[i] == leader)
 +			continue;
 +
- 		r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
+ 		r = amdgpu_sync_push_to_job(&p->sync, p->jobs[i]);
  		if (r)
  			return r;
  	}
@@@ -1241,14 -1243,11 +1247,14 @@@ static int amdgpu_cs_submit(struct amdg
  	for (i = 0; i < p->gang_size; ++i)
  		drm_sched_job_arm(&p->jobs[i]->base);
  
 -	for (i = 0; i < (p->gang_size - 1); ++i) {
 +	for (i = 0; i < p->gang_size; ++i) {
  		struct dma_fence *fence;
  
 +		if (p->jobs[i] == leader)
 +			continue;
 +
  		fence = &p->jobs[i]->base.s_fence->scheduled;
- 		r = amdgpu_sync_fence(&leader->sync, fence);
+ 		r = drm_sched_job_add_dependency(&leader->base, fence);
  		if (r)
  			goto error_cleanup;
  	}
#1 lore raw

Hi all,

Quoted 49 lines · On Wed, 16 Nov 2022 10:47:52 +1100 Stephen Rothwell <[email protected]>…

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

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

between commit:

eca13f3c67b6 ("drm/amdgpu: use the last IB as gang leader v2")

from the drm-misc-fixes tree and commit:

1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm-misc 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.

Signature · 2 lines
Cheers,
Stephen Rothwell
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de5cb056c9ad,0528c2b1db6e..000000000000
@@@ -1197,10 -1201,7 +1203,10 @@@ static int amdgpu_cs_sync_rings(struct 
  	}
 
  	for (i = 0; i < p->gang_size; ++i) {
 +		if (p->jobs[i] == leader)
 +			continue;
 +
- 		r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
+ 		r = amdgpu_sync_push_to_job(&p->sync, p->jobs[i]);
  		if (r)
  			return r;
  	}
@@@ -1241,14 -1243,11 +1247,14 @@@ static int amdgpu_cs_submit(struct amdg
  	for (i = 0; i < p->gang_size; ++i)
  		drm_sched_job_arm(&p->jobs[i]->base);
 
 -	for (i = 0; i < (p->gang_size - 1); ++i) {
 +	for (i = 0; i < p->gang_size; ++i) {
  		struct dma_fence *fence;

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

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
 
 +		if (p->jobs[i] == leader)
 +			continue;
 +
  		fence = &p->jobs[i]->base.s_fence->scheduled;
- 		r = amdgpu_sync_fence(&leader->sync, fence);
+ 		r = drm_sched_job_add_dependency(&leader->base, fence);
  		if (r)
  			goto error_cleanup;
  	}

Note that I had to keep the declaration of "leader" in amdgpu_cs_sync_rings().

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw

Am 16.11.22 um 01:25 schrieb Stephen Rothwell:

Quoted 52 lines

Hi all,

Quoted 49 lines · On Wed, 16 Nov 2022 10:47:52 +1100 Stephen Rothwell <[email protected]>…

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

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

between commit:

eca13f3c67b6 ("drm/amdgpu: use the last IB as gang leader v2")

from the drm-misc-fixes tree and commit:

1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm-misc 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.

Signature · 2 lines
Cheers,
Stephen Rothwell
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de5cb056c9ad,0528c2b1db6e..000000000000
@@@ -1197,10 -1201,7 +1203,10 @@@ static int amdgpu_cs_sync_rings(struct
   	}
 
   	for (i = 0; i < p->gang_size; ++i) {
  +		if (p->jobs[i] == leader)
  +			continue;
  +
- 		r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
+ 		r = amdgpu_sync_push_to_job(&p->sync, p->jobs[i]);
   		if (r)
   			return r;
   	}
@@@ -1241,14 -1243,11 +1247,14 @@@ static int amdgpu_cs_submit(struct amdg
   	for (i = 0; i < p->gang_size; ++i)
   		drm_sched_job_arm(&p->jobs[i]->base);
 
  -	for (i = 0; i < (p->gang_size - 1); ++i) {
  +	for (i = 0; i < p->gang_size; ++i) {
   		struct dma_fence *fence;
Quoted 10 lines

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

Quoted 9 lines
  +		if (p->jobs[i] == leader)
  +			continue;
  +
   		fence = &p->jobs[i]->base.s_fence->scheduled;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
- 		r = amdgpu_sync_fence(&leader->sync, fence);
+ 		r = drm_sched_job_add_dependency(&leader->base, fence);
   		if (r)
   			goto error_cleanup;
   	}

Note that I had to keep the declaration of "leader" in amdgpu_cs_sync_rings().

This and all your other merge resolutions look good to me.

And sorry for the noise, drm-tip somehow doesn't seem to work any more and we had a lot of conflicting patches going in through -fixes and -next.

Regards,
Christian.

Quoted 1 line