mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: rockchip: vicap support config reserved buf num
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I3e2baabba29fbc1494c490ac45f3bbcf5a8bf6d3
This commit is contained in:
@@ -2473,6 +2473,12 @@ static void rkcif_parse_dts(struct rkcif_device *cif_dev)
|
||||
if (ret != 0)
|
||||
cif_dev->wait_line = 0;
|
||||
dev_info(cif_dev->dev, "rkcif wait line %d\n", cif_dev->wait_line);
|
||||
ret = of_property_read_u32(node,
|
||||
OF_CIF_FASTBOOT_RESERVED_BUFS,
|
||||
&cif_dev->fb_res_bufs);
|
||||
if (ret != 0)
|
||||
cif_dev->fb_res_bufs = 3;
|
||||
dev_info(cif_dev->dev, "rkcif fastboot reserve bufs num %d\n", cif_dev->fb_res_bufs);
|
||||
}
|
||||
|
||||
static int rkcif_get_reserved_mem(struct rkcif_device *cif_dev)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#define OF_CIF_MONITOR_PARA "rockchip,cif-monitor"
|
||||
#define OF_CIF_WAIT_LINE "wait-line"
|
||||
#define OF_CIF_FASTBOOT_RESERVED_BUFS "fastboot-reserved-bufs"
|
||||
|
||||
#define CIF_MONITOR_PARA_NUM (5)
|
||||
|
||||
@@ -946,6 +947,7 @@ struct rkcif_device {
|
||||
u32 intr_mask;
|
||||
struct delayed_work work_deal_err;
|
||||
u32 other_intstat[RKMODULE_MULTI_DEV_NUM];
|
||||
u32 fb_res_bufs;
|
||||
};
|
||||
|
||||
extern struct platform_driver rkcif_plat_drv;
|
||||
|
||||
@@ -885,7 +885,7 @@ static int sditf_s_rx_buffer(struct v4l2_subdev *sd,
|
||||
atomic_inc(&stream->buf_cnt);
|
||||
|
||||
is_single_dev = rkcif_check_single_dev_stream_on(cif_dev->hw_dev);
|
||||
if (!list_empty(&stream->rx_buf_head) &&
|
||||
if (stream->total_buf_num > cif_dev->fb_res_bufs &&
|
||||
cif_dev->is_thunderboot &&
|
||||
((!cif_dev->is_rtt_suspend &&
|
||||
!cif_dev->is_aov_reserved) ||
|
||||
|
||||
Reference in New Issue
Block a user