mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 23:29:57 +02:00
FROMGIT: media: amphion: Remove lock in s_ctrl callback
There is no need to add a lock in s_ctrl callback, it has been
synchronized by the ctrl_handler's lock, otherwise it may led to
a deadlock if the driver calls v4l2_ctrl_s_ctrl().
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Bug: 352213761
(cherry picked from commit 065927b51e
https: //git.linuxtv.org/media_tree.git master)
Change-Id: If536c4bcf9c0d09556eba306ccfd14665aac9186
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
This commit is contained in:
parent
fadc0ed15c
commit
a9cf95c8ef
|
@ -195,7 +195,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
struct vdec_t *vdec = inst->priv;
|
||||
int ret = 0;
|
||||
|
||||
vpu_inst_lock(inst);
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE:
|
||||
vdec->params.display_delay_enable = ctrl->val;
|
||||
|
@ -207,7 +206,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
vpu_inst_unlock(inst);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -518,7 +518,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
struct venc_t *venc = inst->priv;
|
||||
int ret = 0;
|
||||
|
||||
vpu_inst_lock(inst);
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
|
||||
venc->params.profile = ctrl->val;
|
||||
|
@ -579,7 +578,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
vpu_inst_unlock(inst);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user