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>
This commit is contained in:
Darshana Patil
2022-05-25 12:28:27 -07:00
committed by Gerrit - the friendly Code Review server
parent e95d1dcf89
commit 2a687b2750
6 changed files with 77 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ struct msm_vidc_inst {
struct list_head list;
struct mutex lock;
struct mutex request_lock;
struct mutex client_lock;
enum msm_vidc_inst_state state;
enum msm_vidc_domain_type domain;
enum msm_vidc_codec_type codec;