]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00279413 pxp/v4l2: get the right framebuffer start address at run time
authorRobby Cai <R63905@freescale.com>
Thu, 12 Sep 2013 11:11:54 +0000 (19:11 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 15:53:24 +0000 (17:53 +0200)
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>
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c

index 6a57d2c5ad02222a4c7617c0a7d691cb87809811..355b9251c070c0c5ccc972fb7c45ad37a2b271c4 100644 (file)
@@ -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;