drm/amdgpu: allow flushing VMID0 before IB execution as well

This allows us to queue IBs which needs an up to date system domain as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
This commit is contained in:
Christian König 2017-06-28 15:41:17 +02:00 committed by Alex Deucher
parent 369421cbfa
commit df264f9e08
2 changed files with 3 additions and 1 deletions

View file

@ -172,7 +172,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
if (ring->funcs->insert_start)
ring->funcs->insert_start(ring);
if (vm) {
if (job) {
r = amdgpu_vm_flush(ring, job);
if (r) {
amdgpu_ring_undo(ring);

View file

@ -81,6 +81,8 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size,
r = amdgpu_ib_get(adev, NULL, size, &(*job)->ibs[0]);
if (r)
kfree(*job);
else
(*job)->vm_pd_addr = adev->gart.table_addr;
return r;
}