diff options
author | Fancy Fang <chen.fang@freescale.com> | 2014-05-09 05:34:51 -0400 |
---|---|---|
committer | Fancy Fang <chen.fang@freescale.com> | 2014-05-11 23:04:03 -0400 |
commit | dc22e9d199325a769078fcf6ad41e07955e68337 (patch) | |
tree | 45050daad75d78ac96c9c671f862a23cf6eed2ea | |
parent | 6e85aaf05d26b475fd760da7df5b195fb01f8cd2 (diff) |
ENGR00310844 [IMX6SX_SDB/IMX6SL_EVK]Video Display: All the videos have a green line at the bottom when play with 'gplay' and 'gplay-1.0'
This issue is due to the incorrect settings for PXP_SCALE register.
On the previous settings, when the PXP need to do interpolation
operation in SCALE engine, it has out-of-range image access. So we
need to adjust the scaling settings to make this issue not happen
through sacrifising some unnoticed image precise.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
-rw-r--r-- | drivers/dma/pxp/pxp_dma_v2.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c index 5d215c070232..8893ee6b74ca 100644 --- a/drivers/dma/pxp/pxp_dma_v2.c +++ b/drivers/dma/pxp/pxp_dma_v2.c | |||
@@ -652,20 +652,13 @@ static int pxp_set_scaling(struct pxps *pxp) | |||
652 | u32 xscale, yscale, s0scale; | 652 | u32 xscale, yscale, s0scale; |
653 | u32 decx, decy, xdec = 0, ydec = 0; | 653 | u32 decx, decy, xdec = 0, ydec = 0; |
654 | struct pxp_proc_data *proc_data = &pxp->pxp_conf_state.proc_data; | 654 | struct pxp_proc_data *proc_data = &pxp->pxp_conf_state.proc_data; |
655 | 655 | struct pxp_config_data *pxp_conf = &pxp->pxp_conf_state; | |
656 | if (((proc_data->srect.width == proc_data->drect.width) && | 656 | struct pxp_layer_param *s0_params = &pxp_conf->s0_param; |
657 | (proc_data->srect.height == proc_data->drect.height)) || | ||
658 | ((proc_data->srect.width == 0) && (proc_data->srect.height == 0))) { | ||
659 | proc_data->scaling = 0; | ||
660 | __raw_writel(0x10001000, pxp->base + HW_PXP_PS_SCALE); | ||
661 | __raw_writel(0, pxp->base + HW_PXP_PS_CTRL); | ||
662 | goto out; | ||
663 | } | ||
664 | 657 | ||
665 | proc_data->scaling = 1; | 658 | proc_data->scaling = 1; |
666 | decx = proc_data->srect.width / proc_data->drect.width; | 659 | decx = proc_data->srect.width / proc_data->drect.width; |
667 | decy = proc_data->srect.height / proc_data->drect.height; | 660 | decy = proc_data->srect.height / proc_data->drect.height; |
668 | if (decx > 0) { | 661 | if (decx > 1) { |
669 | if (decx >= 2 && decx < 4) { | 662 | if (decx >= 2 && decx < 4) { |
670 | decx = 2; | 663 | decx = 2; |
671 | xdec = 1; | 664 | xdec = 1; |
@@ -678,10 +671,18 @@ static int pxp_set_scaling(struct pxps *pxp) | |||
678 | } | 671 | } |
679 | xscale = proc_data->srect.width * 0x1000 / | 672 | xscale = proc_data->srect.width * 0x1000 / |
680 | (proc_data->drect.width * decx); | 673 | (proc_data->drect.width * decx); |
681 | } else | 674 | } else { |
682 | xscale = proc_data->srect.width * 0x1000 / | 675 | if (!is_yuv(s0_params->pixel_fmt) || |
683 | proc_data->drect.width; | 676 | (s0_params->pixel_fmt == PXP_PIX_FMT_GREY) || |
684 | if (decy > 0) { | 677 | (s0_params->pixel_fmt == PXP_PIX_FMT_GY04) || |
678 | (s0_params->pixel_fmt == PXP_PIX_FMT_YUV444)) | ||
679 | xscale = (proc_data->srect.width - 1) * 0x1000 / | ||
680 | (proc_data->drect.width - 1); | ||
681 | else | ||
682 | xscale = (proc_data->srect.width - 2) * 0x1000 / | ||
683 | (proc_data->drect.width - 1); | ||
684 | } | ||
685 | if (decy > 1) { | ||
685 | if (decy >= 2 && decy < 4) { | 686 | if (decy >= 2 && decy < 4) { |
686 | decy = 2; | 687 | decy = 2; |
687 | ydec = 1; | 688 | ydec = 1; |
@@ -695,8 +696,8 @@ static int pxp_set_scaling(struct pxps *pxp) | |||
695 | yscale = proc_data->srect.height * 0x1000 / | 696 | yscale = proc_data->srect.height * 0x1000 / |
696 | (proc_data->drect.height * decy); | 697 | (proc_data->drect.height * decy); |
697 | } else | 698 | } else |
698 | yscale = proc_data->srect.height * 0x1000 / | 699 | yscale = (proc_data->srect.height - 1) * 0x1000 / |
699 | proc_data->drect.height; | 700 | (proc_data->drect.height - 1); |
700 | 701 | ||
701 | __raw_writel((xdec << 10) | (ydec << 8), pxp->base + HW_PXP_PS_CTRL); | 702 | __raw_writel((xdec << 10) | (ydec << 8), pxp->base + HW_PXP_PS_CTRL); |
702 | 703 | ||