From f58fd8d6540c710462a55e46268d5340eab495cd Mon Sep 17 00:00:00 2001 From: Danny Nold Date: Fri, 16 Jul 2010 16:57:39 -0500 Subject: [PATCH] ENGR00125259 - EPDC fb: Random display artifacts in unit tests Random artifacts were caused by corruption of the EPDC working buffer. This occurred because the working buffer was being allocated too small. This meant other accesses to FB-maintained buffers was corrupting the working buffer and causing random data to be drawn to the display. Fixing the working buffer size causes the artifacts to disappear. Signed-off-by: Danny Nold --- drivers/video/mxc/mxc_epdc_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c index 515048f6bb7..27f9faa64e5 100644 --- a/drivers/video/mxc/mxc_epdc_fb.c +++ b/drivers/video/mxc/mxc_epdc_fb.c @@ -2561,10 +2561,10 @@ int __devinit mxc_epdc_fb_probe(struct platform_device *pdev) upd_list->size, upd_list->phys_addr); } - fb_data->working_buffer_size = pentry->y_res * pentry->x_res / 2; + fb_data->working_buffer_size = pentry->y_res * pentry->x_res * 2; /* Allocate memory for EPDC working buffer */ fb_data->working_buffer_virt = - dma_alloc_coherent(&pdev->dev, pentry->y_res * pentry->x_res / 2, + dma_alloc_coherent(&pdev->dev, fb_data->working_buffer_size, &fb_data->working_buffer_phys, GFP_DMA); if (fb_data->working_buffer_virt == NULL) { dev_err(&pdev->dev, "Can't allocate mem for working buf!\n");