diff options
| author | Dikshita Agarwal <quic_dikshita@quicinc.com> | 2025-08-25 12:30:48 +0530 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-09-10 09:02:45 +0200 |
| commit | 61528e86687e3ba520d10a2be40d7e409cea663d (patch) | |
| tree | 28e124f96116ee67a2508414eef6e0fc70b0c258 /drivers/media/platform/qcom/iris/iris_vidc.c | |
| parent | d22037f3fd33e5956ecbc2ee38b42726fa2cc7a0 (diff) | |
media: iris: Allocate and queue internal buffers for encoder video device
Add support for allocating and queuing internal buffers required by the
encoder. The sizes of these buffers are derived from hardware
specifications and are essential to meet the encoder's functional and
performance requirements.
These buffers are not exposed to userspace; they are allocated and
managed internally to ensure correct and efficient hardware operation.
Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # X1E80100
Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e80100-crd
[bod: added sm8750 enc_op_int_buf_tbl enumeration during merge]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/iris/iris_vidc.c')
| -rw-r--r-- | drivers/media/platform/qcom/iris/iris_vidc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/platform/qcom/iris/iris_vidc.c index 769fd630b32e..83537d1beb9c 100644 --- a/drivers/media/platform/qcom/iris/iris_vidc.c +++ b/drivers/media/platform/qcom/iris/iris_vidc.c @@ -176,6 +176,8 @@ int iris_open(struct file *filp) INIT_LIST_HEAD(&inst->buffers[BUF_DPB].list); INIT_LIST_HEAD(&inst->buffers[BUF_PERSIST].list); INIT_LIST_HEAD(&inst->buffers[BUF_SCRATCH_1].list); + INIT_LIST_HEAD(&inst->buffers[BUF_SCRATCH_2].list); + INIT_LIST_HEAD(&inst->buffers[BUF_VPSS].list); init_completion(&inst->completion); init_completion(&inst->flush_completion); @@ -265,13 +267,17 @@ static void iris_check_num_queued_internal_buffers(struct iris_inst *inst, u32 p count, internal_buf_type[i]); } - buffers = &inst->buffers[BUF_PERSIST]; + if (inst->domain == DECODER) + buffers = &inst->buffers[BUF_PERSIST]; + else + buffers = &inst->buffers[BUF_ARP]; count = 0; list_for_each_entry_safe(buf, next, &buffers->list, list) count++; if (count) - dev_err(inst->core->dev, "%d buffer of type BUF_PERSIST not released", count); + dev_err(inst->core->dev, "%d buffer of type %d not released", + count, inst->domain == DECODER ? BUF_PERSIST : BUF_ARP); } int iris_close(struct file *filp) |
