mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
media: i2c: imx415: fix lock check warning
resolve the warning log below: [ 3.116535][ T1] ------------[ cut here ]------------ [ 3.116555][ T1] WARNING: CPU: 4 PID: 1 at drivers/media/v4l2-core/v4l2-ctrls.c:4435 __v4l2_ctrl_s_ctrl+0x70/0x88 [ 3.116562][ T1] Modules linked in: [ 3.116575][ T1] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.10.66 [ 3.116583][ T1] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT) [ 3.116591][ T1] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--) [ 3.116598][ T1] pc : __v4l2_ctrl_s_ctrl+0x70/0x88 [ 3.116606][ T1] lr : __v4l2_ctrl_s_ctrl+0x3c/0x88 [ 3.116612][ T1] sp : ffffffc012d0ba10 [ 3.116619][ T1] x29: ffffffc012d0ba10 x28: 0000000000000000 [ 3.116631][ T1] x27: 00000000009e0901 x26: ffffffc01155bdb0 [ 3.116642][ T1] x25: ffffffc01155c998 x24: ffffff8104b6e100 [ 3.116653][ T1] x23: ffffff8104b6e278 x22: ffffff8104b6e400 [ 3.116664][ T1] x21: ffffff81044e0000 x20: 0000000000000001 [ 3.116675][ T1] x19: ffffff810506b600 x18: ffffffc012d05098 [ 3.116686][ T1] x17: 0000000000000000 x16: ffffff8100338000 [ 3.116697][ T1] x15: ffffffc012bae000 x14: ffffffc01220eeb0 [ 3.116708][ T1] x13: 00000000ffffffff x12: ffffffc0125e0f30 [ 3.116719][ T1] x11: 0000000100000002 x10: 00000000000000ff [ 3.116731][ T1] x9 : 0000000000000000 x8 : ffffffc1ed1b9000 [ 3.116742][ T1] x7 : ffffffc010cb8ebc x6 : ffffff81003389f8 [ 3.116752][ T1] x5 : 0000000000000000 x4 : 0000000000000001 [ 3.116763][ T1] x3 : ffffff8104b6e320 x2 : 0000000000000000 [ 3.116774][ T1] x1 : ffffff8104b6e468 x0 : 0000000000000000 Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com> Change-Id: I1ec8de71d644cee4d81e16db7054da21677732bf
This commit is contained in:
committed by
Tao Huang
parent
20cf1fde7c
commit
1fa592b341
@@ -1723,6 +1723,7 @@ static long imx415_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
}
|
||||
w = mode->hts_def - imx415->cur_mode->width;
|
||||
h = mode->vts_def - mode->height;
|
||||
mutex_lock(&imx415->mutex);
|
||||
__v4l2_ctrl_modify_range(imx415->hblank, w, w, 1, w);
|
||||
__v4l2_ctrl_modify_range(imx415->vblank, h,
|
||||
IMX415_VTS_MAX - mode->height,
|
||||
@@ -1731,6 +1732,7 @@ static long imx415_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
pixel_rate = (u32)link_freq_items[mode->mipi_freq_idx] / mode->bpp * 2 * IMX415_4LANES;
|
||||
__v4l2_ctrl_s_ctrl_int64(imx415->pixel_rate,
|
||||
pixel_rate);
|
||||
mutex_unlock(&imx415->mutex);
|
||||
}
|
||||
break;
|
||||
case RKMODULE_SET_QUICK_STREAM:
|
||||
@@ -2374,7 +2376,7 @@ static int imx415_initialize_controls(struct imx415 *imx415)
|
||||
V4L2_CID_LINK_FREQ,
|
||||
ARRAY_SIZE(link_freq_items) - 1, 0,
|
||||
link_freq_items);
|
||||
__v4l2_ctrl_s_ctrl(imx415->link_freq, mode->mipi_freq_idx);
|
||||
v4l2_ctrl_s_ctrl(imx415->link_freq, mode->mipi_freq_idx);
|
||||
|
||||
/* pixel rate = link frequency * 2 * lanes / BITS_PER_SAMPLE */
|
||||
pixel_rate = (u32)link_freq_items[mode->mipi_freq_idx] / mode->bpp * 2 * IMX415_4LANES;
|
||||
|
||||
Reference in New Issue
Block a user