forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/i915: Initial introduction of vma resources
The vma resource are needed for asynchronous bind management and are similar to TTM resources. They contain the data needed for asynchronous unbinding (typically the vm range, any backend private information and a means to do refcounting and to hold the unbinding for error capture). When a vma is bound, a vma resource is created and attached to the vma, and on async unbinding it is detached from the vma, and instead the vm records the fence marking unbind complete. This fence needs to be waited on before we can bind the same region again, so either the fence can be recorded for this particular range only, using an interval tree, or as a simpler approach, for the whole vm. The latter means no binding can take place on a vm until all detached vma resources scheduled for unbind are signaled. With an interval tree fence recording, the interval tree needs to be searched for fences to be signaled before binding can take place. But most of that is for later, this patch only introduces stub vma resources without unbind capability and the fences of which are waited for sync during unbinding. At this point we're interested in the hold capability as a POC for error capture. Note that the current sync waiting at unbind time is done uninterruptible, but that's OK since we're only ever waiting during error capture, and in that case there's very little gpu activity (if any) that can stall. v2: - Fix the mock gtt selftest to bind with vma resources. - Update a code comment. - Account for rebinding the same vma with different I915_VMA_*_BIND flags Signed-off-by: Thomas Hellström <thomas.hellstrom@intel.com>
- Loading branch information
1 parent
565a7c7
commit ce3de63
Showing
7 changed files
with
284 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.