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 <dannynold@freescale.com>
This commit is contained in:
Danny Nold
2010-07-16 16:57:39 -05:00
committed by Matt Sealey
parent 0662eac555
commit f58fd8d654

View File

@@ -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");