• Stanimir Varbanov's avatar
    media: venus: implementing multi-stream support · f012b23d
    Stanimir Varbanov authored
    This is implementing multi-stream decoder support. The multi-stream
    will be used to enable/disable the primary/secondary decoder
    outputs. Depending on formats on both decoder outputs we could
    implement downscale, dithering and supporting UBWC (universal
    bandwidth compression) formats. The UBWC compressed raw format is
    used to optimize interconnect bandwidth for bigger resolutions
    like 4K and hence we will get some power-saving benefits as well.
    
    Both decoder outputs are distinguished by buffer_type field in
    the HFI packets. For example HFI_BUFFER_OUTPUT is the buffer type
    for primary decoder output and HFI_BUFFER_OUTPUT2 is for secondary
    decoder output.
    
    Starting from Venus 4xx the DPB buffers format must be UBWC, so
    the multi-stream becomes mandatory for this Venus version. That
    means that we need to allocate internally in the driver a set of
    DPB buffers (with UBWC NV12 format) and give them to the firmware.
    The other decoder output (we called it OPB) format will be NV12
    linear format and with the same resolution (or smaller in case
    the user wants to downscale).
    
    The DPB buffers are used for decoder reference frames and those
    have to be in a specific format (UBWC). So one decoder output is
    used to fill those reference buffers while the other output is
    used to fill the userspace buffers with the user requested format.
    Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
    Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
    Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
    Tested-by: default avatarAlexandre Courbot <acourbot@chromium.org>
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    f012b23d
helpers.h 3.05 KB