Lines Matching refs:job
170 struct amdgpu_job *job) in amdgpu_vmid_gds_switch_needed() argument
172 return id->gds_base != job->gds_base || in amdgpu_vmid_gds_switch_needed()
173 id->gds_size != job->gds_size || in amdgpu_vmid_gds_switch_needed()
174 id->gws_base != job->gws_base || in amdgpu_vmid_gds_switch_needed()
175 id->gws_size != job->gws_size || in amdgpu_vmid_gds_switch_needed()
176 id->oa_base != job->oa_base || in amdgpu_vmid_gds_switch_needed()
177 id->oa_size != job->oa_size; in amdgpu_vmid_gds_switch_needed()
182 struct amdgpu_job *job) in amdgpu_vmid_compatible() argument
184 return id->pd_gpu_addr == job->vm_pd_addr && in amdgpu_vmid_compatible()
185 !amdgpu_vmid_gds_switch_needed(id, job); in amdgpu_vmid_compatible()
275 struct amdgpu_job *job, in amdgpu_vmid_grab_reserved() argument
289 !amdgpu_vmid_compatible(*id, job) || in amdgpu_vmid_grab_reserved()
314 r = amdgpu_sync_fence(&(*id)->active, &job->base.s_fence->finished); in amdgpu_vmid_grab_reserved()
318 job->vm_needs_flush = needs_flush; in amdgpu_vmid_grab_reserved()
319 job->spm_update_needed = true; in amdgpu_vmid_grab_reserved()
336 struct amdgpu_job *job, in amdgpu_vmid_grab_used() argument
347 job->vm_needs_flush = vm->use_cpu_for_update; in amdgpu_vmid_grab_used()
357 if (!amdgpu_vmid_compatible(*id, job)) in amdgpu_vmid_grab_used()
375 &job->base.s_fence->finished); in amdgpu_vmid_grab_used()
379 job->vm_needs_flush |= needs_flush; in amdgpu_vmid_grab_used()
398 struct amdgpu_job *job, struct dma_fence **fence) in amdgpu_vmid_grab() argument
413 r = amdgpu_vmid_grab_reserved(vm, ring, job, &id, fence); in amdgpu_vmid_grab()
417 r = amdgpu_vmid_grab_used(vm, ring, job, &id, fence); in amdgpu_vmid_grab()
427 &job->base.s_fence->finished); in amdgpu_vmid_grab()
431 job->vm_needs_flush = true; in amdgpu_vmid_grab()
437 job->gds_switch_needed = amdgpu_vmid_gds_switch_needed(id, job); in amdgpu_vmid_grab()
438 if (job->vm_needs_flush) { in amdgpu_vmid_grab()
443 job->vmid = id - id_mgr->ids; in amdgpu_vmid_grab()
444 job->pasid = vm->pasid; in amdgpu_vmid_grab()
446 id->gds_base = job->gds_base; in amdgpu_vmid_grab()
447 id->gds_size = job->gds_size; in amdgpu_vmid_grab()
448 id->gws_base = job->gws_base; in amdgpu_vmid_grab()
449 id->gws_size = job->gws_size; in amdgpu_vmid_grab()
450 id->oa_base = job->oa_base; in amdgpu_vmid_grab()
451 id->oa_size = job->oa_size; in amdgpu_vmid_grab()
452 id->pd_gpu_addr = job->vm_pd_addr; in amdgpu_vmid_grab()
455 trace_amdgpu_vm_grab_id(vm, ring, job); in amdgpu_vmid_grab()