video: driver: introduce client lock

Acquire client lock for every entry point
in driver. This is needed especially for
streamoff and close calls where inst lock
is released while driver is waiting for
stop_done and close_done responses from fw.
When inst lock is released, client can send
a new ioctl call and driver state machine
can get updated leading to unexpected behaviour.

Change-Id: Ibb62c3431c88e2f1d9088d54fe7c9e53b1c284fd
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Cette révision appartient à :
Darshana Patil
2022-05-25 12:28:27 -07:00
révisé par Gerrit - the friendly Code Review server
Parent e95d1dcf89
révision 2a687b2750
6 fichiers modifiés avec 77 ajouts et 0 suppressions

Voir le fichier

@@ -519,6 +519,9 @@ bool core_lock_check(struct msm_vidc_core *core, const char *function);
void inst_lock(struct msm_vidc_inst *inst, const char *function);
void inst_unlock(struct msm_vidc_inst *inst, const char *function);
bool inst_lock_check(struct msm_vidc_inst *inst, const char *function);
bool client_lock_check(struct msm_vidc_inst *inst, const char *func);
void client_lock(struct msm_vidc_inst *inst, const char *function);
void client_unlock(struct msm_vidc_inst *inst, const char *function);
int msm_vidc_update_bitstream_buffer_size(struct msm_vidc_inst *inst);
int msm_vidc_update_meta_port_settings(struct msm_vidc_inst *inst);
int msm_vidc_update_buffer_count(struct msm_vidc_inst *inst, u32 port);