msm: vidc: Fix check for valid session and generate errors asynchronously
The previous check for session being in at least OPEN_DONE _or_ CLOSE_DONE
state was incorrect. In order for a session to be valid it should be
beyond OPEN_DONE and before CLOSE_DONE.
Additionally, when generating an error in an invalid state, there's a
deadlock as a result of nested locking. Since the locking mechanism in
the driver is written expecting the error handlers to be called from an
interrupt (hence async) context, generate the errors from a workqueue to
effectively simulate the interrupt context. This is a workaround to
avoid re-designing the locking mechanism in msm_vidc_common.c
CRs-Fixed: 649138
Change-Id: I996cf6c12d5d676f1c54e618ea2e88b7fc769084
Signed-off-by:
Deva Ramasubramanian <dramasub@codeaurora.org>
Loading
Please register or sign in to comment