Since we cannot ensure VRAM is consistent after a GPU reset, page table shadowing is necessary. Shadowed page tables are, in a sense, a method to recover the consistent state of the page tables before the reset occurred.
We need to allocate GTT bo as the shadow of VRAM bo when creating page table, and make them the same. After gpu reset, we will need to use SDMA to copy GTT bo content to VRAM bo, then page table will be recoveried. V2: Shadow bo uses a shadow entity running on normal run queue, after gpu reset, we need to wait for all shadow jobs finished first, then recovery page table from shadow. V3: Addressed Christian comments for shadow bo part. V4: Switch back to update page table twice (one of two is for shadow) V5: make it be gerneic shadow bo support. Address Christian comments. Chunming Zhou (8): drm/amdgpu: add need backup function V2 drm/amdgpu: add direct submision option for copy_buffer drm/amdgpu: sync bo and shadow V2 drm/amdgpu: update pd shadow while updating pd drm/amdgpu: update pt shadow while updating pt V2 drm/amdgpu: link all shadow bo drm/amdgpu: implement recovery vram bo from shadow drm/amdgpu: recover vram bo from shadow after gpu reset drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 ++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 94 ++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 9 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 21 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 69 ++++++++++++++------ 8 files changed, 215 insertions(+), 33 deletions(-) -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx