linux-next: manual merge of the amdgpu tree with the drm-fixes tree
Subsystems (3)
Mark Brown
maintainerHi 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -0
@@@ -60,11 -60,6 +60,6 @@@ static int amdgpu_cs_parser_init(strucif (!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 );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; 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;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;struct drm_gpu_scheduler *sched;struct drm_gem_object *obj;struct dma_fence *fence; - unsigned long index;unsigned int i;int r;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;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; 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); 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]); *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 */