Hello Dikshita, On Wed, 11 Dec 2024 at 10:34, Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx> wrote: > > > > On 12/10/2024 6:20 PM, Stefan Schmidt wrote: > > Hello Dikshita, > > > > On Tue, 10 Dec 2024 at 12:07, Dikshita Agarwal > > <quic_dikshita@xxxxxxxxxxx> 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? > The behavior for HFI_FLUSH_OUTPUT2 is same as HFI_FLUSH_OUTPUT so there is > no need to add specific handling for HFI_FLUSH_OUTPUT2. Thanks, in that case we are good. regards Stefan Schmidt