Title: [8475] trunk/drivers/video/bfin-t350mcqb-fb.c: Fix fbmem alloc - pointed out here:
Revision
8475
Author
hennerich
Date
2010-03-17 04:59:21 -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: trunk/drivers/video/bfin-t350mcqb-fb.c (8474 => 8475)


--- trunk/drivers/video/bfin-t350mcqb-fb.c	2010-03-17 08:12:30 UTC (rev 8474)
+++ trunk/drivers/video/bfin-t350mcqb-fb.c	2010-03-17 08:59:21 UTC (rev 8475)
@@ -486,9 +486,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
@@ -558,8 +558,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:
@@ -582,8 +582,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