Skip to content

Commit 8699bc1

Browse files
Dikshita Agarwalgregkh
authored andcommitted
media: iris: Allow stop on firmware only if start was issued.
commit 56a2d85ee8f9b994e5cd17039133218c57c5902b upstream. For HFI Gen1, the instances substate is changed to LOAD_RESOURCES only when a START command is issues to the firmware. If STOP is called without a prior START, the firmware may reject the command and throw some erros. Handle this by adding a substate check before issuing STOP command to the firmware. Fixes: 11712ce ("media: iris: implement vb2 streaming ops") Cc: [email protected] Reviewed-by: Vikash Garodia <[email protected]> Tested-by: Vikash Garodia <[email protected]> # X1E80100 Tested-by: Neil Armstrong <[email protected]> # on SM8550-HDK Tested-by: Neil Armstrong <[email protected]> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # x1e80100-crd Signed-off-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bb3b3ad commit 8699bc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int iris_hfi_gen1_session_stop(struct iris_inst *inst, u32 plane)
202202
inst->flush_responses_pending++;
203203
ret = iris_wait_for_session_response(inst, true);
204204
}
205-
} else {
205+
} else if (inst->sub_state & IRIS_INST_SUB_LOAD_RESOURCES) {
206206
reinit_completion(&inst->completion);
207207
iris_hfi_gen1_packet_session_cmd(inst, &pkt, HFI_CMD_SESSION_STOP);
208208
ret = iris_hfi_queue_cmd_write(core, &pkt, pkt.shdr.hdr.size);

0 commit comments

Comments
 (0)