summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2009-12-17 18:57:14 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:48 +0100
commit7743087a5abd2ad3b64c3eff2be5907191966684 (patch)
tree79b4b2d97473e4d09c8cfa67993afcd87d1ba6d0 /drivers/mxc
parent70717861158d10eceebbcdca633f4e498a4d7cc8 (diff)
ENGR00119136 ipuv3: support 720p for ipu lib
To support 720p output for ipu lib. Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/ipu3/ipu_device.c40
-rw-r--r--drivers/mxc/ipu3/ipu_ic.c29
2 files changed, 59 insertions, 10 deletions
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c
index 4c98d4c7edd3..4ac6fc77ca79 100644
--- a/drivers/mxc/ipu3/ipu_device.c
+++ b/drivers/mxc/ipu3/ipu_device.c
@@ -374,6 +374,46 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file,
ret = 0;
}
break;
+ case IPU_CALC_STRIPES_SIZE:
+ {
+ ipu_stripe_parm stripe_parm;
+
+ if (copy_from_user (&stripe_parm, (ipu_stripe_parm *)arg,
+ sizeof(ipu_stripe_parm)))
+ return -EFAULT;
+ ipu_calc_stripes_sizes(stripe_parm.input_width,
+ stripe_parm.output_width,
+ stripe_parm.maximal_stripe_width,
+ stripe_parm.cirr,
+ stripe_parm.equal_stripes,
+ stripe_parm.input_pixelformat,
+ stripe_parm.output_pixelformat,
+ &stripe_parm.left,
+ &stripe_parm.right);
+ if (copy_to_user((ipu_stripe_parm *) arg, &stripe_parm,
+ sizeof(ipu_stripe_parm)) > 0)
+ return -EFAULT;
+ }
+ break;
+ case IPU_UPDATE_BUF_OFFSET:
+ {
+ ipu_buf_offset_parm offset_parm;
+
+ if (copy_from_user (&offset_parm, (ipu_buf_offset_parm *)arg,
+ sizeof(ipu_buf_offset_parm)))
+ return -EFAULT;
+ ret = ipu_update_channel_offset(offset_parm.channel,
+ offset_parm.type,
+ offset_parm.pixel_fmt,
+ offset_parm.width,
+ offset_parm.height,
+ offset_parm.stride,
+ offset_parm.u_offset,
+ offset_parm.v_offset,
+ offset_parm.vertical_offset,
+ offset_parm.horizontal_offset);
+ }
+ break;
default:
break;
}
diff --git a/drivers/mxc/ipu3/ipu_ic.c b/drivers/mxc/ipu3/ipu_ic.c
index 1a4bda3f071a..564fab0b699a 100644
--- a/drivers/mxc/ipu3/ipu_ic.c
+++ b/drivers/mxc/ipu3/ipu_ic.c
@@ -226,10 +226,14 @@ void _ipu_ic_init_prpvf(ipu_channel_params_t *params, bool src_is_csi)
reg = (downsizeCoeff << 30) | (resizeCoeff << 16);
/* Setup horizontal resizing */
- _calc_resize_coeffs(params->mem_prp_vf_mem.in_width,
- params->mem_prp_vf_mem.out_width,
- &resizeCoeff, &downsizeCoeff);
- reg |= (downsizeCoeff << 14) | resizeCoeff;
+ /* Upadeted for IC split case */
+ if (!(params->mem_prp_vf_mem.out_resize_ratio)) {
+ _calc_resize_coeffs(params->mem_prp_vf_mem.in_width,
+ params->mem_prp_vf_mem.out_width,
+ &resizeCoeff, &downsizeCoeff);
+ reg |= (downsizeCoeff << 14) | resizeCoeff;
+ } else
+ reg |= params->mem_prp_vf_mem.out_resize_ratio;
__raw_writel(reg, IC_PRP_VF_RSC);
@@ -344,10 +348,14 @@ void _ipu_ic_init_prpenc(ipu_channel_params_t *params, bool src_is_csi)
reg = (downsizeCoeff << 30) | (resizeCoeff << 16);
/* Setup horizontal resizing */
- _calc_resize_coeffs(params->mem_prp_enc_mem.in_width,
- params->mem_prp_enc_mem.out_width,
- &resizeCoeff, &downsizeCoeff);
- reg |= (downsizeCoeff << 14) | resizeCoeff;
+ /* Upadeted for IC split case */
+ if (!(params->mem_prp_enc_mem.out_resize_ratio)) {
+ _calc_resize_coeffs(params->mem_prp_enc_mem.in_width,
+ params->mem_prp_enc_mem.out_width,
+ &resizeCoeff, &downsizeCoeff);
+ reg |= (downsizeCoeff << 14) | resizeCoeff;
+ } else
+ reg |= params->mem_prp_enc_mem.out_resize_ratio;
__raw_writel(reg, IC_PRP_ENC_RSC);
@@ -416,14 +424,15 @@ void _ipu_ic_init_pp(ipu_channel_params_t *params)
reg = (downsizeCoeff << 30) | (resizeCoeff << 16);
/* Setup horizontal resizing */
- /* Upadeted for IC split case */
+ /* Upadeted for IC split case */
if (!(params->mem_pp_mem.out_resize_ratio)) {
_calc_resize_coeffs(params->mem_pp_mem.in_width,
params->mem_pp_mem.out_width,
&resizeCoeff, &downsizeCoeff);
reg |= (downsizeCoeff << 14) | resizeCoeff;
- } else
+ } else {
reg |= params->mem_pp_mem.out_resize_ratio;
+ }
__raw_writel(reg, IC_PP_RSC);