media/gpu/v4l2vd: allocate as many buffers as possible in DMABUF mode
If we are operating in DMABUF mode, then we will try to keep the same frame assigned to the same V4L2 buffer. However we don't know for sure how many different frames the decoder will actually use, and if we undershoot then we will spend a lot of time in-kernel unmapping/remapping DMABUFs. Try to prevent this by allocating as many buffers as allowed by the V4L2 API (32) when operating in DMABUF mode. Since these buffers won't have backing memory unless we attach a DMABUF to them, they are virtually free if unused. BUG=b:159688625 BUG=b:167412992 TEST=video.DecodeAccel.h264 passes on Kukui. TEST=video.DecodeAccel.h264 passes on Trogdor. Change-Id: Icd6282c3902654a54958d6346c60affd45555e7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434113 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:Fritz Koenig <frkoenig@chromium.org> Cr-Commit-Position: refs/heads/master@{#813503}
Showing
Please register or sign in to comment