Title: [8477] branches/2009R1/drivers/video/bfin-t350mcqb-fb.c: Fix fbmem alloc - pointed out here:
Revision
8477
Author
hennerich
Date
2010-03-17 05:00:36 -0400 (Wed, 17 Mar 2010)

Log Message

Fix fbmem alloc - pointed out here:
http://blackfin.uclinux.org/gf/forummessage/87300
Also allocate memory for blanking lines.

Modified Paths

Diff

Modified: branches/2009R1/drivers/video/bfin-t350mcqb-fb.c (8476 => 8477)


--- branches/2009R1/drivers/video/bfin-t350mcqb-fb.c	2010-03-17 09:00:32 UTC (rev 8476)
+++ branches/2009R1/drivers/video/bfin-t350mcqb-fb.c	2010-03-17 09:00:36 UTC (rev 8477)
@@ -515,9 +515,9 @@
 	fbinfo->fbops = &bfin_t350mcqb_fb_ops;
 	fbinfo->flags = FBINFO_FLAG_DEFAULT;
 
-	info->fb_buffer =
-	    dma_alloc_coherent(NULL, fbinfo->fix.smem_len, &info->dma_handle,
-			       GFP_KERNEL);
+	info->fb_buffer = dma_alloc_coherent(NULL, fbinfo->fix.smem_len +
+				ACTIVE_VIDEO_MEM_OFFSET,
+				&info->dma_handle, GFP_KERNEL);
 
 	if (NULL == info->fb_buffer) {
 		printk(KERN_ERR DRIVER_NAME
@@ -587,8 +587,8 @@
 out6:
 	fb_dealloc_cmap(&fbinfo->cmap);
 out4:
-	dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
-			  info->dma_handle);
+	dma_free_coherent(NULL, fbinfo->fix.smem_len + ACTIVE_VIDEO_MEM_OFFSET,
+			 info->fb_buffer, info->dma_handle);
 out3:
 	framebuffer_release(fbinfo);
 out2:
@@ -611,8 +611,9 @@
 	free_irq(info->irq, info);
 
 	if (info->fb_buffer != NULL)
-		dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
-				  info->dma_handle);
+		dma_free_coherent(NULL, fbinfo->fix.smem_len +
+			ACTIVE_VIDEO_MEM_OFFSET, info->fb_buffer,
+			info->dma_handle);
 
 	fb_dealloc_cmap(&fbinfo->cmap);
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to