media/gpu/v4l2: lazy-assign EGLImages to image processor buffers
Right now the VDA and IP devices are tightly coupled: notably, their buffers follow a 1:1 mapping, and the VDA decides which IP processor buffer to use. This seriously restricts the applicability of the IP interface. In order to remove this constraint, the VDA must not make any assumption about which IP buffer it will receive, the number of buffers it will use, or even their memory type. Doing so means that the VDA will see the IP buffers for the first time as the FrameProcessed() callback is called, and thus that it cannot create an EGLImage for them ahead of time as we used to do. This patch thus delays EGLImage assignment to the first time we meet a given buffer in the FrameProcessed() callback. Thanks to the fact that every picture needs to be cleared on the child thread first, we can schedule the EGLImage creation on the same thread before this happens, thus ensuring that no synchronization issue occur. BUG=792790 TEST=Checked that VDA unittest was passing on Hana, in import and non-import mode, with rendering enabled or not. Change-Id: Ia89b7620fe890fcd4bbd6791fd59660d9bd89f46 Reviewed-on: https://chromium-review.googlesource.com/c/1288498 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#607484}
Showing
Please register or sign in to comment