Commit 5f1d4b07 authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: params: set vb.sequence to be the isp's frame_sequence + 1

The params isr is called when the ISP finishes processing a frame
(RKISP1_CIF_ISP_FRAME). Configurations performed in the params isr
will be applied on the next frame. Since frame_sequence is updated
on the vertical sync signal, we should use frame_sequence + 1 as
the vb.sequence of the params buffer to indicate to userspace on
which frame these parameters are being applied.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 98c437e3
...@@ -1213,7 +1213,14 @@ static void rkisp1_params_apply_params_cfg(struct rkisp1_params *params, ...@@ -1213,7 +1213,14 @@ static void rkisp1_params_apply_params_cfg(struct rkisp1_params *params,
void rkisp1_params_isr(struct rkisp1_device *rkisp1) void rkisp1_params_isr(struct rkisp1_device *rkisp1)
{ {
unsigned int frame_sequence = atomic_read(&rkisp1->isp.frame_sequence); /*
* This isr is called when the ISR finishes processing a frame (RKISP1_CIF_ISP_FRAME).
* Configurations performed here will be applied on the next frame.
* Since frame_sequence is updated on the vertical sync signal, we should use
* frame_sequence + 1 here to indicate to userspace on which frame these parameters
* are being applied.
*/
unsigned int frame_sequence = atomic_read(&rkisp1->isp.frame_sequence) + 1;
struct rkisp1_params *params = &rkisp1->params; struct rkisp1_params *params = &rkisp1->params;
spin_lock(&params->config_lock); spin_lock(&params->config_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment