diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2013-12-04 18:02:00 +0800 |
---|---|---|
committer | Peng Fushi <fushi.peng@freescale.com> | 2014-08-28 16:54:16 +0800 |
commit | 70d1cace5166a581acd9c7fc8273148e5677d9f6 (patch) | |
tree | 4eefec7d4087c51218a5fd3eaf88be9f55452f94 | |
parent | 9ccdf2c18feb910d18f4f4dfffc9ef0938e068e4 (diff) |
ENGR00290654 IPUv3 dev:Workaround split mode downsize overflow
The downsizing ratio overflow check should cover every stripe
in the split mode. We need to do the overflow check correctly
by taking the width/height 8-pixel alignment requirement into
consideration since the alignment would be done when every
stripe is checked in it's own ipu task.
This patch takes a workaround for the issue which can be
reproduced by this unit test case:
==================================================================
mxc_v4l2_output.out -iw 1920 -ih 1080 -ow 200 -oh 200 -v 1
mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x12 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x10,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x10,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x22 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac73ea00] no-0x20,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x20,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
mxc_ipu mxc_ipu: ERR:create_split_child_task() ret:-22
mxc_ipu mxc_ipu: sp_task[0],no-0x32 fail state:-22, queue err:-22.
mxc_ipu mxc_ipu: ERR: [0xac63c400] no-0x30,state 3: error
mxc_ipu mxc_ipu: ERR: no-0x30,ipu_queue_task err:-125
mxc_v4l2_output v4l2_out.35: display work fail ret = -125
VIDIOC_QBUF failed -1
==================================================================
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
-rw-r--r-- | drivers/mxc/ipu3/ipu_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c index 0bb4669ce8c7..113d2d00a8e5 100644 --- a/drivers/mxc/ipu3/ipu_device.c +++ b/drivers/mxc/ipu3/ipu_device.c @@ -886,6 +886,9 @@ static int update_split_setting(struct ipu_task_entry *t, bool vdi_split) if (((t->set.sp_setting.ow + t->set.sp_setting.o_right_pos) > ow) || (t->set.sp_setting.ow > soc_max_out_width())) return IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER; + if (rounddown(t->set.sp_setting.ow, 8) * 8 <= + rounddown(t->set.sp_setting.iw, 8)) + return IPU_CHECK_ERR_W_DOWNSIZE_OVER; if (t->set.split_mode & UD_SPLIT) { /* @@ -932,6 +935,9 @@ static int update_split_setting(struct ipu_task_entry *t, bool vdi_split) if (((t->set.sp_setting.oh + t->set.sp_setting.o_bottom_pos) > oh) || (t->set.sp_setting.oh > soc_max_out_height())) return IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER; + if (rounddown(t->set.sp_setting.oh, 8) * 8 <= + rounddown(t->set.sp_setting.ih, 8)) + return IPU_CHECK_ERR_H_DOWNSIZE_OVER; return IPU_CHECK_OK; } |