diff options
author | Robby Cai <R63905@freescale.com> | 2013-09-12 19:11:54 +0800 |
---|---|---|
committer | Robby Cai <R63905@freescale.com> | 2013-09-12 20:00:25 +0800 |
commit | dbf364b3d0123e5328ae28455c57e588635232c7 (patch) | |
tree | 81cd443155983aa145ab67988f35a1373ad79f15 | |
parent | 01865322cc155d43384ffb2431209a230e9297b5 (diff) |
ENGR00279413 pxp/v4l2: get the right framebuffer start address at run timerel_imx_3.10.9_1.0.0_alpha
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.c | 12 |
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) struct fb_info *fbi = pxp->fbi; int ret; + ret = pxp_set_fbinfo(pxp); + if (ret) { + dev_err(&pxp->pdev->dev, "failed to call pxp_set_fbinfo\n"); + return ret; + } + console_lock(); fbi->fix.smem_start = toshow ? pxp->outb_phys : (unsigned long)pxp->fb.base; @@ -787,6 +793,12 @@ static int pxp_buf_prepare(struct videobuf_queue *q, sizeof(struct pxp_layer_param)); } else if (pxp_conf->ol_param[0].combine_enable) { /* Overlay */ + ret = pxp_set_fbinfo(pxp); + if (ret) { + dev_err(&pxp->pdev->dev, + "call pxp_set_fbinfo failed"); + goto fail; + } pxp_conf->ol_param[0].paddr = (dma_addr_t)pxp->fb.base; pxp_conf->ol_param[0].width = pxp->fb.fmt.width; |