summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2021-11-04 12:07:18 +0100
committerThomas Hellström <thomas.hellstrom@linux.intel.com>2021-11-05 09:05:32 +0100
commit2b0a750caf332a24f62f6960820d24d885f2efc2 (patch)
treebb1a143f99e2191c60e8d0388a31ea28e5798d7e /include
parent3589fdbd3b2085e273b6ea1e9f27a211e0ef74f8 (diff)
downloadlinux-2b0a750caf332a24f62f6960820d24d885f2efc2.tar.bz2
drm/i915/ttm: Failsafe migration blits
If the initial fill blit or copy blit of an object fails, the old content of the data might be exposed and read as soon as either CPU- or GPU PTEs are set up to point at the pages. Intercept the blit fence with an async callback that checks the blit fence for errors and if there are errors performs an async cpu blit instead. If there is a failure to allocate the async dma_fence_work, allocate it on the stack and sync wait for the blit to complete. Add selftests that simulate gpu blit failures and failure to allocate the async dma_fence_work. A previous version of this pach used dma_fence_work, now that's opencoded which adds more code but might lower the latency somewhat in the common non-error case. v3: - Style fixes (Matthew Auld) v4: - Use "#if IS_ENABLED()" instead of #ifdef (Matthew Auld) v5: - Fix an issue where we, if the dependency was already signaled, might end up waiting for a memcpy fence that would never signal. v6: - Add a missing i915_ttm_memcpy_release() (Matthew Auld) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211104110718.688420-3-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions