bool save_var;
bool bypass_pp;
bool is_vdoaipu_task;
+ struct v4l2_rect in_rect;
struct ipu_task task;
struct ipu_task vdoa_task;
struct dma_mem vdoa_dma;
struct ipu_pos ipos;
int ret = 0;
u32 is_1080p;
+ u32 in_fmt = 0;
u32 ocrop_h = 0;
u32 tiled_interlaced = 0;
goto err;
}
vout->task.input.paddr = vout->vdoa_task.output.paddr;
+ in_fmt = vout->task.input.format;
+ vout->task.input.format = vout->vdoa_task.output.format;
if (vout->task.input.deinterlace.enable) {
tiled_interlaced = 1;
vout->task.input.deinterlace.enable = 0;
}
}
ret = ipu_queue_task(&vout->task);
+ if (vout->is_vdoaipu_task)
+ vout->task.input.format = in_fmt;
if (tiled_interlaced)
vout->task.input.deinterlace.enable = 1;
if (ret < 0) {
struct ipu_task *ipu_task = &vout->task;
struct ipu_task *vdoa_task = &vout->vdoa_task;
u32 deinterlace = 0;
+ u32 in_fmt;
if (vout->task.input.deinterlace.enable)
deinterlace = 1;
if (ret != IPU_CHECK_OK)
return -EINVAL;
+ in_fmt = ipu_task->input.format;
ipu_task->input.format = vdoa_task->output.format;
if (icrop_h) {
ipu_task->input.height = vdoa_task->output.height;
ret = ipu_try_task(vout);
if (deinterlace)
ipu_task->input.deinterlace.enable = 1;
+ ipu_task->input.format = in_fmt;
return ret;
}
int ret = 0;
struct ipu_output *output = &vout->task.output;
struct ipu_input *input = &vout->task.input;
+ u32 o_height = 0;
+ u32 ocrop_h = 0;
+ u32 is_1080p;
+
+ is_1080p = CHECK_TILED_1080P_DISPLAY(vout);
+ if (is_1080p) {
+ input->crop.h = FRAME_HEIGHT_1080P;
+ o_height = output->height;
+ ocrop_h = output->crop.h;
+ output->height = FRAME_HEIGHT_1080P;
+ output->crop.h = FRAME_HEIGHT_1080P;
+ }
input->crop.w -= input->crop.w%8;
input->crop.h -= input->crop.h%8;
ret = ipu_try_task(vout);
}
+ if (is_1080p) {
+ output->height = o_height;
+ output->crop.h = ocrop_h;
+ }
+
+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev,
+ "icrop.w:%u, icrop.h:%u, iw:%u, ih:%u,"
+ "ocrop.w:%u, ocrop.h:%u, ow:%u, oh:%u\n",
+ input->crop.w, input->crop.h,
+ input->width, input->height,
+ output->crop.w, output->crop.h,
+ output->width, output->height);
return ret;
}
{
int ret = 0;
struct v4l2_rect rect;
- u32 o_height = 0;
- u32 ocrop_h = 0;
- u32 is_1080p;
if (f->fmt.pix.priv && copy_from_user(&rect,
(void __user *)f->fmt.pix.priv, sizeof(rect)))
vout->task.input.crop.w = f->fmt.pix.width;
vout->task.input.crop.h = f->fmt.pix.height;
}
-
- is_1080p = CHECK_TILED_1080P_DISPLAY(vout);
- if (is_1080p) {
- vout->task.input.crop.h = FRAME_HEIGHT_1080P;
- o_height = vout->task.output.height;
- ocrop_h = vout->task.output.crop.h;
- vout->task.output.height = FRAME_HEIGHT_1080P;
- vout->task.output.crop.h = FRAME_HEIGHT_1080P;
- }
+ memcpy(&vout->in_rect, &vout->task.input.crop, sizeof(vout->in_rect));
ret = mxc_vout_try_task(vout);
if (!ret) {
}
}
- if (is_1080p) {
- vout->task.output.height = o_height;
- vout->task.output.crop.h = ocrop_h;
- }
-
return ret;
}
if (vout->vbq.streaming)
release_disp_output(vout);
+ memcpy(&vout->task.input.crop, &vout->in_rect,
+ sizeof(vout->in_rect));
ret = mxc_vout_try_task(vout);
if (ret < 0) {
v4l2_err(vout->vfd->v4l2_dev,
if (vout->vbq.streaming)
release_disp_output(vout);
+ memcpy(&vout->task.input.crop, &vout->in_rect,
+ sizeof(vout->in_rect));
ret = mxc_vout_try_task(vout);
if (ret < 0) {
v4l2_err(vout->vfd->v4l2_dev,