Lines Matching refs:job
801 static int amdgpu_cs_free_job(struct amdgpu_job *job) in amdgpu_cs_free_job() argument
804 if (job->ibs) in amdgpu_cs_free_job()
805 for (i = 0; i < job->num_ibs; i++) in amdgpu_cs_free_job()
806 amdgpu_ib_free(job->adev, &job->ibs[i]); in amdgpu_cs_free_job()
807 kfree(job->ibs); in amdgpu_cs_free_job()
808 if (job->uf.bo) in amdgpu_cs_free_job()
809 amdgpu_bo_unref(&job->uf.bo); in amdgpu_cs_free_job()
863 struct amdgpu_job *job; in amdgpu_cs_ioctl() local
865 job = kzalloc(sizeof(struct amdgpu_job), GFP_KERNEL); in amdgpu_cs_ioctl()
866 if (!job) { in amdgpu_cs_ioctl()
871 job->base.sched = &ring->sched; in amdgpu_cs_ioctl()
872 job->base.s_entity = &parser.ctx->rings[ring->idx].entity; in amdgpu_cs_ioctl()
873 job->adev = parser.adev; in amdgpu_cs_ioctl()
874 job->owner = parser.filp; in amdgpu_cs_ioctl()
875 job->free_job = amdgpu_cs_free_job; in amdgpu_cs_ioctl()
877 job->ibs = parser.ibs; in amdgpu_cs_ioctl()
878 job->num_ibs = parser.num_ibs; in amdgpu_cs_ioctl()
882 if (job->ibs[job->num_ibs - 1].user) { in amdgpu_cs_ioctl()
883 job->uf = parser.uf; in amdgpu_cs_ioctl()
884 job->ibs[job->num_ibs - 1].user = &job->uf; in amdgpu_cs_ioctl()
888 fence = amd_sched_fence_create(job->base.s_entity, in amdgpu_cs_ioctl()
892 amdgpu_cs_free_job(job); in amdgpu_cs_ioctl()
893 kfree(job); in amdgpu_cs_ioctl()
896 job->base.s_fence = fence; in amdgpu_cs_ioctl()
901 job->ibs[job->num_ibs - 1].sequence = cs->out.handle; in amdgpu_cs_ioctl()
903 trace_amdgpu_cs_ioctl(job); in amdgpu_cs_ioctl()
904 amd_sched_entity_push_job(&job->base); in amdgpu_cs_ioctl()