please ignore this, wrong patch. I will re-send set. Sorry, David Zhou On 2016å¹´07æ??01æ?¥ 18:05, Chunming Zhou wrote: > Change-Id: If10da1e224d81a12fd4f8d760c48178adb9e82d0 > Signed-off-by: Chunming Zhou <David1.Zhou at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++-- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 74f484d..0474b7b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -1954,6 +1954,7 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) > continue; > > kthread_park(ring->sched.thread); > + amd_sched_hw_job_reset(&ring->sched); > } > /* after all hw jobs are reset, hw fence is meaningless, so force_completion */ > amdgpu_fence_driver_force_completion(adev); > @@ -2001,8 +2002,9 @@ retry: > struct amdgpu_ring *ring = adev->rings[i]; > if (!ring) > continue; > + amd_sched_job_recovery(&ring->sched); > kthread_unpark(ring->sched.thread); > - amdgpu_ring_restore(ring, ring_sizes[i], ring_data[i]); > + kfree(ring_data[i]); > ring_sizes[i] = 0; > ring_data[i] = NULL; > } > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > index 8ac5f6a..b7670c4 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c > @@ -383,11 +383,12 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, > amdgpu_vm_ring_has_compute_vm_bug(ring))) > amdgpu_ring_emit_pipeline_sync(ring); > > - if (ring->funcs->emit_vm_flush && need_flush) { > + if (ring->funcs->emit_vm_flush && > + (need_flush || amdgpu_vm_is_gpu_reset(adev, id))) { > struct fence *fence; > > trace_amdgpu_vm_flush(pd_addr, ring->idx, vm_id); > - amdgpu_ring_emit_vm_flush(ring, vm_id, pd_addr); > + amdgpu_ring_emit_vm_flush(ring, vm_id, id->pd_gpu_addr); > > r = amdgpu_fence_emit(ring, &fence); > if (r)