diff options
author | Hugues Fruchet <hugues.fruchet@st.com> | 2018-09-24 15:54:59 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-04 21:29:43 +0300 |
commit | b88ff59e7996974dec7975a7beba1418b48bcabf (patch) | |
tree | 88cea2126422e156cfaa5baf3584af6168100e64 /drivers | |
parent | 44d7f1a77d8c84f8e42789b5475b74ae0e6d4758 (diff) | |
download | linux-b88ff59e7996974dec7975a7beba1418b48bcabf.tar.xz |
media: stm32-dcmi: only enable IT frame on JPEG capture
Only enable IT frame on JPEG capture, this saves some CPU
interruptions and processing on all the other cases.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/stm32/stm32-dcmi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index ba3e2eee1d92..d6b00eda6b9b 100644 --- a/drivers/media/platform/stm32/stm32-dcmi.c +++ b/drivers/media/platform/stm32/stm32-dcmi.c @@ -659,7 +659,10 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count) } /* Enable interruptions */ - reg_set(dcmi->regs, DCMI_IER, IT_FRAME | IT_OVR | IT_ERR); + if (dcmi->sd_format->fourcc == V4L2_PIX_FMT_JPEG) + reg_set(dcmi->regs, DCMI_IER, IT_FRAME | IT_OVR | IT_ERR); + else + reg_set(dcmi->regs, DCMI_IER, IT_OVR | IT_ERR); return 0; |