summaryrefslogtreecommitdiff
path: root/drivers/media/video/mxc/capture/mx27_prphw.c
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:27:32 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:27:32 -0600
commit04d61c58040f259b08e5170d62e2fb49ae8fd19b (patch)
treee1ab1a95a9f8c27741533ec0fcee94743329763c /drivers/media/video/mxc/capture/mx27_prphw.c
parent9e4175807497c24b82d5866076d8c7c80cdd5a94 (diff)
Bugzilla 605. Fix tearing when VPU rotates images.2.6.22-mx27ads-2007102503272.6.22-mx27-200710250327
Patch for Bugzilla 605. Fix tearing when VPU rotates images. A diagonal line appears when the VPU rotates the picture, at the encode stage. The PRP driver updates the buffer addresses while the PRP is processing data. Applies to linux 2.6.22 kernel for MX27 platform. http://www.bitshrine.org/gpp/linux-2.6.22-mx-Bugzilla-605.-Fix-tearing-when-VPU-rotates.patch
Diffstat (limited to 'drivers/media/video/mxc/capture/mx27_prphw.c')
-rw-r--r--drivers/media/video/mxc/capture/mx27_prphw.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/drivers/media/video/mxc/capture/mx27_prphw.c b/drivers/media/video/mxc/capture/mx27_prphw.c
index 0e8632573cff..ee90012ea5fc 100644
--- a/drivers/media/video/mxc/capture/mx27_prphw.c
+++ b/drivers/media/video/mxc/capture/mx27_prphw.c
@@ -361,7 +361,6 @@ static const unsigned char coeftab[] = {
1, 20
};
-
/*!
* @brief Build PrP coefficient table based on average algorithm
*
@@ -614,7 +613,7 @@ int prp_scale(scale_t * pscale, int din, int dout, int inv,
return -1;
}
}
-
+
if ((num > MAX_TBL * MAX_TBL) || scale(pscale, num, den) < 0) {
pr_debug("Scale err, unsupported ratio %d : %d\n", num, den);
return -1;
@@ -1067,50 +1066,6 @@ static int prphw_ch2_cfg(emma_prp_cfg * cfg, unsigned long *prp_cntl)
__raw_writel((cfg->ch2_width << 16) | cfg->ch2_height,
PRP_CH2_OUT_IMAGE_SIZE);
- if (cfg->ch2_pix == PRP_PIX2_YUV420) {
- u32 size;
-
- /* Luminanance band start address */
- __raw_writel(cfg->ch2_ptr, PRP_DEST_Y_PTR);
-
- if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP) {
- if (!cfg->ch2_ptr2)
- __raw_writel(cfg->ch2_ptr, PRP_SOURCE_Y_PTR);
- else
- __raw_writel(cfg->ch2_ptr2, PRP_SOURCE_Y_PTR);
- }
-
- /* Cb and Cr band start address */
- size = cfg->ch2_width * cfg->ch2_height;
- __raw_writel(cfg->ch2_ptr + size, PRP_DEST_CB_PTR);
- __raw_writel(cfg->ch2_ptr + size + (size >> 2),
- PRP_DEST_CR_PTR);
-
- if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP) {
- if (!cfg->ch2_ptr2) {
- __raw_writel(cfg->ch2_ptr + size,
- PRP_SOURCE_CB_PTR);
- __raw_writel(cfg->ch2_ptr + size + (size >> 2),
- PRP_SOURCE_CR_PTR);
- } else {
- __raw_writel(cfg->ch2_ptr2 + size,
- PRP_SOURCE_CB_PTR);
- __raw_writel(cfg->ch2_ptr2 + size + (size >> 2),
- PRP_SOURCE_CR_PTR);
- }
- }
- } else { /* Pixel interleaved YUV422 or YUV444 */
- __raw_writel(cfg->ch2_ptr, PRP_DEST_Y_PTR);
-
- if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP) {
- if (!cfg->ch2_ptr2)
- __raw_writel(cfg->ch2_ptr, PRP_SOURCE_Y_PTR);
- else
- __raw_writel(cfg->ch2_ptr2, PRP_SOURCE_Y_PTR);
- }
- }
- *prp_cntl |= PRP_CNTL_CH2B1 | PRP_CNTL_CH2B2;
-
return 0;
}