-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
va:add synchornization fence for HW execution #810
base: master
Are you sure you want to change the base?
Conversation
is this Linux only? |
good question, it is for a linux PoC , will not merge until we could verify it. |
va/va.h
Outdated
* Same behavior with vaEndPicture except a sync fd list for synchronizations. | ||
* if sync_num = 0 or sync_fds == NULL, the behavior should be same with vaEndPicture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be: "Same behaviour as" and ... "the behaviour should be the same as vaEndPicture()"
* current frame finishing. | ||
* sync_fds[1] to sync_fds[1 ~ sync_num-1] is fence in, current HW execution | ||
* will be blocked until all these fences are signaled. | ||
* these fence fds is file descriptor of dma_fence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to call vaEndPicture2() with a fence-out but no fence-in(s)? If so it'd be good to specify it in this function comment (and maybe other expected example use patterns);
VAStatus vaEndPicture2( | ||
VADisplay dpy, | ||
VAContextID context, | ||
int32_t *sync_fds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any advantage in bundling fences out and in vs e.g.
int32_t *sync_fd_out, // Out. Can be nullptr.
int32_t* sync_fds_in, // In. Can be nullptr.
int32_t sync_fds_in_num, // In. Can be 0.
Or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both ok to me, but now , it is just a PoC, and the implementation is ready here:
intel/media-driver#1803
in the future:
- libva should support both linux and windows, so, we will have some other interfaces to hide the dma fence, unify the syn definition in future.
- decouple the fence in and out to too parameters as your mentioned.
add fence in and fence out for vaEndPicture which is using to submit command buffer fence out will be signaled after HW execution, fence in is the dependencies Signed-off-by: Carl Zhang <[email protected]>
do not merge!
add fence in and fence out for vaEndPicture which is using to submit command buffer fence out will be signaled after HW execution, fence in is the dependencies