mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 19:42:19 +00:00
During the stream on operation, set some mandatory properties on the firmware to start a session. Set all v4l2 properties, which are set by the client, on to firmware, which is prepared with the dependency graph. Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com> Tested-by: Stefan Schmidt <stefan.schmidt@linaro.org> # x1e80100 (Dell XPS 13 9345) Reviewed-by: Stefan Schmidt <stefan.schmidt@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
40 lines
823 B
C
40 lines
823 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#include "iris_instance.h"
|
|
#include "iris_vpu_buffer.h"
|
|
|
|
u32 iris_vpu_dec_dpb_size(struct iris_inst *inst)
|
|
{
|
|
if (iris_split_mode_enabled(inst))
|
|
return iris_get_buffer_size(inst, BUF_DPB);
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
static inline int iris_vpu_dpb_count(struct iris_inst *inst)
|
|
{
|
|
if (iris_split_mode_enabled(inst)) {
|
|
return inst->fw_min_count ?
|
|
inst->fw_min_count : inst->buffers[BUF_OUTPUT].min_count;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
int iris_vpu_buf_count(struct iris_inst *inst, enum iris_buffer_type buffer_type)
|
|
{
|
|
switch (buffer_type) {
|
|
case BUF_INPUT:
|
|
return MIN_BUFFERS;
|
|
case BUF_OUTPUT:
|
|
return inst->fw_min_count;
|
|
case BUF_DPB:
|
|
return iris_vpu_dpb_count(inst);
|
|
default:
|
|
return 0;
|
|
}
|
|
}
|