• Alexandre Courbot's avatar
    media/gpu/v4l2ip: allocate as many buffers as possible in DMABUF mode · 5bdf2fe5
    Alexandre Courbot authored
    If we are operating in DMABUF mode, then we will try to keep the same
    frame assigned to the same V4L2 buffer. The number of buffers requested
    by the client is indicative of the real load, but there is no hard
    guarantee that we will not receive more frames than that, thus resulting
    in sub-optimal affinity tracking.
    
    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
    TEST=video.DecodeAccel.h264 passes on Kukui.
    
    Change-Id: Ibc9ea18835acd4b8d3bc6ffc7393bf0d5d97d04d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415908
    Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
    Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
    Reviewed-by: default avatarFritz Koenig <frkoenig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#813110}
    5bdf2fe5
v4l2_image_processor_backend.cc 36.8 KB