mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
media: rockchip: isp: fix isp rockit frame rate err
Change-Id: I1a730c26168f15be6c7a145bf7fe830316640447 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
parent
93687d7025
commit
d7e1493f44
|
|
@ -287,6 +287,7 @@ struct rkisp_stream {
|
|||
struct frame_debug_info dbg;
|
||||
int conn_id;
|
||||
u32 memory;
|
||||
u32 skip_frame;
|
||||
union {
|
||||
struct rkisp_stream_sp sp;
|
||||
struct rkisp_stream_mp mp;
|
||||
|
|
|
|||
|
|
@ -1399,10 +1399,12 @@ static int mi_frame_end(struct rkisp_stream *stream, u32 state)
|
|||
struct rkisp_stream *vir = &dev->cap_dev.stream[RKISP_STREAM_VIR];
|
||||
u64 ns = 0;
|
||||
|
||||
if (dev->skip_frame) {
|
||||
if (dev->skip_frame || stream->skip_frame) {
|
||||
spin_lock_irqsave(&stream->vbq_lock, lock_flags);
|
||||
list_add_tail(&buf->queue, &stream->buf_queue);
|
||||
spin_unlock_irqrestore(&stream->vbq_lock, lock_flags);
|
||||
if (stream->skip_frame)
|
||||
stream->skip_frame--;
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
@ -1540,6 +1542,7 @@ static int rkisp_start(struct rkisp_stream *stream)
|
|||
stream->ops->enable_mi(stream);
|
||||
|
||||
stream->streaming = true;
|
||||
stream->skip_frame = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -591,9 +591,11 @@ bool rkisp_rockit_ctrl_fps(struct rkisp_stream *stream)
|
|||
*fps_cnt = fps_in - dst_fps;
|
||||
*fps_cnt += dst_fps;
|
||||
|
||||
if (*fps_cnt < fps_in)
|
||||
if (*fps_cnt < fps_in) {
|
||||
*is_discard = true;
|
||||
else {
|
||||
if (stream->next_buf || !list_empty(&stream->buf_queue))
|
||||
stream->skip_frame = 1;
|
||||
} else {
|
||||
*fps_cnt -= fps_in;
|
||||
*is_discard = false;
|
||||
++cur_fps[stream->id];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user