mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-16 14:54:25 +00:00
handle the V4L2_DEC_CMD_STOP by initiating a drain sequence on the firmware. Process and decode all OUTPUT buffers, that are queued by the client, before the VIDIOC_DECODER_CMD() was issued and mark the last buffer with the V4L2_BUF_FLAG_LAST flag. The decoder is stopped, after processing the last buffer. Resume the decoder when one of these operations are issued by the client: - V4L2_DEC_CMD_START - pair of VIDIOC_STREAMOFF() and VIDIOC_STREAMON() on the CAPTURE queue - pair of VIDIOC_STREAMOFF() and VIDIOC_STREAMON() on the OUTPUT queue Add the handling to resume decoding when client issues V4L2_DEC_CMD_START to resume decoding after a source change is detected. 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>
26 lines
1017 B
C
26 lines
1017 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __IRIS_VDEC_H__
|
|
#define __IRIS_VDEC_H__
|
|
|
|
struct iris_inst;
|
|
|
|
int iris_vdec_inst_init(struct iris_inst *inst);
|
|
void iris_vdec_inst_deinit(struct iris_inst *inst);
|
|
int iris_vdec_enum_fmt(struct iris_inst *inst, struct v4l2_fmtdesc *f);
|
|
int iris_vdec_try_fmt(struct iris_inst *inst, struct v4l2_format *f);
|
|
int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f);
|
|
int iris_vdec_subscribe_event(struct iris_inst *inst, const struct v4l2_event_subscription *sub);
|
|
void iris_vdec_src_change(struct iris_inst *inst);
|
|
int iris_vdec_streamon_input(struct iris_inst *inst);
|
|
int iris_vdec_streamon_output(struct iris_inst *inst);
|
|
int iris_vdec_qbuf(struct iris_inst *inst, struct vb2_v4l2_buffer *vbuf);
|
|
int iris_vdec_start_cmd(struct iris_inst *inst);
|
|
int iris_vdec_stop_cmd(struct iris_inst *inst);
|
|
int iris_vdec_session_streamoff(struct iris_inst *inst, u32 plane);
|
|
|
|
#endif
|