]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
net: bgmac: Fix return value check for fixed_phy_register()
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_job.c
index 9e6f2fa8e2fe50ac0a0ba5b342dc735a8965cd20..78476bc75b4e1d151b4b5632126392dea6e984d9 100644 (file)
@@ -109,7 +109,7 @@ int amdgpu_job_alloc(struct amdgpu_device *adev, struct amdgpu_vm *vm,
        (*job)->vm = vm;
 
        amdgpu_sync_create(&(*job)->explicit_sync);
-       (*job)->vram_lost_counter = atomic_read(&adev->vram_lost_counter);
+       (*job)->generation = amdgpu_vm_generation(adev, vm);
        (*job)->vm_pd_addr = AMDGPU_BO_INVALID_OFFSET;
 
        if (!entity)
@@ -295,7 +295,7 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
        trace_amdgpu_sched_run_job(job);
 
        /* Skip job if VRAM is lost and never resubmit gangs */
-       if (job->vram_lost_counter != atomic_read(&adev->vram_lost_counter) ||
+       if (job->generation != amdgpu_vm_generation(adev, job->vm) ||
            (job->job_run_counter && job->gang_submit))
                dma_fence_set_error(finished, -ECANCELED);
 
This page took 0.036148 seconds and 4 git commands to generate.