[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEvtbuus3scTvcjMuxxrfcqnd61+vqM5G=os-aUuM3+SLp2abQ@mail.gmail.com>
Date: Tue, 10 Dec 2024 13:50:36 +0100
From: Stefan Schmidt <stefan.schmidt@...aro.org>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>
Cc: Vikash Garodia <quic_vgarodia@...cinc.com>, Abhinav Kumar <quic_abhinavk@...cinc.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, Hans Verkuil <hverkuil@...all.nl>,
Sebastian Fricke <sebastian.fricke@...labora.com>,
"Bryan O'Donoghue" <bryan.odonoghue@...aro.org>, Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Neil Armstrong <neil.armstrong@...aro.org>, Nicolas Dufresne <nicolas@...fresne.ca>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Jianhua Lu <lujianhua000@...il.com>, linux-media@...r.kernel.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 16/28] media: iris: implement vb2 streaming ops
Hello Dikshita,
On Tue, 10 Dec 2024 at 12:07, Dikshita Agarwal
<quic_dikshita@...cinc.com> wrote:
>
> +static int iris_hfi_gen1_session_stop(struct iris_inst *inst, u32 plane)
> +{
> + struct hfi_session_flush_pkt flush_pkt;
> + struct iris_core *core = inst->core;
> + struct hfi_session_pkt pkt;
> + u32 flush_type = 0;
> + int ret = 0;
> +
> + if ((V4L2_TYPE_IS_OUTPUT(plane) &&
> + inst->state == IRIS_INST_INPUT_STREAMING) ||
> + (V4L2_TYPE_IS_CAPTURE(plane) &&
> + inst->state == IRIS_INST_OUTPUT_STREAMING) ||
> + inst->state == IRIS_INST_ERROR) {
> + reinit_completion(&inst->completion);
> + iris_hfi_gen1_packet_session_cmd(inst, &pkt, HFI_CMD_SESSION_STOP);
> + ret = iris_hfi_queue_cmd_write(core, &pkt, pkt.shdr.hdr.size);
> + if (!ret)
> + ret = iris_wait_for_session_response(inst, false);
> +
> + reinit_completion(&inst->completion);
> + iris_hfi_gen1_packet_session_cmd(inst, &pkt, HFI_CMD_SESSION_RELEASE_RESOURCES);
> + ret = iris_hfi_queue_cmd_write(core, &pkt, pkt.shdr.hdr.size);
> + if (!ret)
> + ret = iris_wait_for_session_response(inst, false);
> + } else if (inst->state == IRIS_INST_STREAMING) {
> + if (V4L2_TYPE_IS_OUTPUT(plane))
> + flush_type = HFI_FLUSH_ALL;
> + else if (V4L2_TYPE_IS_CAPTURE(plane))
> + flush_type = HFI_FLUSH_OUTPUT;
Below there is also HFI_FLUSH_OUTPUT2 defined. Do we need to handle
this flush type here as well?
[...]
> +#define HFI_FLUSH_OUTPUT 0x1000002
> +#define HFI_FLUSH_OUTPUT2 0x1000003
regards
Stefan Schmidt
Powered by blists - more mailing lists