aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobby Cai <R63905@freescale.com>2013-09-12 07:11:54 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:05:39 -0400
commit99300e5016058afe08453c79bbf726b4d60dc276 (patch)
tree6bc97b314620da11bef1e92e0322eafc435bbaca
parentda4a080a12375cecc2d9dff4680ec9d93c9a02ba (diff)
ENGR00279413 pxp/v4l2: get the right framebuffer start address at run time
Previously the driver gets the framebuffer start address at probe time. But this address might be changed if the framebuffer drivers re-allocate the frame buffers due to the application changes the yres_virtual. As a result, some garbage data can be observed on display. This patch adjusts the way to detect the start address at run time to fix this problem. Signed-off-by: Robby Cai <R63905@freescale.com>
-rw-r--r--drivers/media/platform/mxc/output/mxc_pxp_v4l2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c
index 6a57d2c5ad02..355b9251c070 100644
--- a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c
+++ b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c
@@ -291,6 +291,12 @@ static int pxp_show_buf(struct pxps *pxp, bool toshow)
291 struct fb_info *fbi = pxp->fbi; 291 struct fb_info *fbi = pxp->fbi;
292 int ret; 292 int ret;
293 293
294 ret = pxp_set_fbinfo(pxp);
295 if (ret) {
296 dev_err(&pxp->pdev->dev, "failed to call pxp_set_fbinfo\n");
297 return ret;
298 }
299
294 console_lock(); 300 console_lock();
295 fbi->fix.smem_start = toshow ? 301 fbi->fix.smem_start = toshow ?
296 pxp->outb_phys : (unsigned long)pxp->fb.base; 302 pxp->outb_phys : (unsigned long)pxp->fb.base;
@@ -787,6 +793,12 @@ static int pxp_buf_prepare(struct videobuf_queue *q,
787 sizeof(struct pxp_layer_param)); 793 sizeof(struct pxp_layer_param));
788 } else if (pxp_conf->ol_param[0].combine_enable) { 794 } else if (pxp_conf->ol_param[0].combine_enable) {
789 /* Overlay */ 795 /* Overlay */
796 ret = pxp_set_fbinfo(pxp);
797 if (ret) {
798 dev_err(&pxp->pdev->dev,
799 "call pxp_set_fbinfo failed");
800 goto fail;
801 }
790 pxp_conf->ol_param[0].paddr = 802 pxp_conf->ol_param[0].paddr =
791 (dma_addr_t)pxp->fb.base; 803 (dma_addr_t)pxp->fb.base;
792 pxp_conf->ol_param[0].width = pxp->fb.fmt.width; 804 pxp_conf->ol_param[0].width = pxp->fb.fmt.width;