Skip to content

Commit

Permalink
media: staging: rkisp1: cap: in stream start, replace calls to rkisp1…
Browse files Browse the repository at this point in the history
…_handle_buffer with rkisp1_set_next_buf

The function 'rkisp1_stream_start' calls 'rkisp1_handle_buffer'
in order to update the 'buf.curr' and 'buf.next' fields and
configure the device before streaming starts. This cause a wrong
increment of the debugs field 'frame_drop'. This patch replaces
the call to 'rkisp1_handle_buffer' with a call to
'rkisp1_set_next_buf'.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Dafna Hirschfeld authored and Mauro Carvalho Chehab committed Jul 19, 2020
1 parent 23780e1 commit 20698ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/rkisp1/rkisp1-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ static void rkisp1_stream_start(struct rkisp1_capture *cap)
cap->ops->config(cap);

/* Setup a buffer for the next frame */
rkisp1_handle_buffer(cap);
rkisp1_set_next_buf(cap);
cap->ops->enable(cap);
/* It's safe to config ACTIVE and SHADOW regs for the
* first stream. While when the second is starting, do NOT
Expand All @@ -931,7 +931,7 @@ static void rkisp1_stream_start(struct rkisp1_capture *cap)
/* force cfg update */
rkisp1_write(rkisp1,
RKISP1_CIF_MI_INIT_SOFT_UPD, RKISP1_CIF_MI_INIT);
rkisp1_handle_buffer(cap);
rkisp1_set_next_buf(cap);
}
cap->is_streaming = true;
}
Expand Down

0 comments on commit 20698ed

Please sign in to comment.