msm: vidc: Remove lock/unlock during set ctrl
Previously in s_ctrl, we used to call v4l2_g_ctrl which was
mutex protected. Hence, we used to perform an unlock in the
beginning of s_ctrl and lock again at the end of s_ctrl.
Currently the local get_ctrl that we are using in driver
is not mutex protected and hence doesn't need this unlock
and lock. There are also places in driver where local
get_ctrl is not used. Make changes to use local get_ctrl.
Also, the local get_ctrl should not be called for encoder
controls in a decode session. Add checks in places to make
sure encoder get controls happen only in encoder session.
Finally when control is not found get_ctrl returns invalid
control, hence make changes in default values of this
control to return 0s.
Change-Id: Iff37d06be183491dcb0754ca184906750a957b8e
Signed-off-by:
Vaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
Loading
Please register or sign in to comment