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

Mark Brown <[email protected]>
Newsgroups org.kernel.vger.linux-next,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi all,

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

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

between commit:

  67cf83ac8316a ("Revert "drm/sched: Embed run queue singleton into the scheduler"")

from the drm-misc-fixes tree and commits:

  4a33d82e224c8 ("drm/amdgpu: protect XCP scheduler selection")
  fa1531170d2c9 ("drm/amdgpu: add check for xcp id")
  6e8a3c24bd75f ("drm/amdgpu: bounds check xcp_id in release_sched")
  7445035dd3f22 ("drm/amdgpu: bounds check xcp ip block index")
  62d8b452615fd ("drm/amdgpu: Fix kobject cleanup in xcp sysfs")

from the drm 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 --cc drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
index 42be8ee155dde,35faea0ff17ff..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
@@@ -466,16 -467,20 +467,21 @@@ int amdgpu_xcp_open_device(struct amdgp
  void amdgpu_xcp_release_sched(struct amdgpu_device *adev,
  				  struct amdgpu_ctx_entity *entity)
  {
 -	struct drm_gpu_scheduler *sched =
 -		container_of(entity->entity.rq, typeof(*sched), rq);
 +	struct drm_gpu_scheduler *sched;
 +	struct amdgpu_ring *ring;
+ 	struct amdgpu_xcp_mgr *xcp_mgr = adev->xcp_mgr;
  
- 	if (!adev->xcp_mgr)
+ 	if (!xcp_mgr)
  		return;
  
 +	sched = entity->entity.rq->sched;
  	if (drm_sched_wqueue_ready(sched)) {
 -		struct amdgpu_ring *ring = to_amdgpu_ring(sched);
 +		ring = to_amdgpu_ring(entity->entity.rq->sched);
- 		atomic_dec(&adev->xcp_mgr->xcp[ring->xcp_id].ref_cnt);
+ 
+ 		mutex_lock(&xcp_mgr->xcp_lock);
+ 		if (ring->xcp_id < xcp_mgr->num_xcps && xcp_mgr->xcp[ring->xcp_id].valid)
+ 			atomic_dec(&xcp_mgr->xcp[ring->xcp_id].ref_cnt);
+ 		mutex_unlock(&xcp_mgr->xcp_lock);
  	}
  }
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmp8lP8ACgkQJNaLcl1U
h9Bjagf7BsMxK8nfyVpLS47rsL9RcMgypvKEhTNVx5IN4U8LugSzNaNulT4PelwY
28aDjzODL7i/oXQy1z3qOR3YUPZUcQ2zpgifMPml3mWok9GleXGFiCvF0JQKIjJR
LFF2CYeFBLZIA3y5NY3WD8J0iFZsZEhadMDdVlfVtpvypoM1zrpRSXiWmyEcopzK
8Fs7+d9xvkH7QQljrxfpVlQR7OsluZcOlZFd/9rvK01TMPbwl//fkm68C0wfaqtt
tytKwFljitrn3P8DtYVxQaBNx6b9Ufdos0uoD5nh/pZlawlaKB3KuB/M03u9hSMM
0QhZLAuOaWJLbWhoBZnPAmX9gXE8CQ==
=a72N
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.