aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@suse.com>2016-01-22 21:34:22 -0500
committerIngo Molnar <mingo@kernel.org>2016-03-09 08:57:51 -0500
commitf6e45661f9be546811b62b2b01f32f4bf0c436c0 (patch)
tree6f23a99fb34604c43a04e9f943553e16100bc516 /drivers/video/fbdev
parente2857b8f11a289ed2b61d18d0665e05c1053c446 (diff)
dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()
Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: benh@kernel.crashing.org Cc: bhelgaas@google.com Cc: bp@suse.de Cc: dan.j.williams@intel.com Cc: daniel.vetter@ffwll.ch Cc: dhowells@redhat.com Cc: julia.lawall@lip6.fr Cc: konrad.wilk@oracle.com Cc: linux-fbdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@amacapital.net Cc: mst@redhat.com Cc: tomi.valkeinen@ti.com Cc: toshi.kani@hp.com Cc: vinod.koul@intel.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/acornfb.c4
-rw-r--r--drivers/video/fbdev/amba-clcd-versatile.c14
-rw-r--r--drivers/video/fbdev/amba-clcd.c4
-rw-r--r--drivers/video/fbdev/atmel_lcdfb.c9
-rw-r--r--drivers/video/fbdev/ep93xx-fb.c8
-rw-r--r--drivers/video/fbdev/gbefb.c8
-rw-r--r--drivers/video/fbdev/imxfb.c12
-rw-r--r--drivers/video/fbdev/mx3fb.c9
-rw-r--r--drivers/video/fbdev/nuc900fb.c8
-rw-r--r--drivers/video/fbdev/omap/lcdc.c16
-rw-r--r--drivers/video/fbdev/pxa168fb.c8
-rw-r--r--drivers/video/fbdev/pxafb.c4
-rw-r--r--drivers/video/fbdev/s3c-fb.c7
-rw-r--r--drivers/video/fbdev/s3c2410fb.c8
-rw-r--r--drivers/video/fbdev/sa1100fb.c8
15 files changed, 61 insertions, 66 deletions
diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c
index a305caea58ee..fb75b7e5a19a 100644
--- a/drivers/video/fbdev/acornfb.c
+++ b/drivers/video/fbdev/acornfb.c
@@ -1040,8 +1040,8 @@ static int acornfb_probe(struct platform_device *dev)
1040 * for the framebuffer if we are not using 1040 * for the framebuffer if we are not using
1041 * VRAM. 1041 * VRAM.
1042 */ 1042 */
1043 base = dma_alloc_writecombine(current_par.dev, size, &handle, 1043 base = dma_alloc_wc(current_par.dev, size, &handle,
1044 GFP_KERNEL); 1044 GFP_KERNEL);
1045 if (base == NULL) { 1045 if (base == NULL) {
1046 printk(KERN_ERR "acornfb: unable to allocate screen " 1046 printk(KERN_ERR "acornfb: unable to allocate screen "
1047 "memory\n"); 1047 "memory\n");
diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index 7a8afcd4573e..a8a22daa3f9d 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.c
+++ b/drivers/video/fbdev/amba-clcd-versatile.c
@@ -154,8 +154,8 @@ int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize)
154{ 154{
155 dma_addr_t dma; 155 dma_addr_t dma;
156 156
157 fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, 157 fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, framesize, &dma,
158 &dma, GFP_KERNEL); 158 GFP_KERNEL);
159 if (!fb->fb.screen_base) { 159 if (!fb->fb.screen_base) {
160 pr_err("CLCD: unable to map framebuffer\n"); 160 pr_err("CLCD: unable to map framebuffer\n");
161 return -ENOMEM; 161 return -ENOMEM;
@@ -169,14 +169,12 @@ int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize)
169 169
170int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma) 170int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma)
171{ 171{
172 return dma_mmap_writecombine(&fb->dev->dev, vma, 172 return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
173 fb->fb.screen_base, 173 fb->fb.fix.smem_start, fb->fb.fix.smem_len);
174 fb->fb.fix.smem_start,
175 fb->fb.fix.smem_len);
176} 174}
177 175
178void versatile_clcd_remove_dma(struct clcd_fb *fb) 176void versatile_clcd_remove_dma(struct clcd_fb *fb)
179{ 177{
180 dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, 178 dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
181 fb->fb.screen_base, fb->fb.fix.smem_start); 179 fb->fb.fix.smem_start);
182} 180}
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index 9362424c2340..fe274b5851c7 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -774,8 +774,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb)
774 774
775static int clcdfb_of_dma_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) 775static int clcdfb_of_dma_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
776{ 776{
777 return dma_mmap_writecombine(&fb->dev->dev, vma, fb->fb.screen_base, 777 return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
778 fb->fb.fix.smem_start, fb->fb.fix.smem_len); 778 fb->fb.fix.smem_start, fb->fb.fix.smem_len);
779} 779}
780 780
781static void clcdfb_of_dma_remove(struct clcd_fb *fb) 781static void clcdfb_of_dma_remove(struct clcd_fb *fb)
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 19eb42b57d87..56c60e67316a 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -414,8 +414,8 @@ static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
414{ 414{
415 struct fb_info *info = sinfo->info; 415 struct fb_info *info = sinfo->info;
416 416
417 dma_free_writecombine(info->device, info->fix.smem_len, 417 dma_free_wc(info->device, info->fix.smem_len, info->screen_base,
418 info->screen_base, info->fix.smem_start); 418 info->fix.smem_start);
419} 419}
420 420
421/** 421/**
@@ -435,8 +435,9 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
435 * ((var->bits_per_pixel + 7) / 8)); 435 * ((var->bits_per_pixel + 7) / 8));
436 info->fix.smem_len = max(smem_len, sinfo->smem_len); 436 info->fix.smem_len = max(smem_len, sinfo->smem_len);
437 437
438 info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, 438 info->screen_base = dma_alloc_wc(info->device, info->fix.smem_len,
439 (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); 439 (dma_addr_t *)&info->fix.smem_start,
440 GFP_KERNEL);
440 441
441 if (!info->screen_base) { 442 if (!info->screen_base) {
442 return -ENOMEM; 443 return -ENOMEM;
diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers/video/fbdev/ep93xx-fb.c
index 5b1081030cbb..75f0db25d19f 100644
--- a/drivers/video/fbdev/ep93xx-fb.c
+++ b/drivers/video/fbdev/ep93xx-fb.c
@@ -316,9 +316,8 @@ static int ep93xxfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
316 unsigned int offset = vma->vm_pgoff << PAGE_SHIFT; 316 unsigned int offset = vma->vm_pgoff << PAGE_SHIFT;
317 317
318 if (offset < info->fix.smem_len) { 318 if (offset < info->fix.smem_len) {
319 return dma_mmap_writecombine(info->dev, vma, info->screen_base, 319 return dma_mmap_wc(info->dev, vma, info->screen_base,
320 info->fix.smem_start, 320 info->fix.smem_start, info->fix.smem_len);
321 info->fix.smem_len);
322 } 321 }
323 322
324 return -EINVAL; 323 return -EINVAL;
@@ -428,8 +427,7 @@ static int ep93xxfb_alloc_videomem(struct fb_info *info)
428 /* Maximum 16bpp -> used memory is maximum x*y*2 bytes */ 427 /* Maximum 16bpp -> used memory is maximum x*y*2 bytes */
429 fb_size = EP93XXFB_MAX_XRES * EP93XXFB_MAX_YRES * 2; 428 fb_size = EP93XXFB_MAX_XRES * EP93XXFB_MAX_YRES * 2;
430 429
431 virt_addr = dma_alloc_writecombine(info->dev, fb_size, 430 virt_addr = dma_alloc_wc(info->dev, fb_size, &phys_addr, GFP_KERNEL);
432 &phys_addr, GFP_KERNEL);
433 if (!virt_addr) 431 if (!virt_addr)
434 return -ENOMEM; 432 return -ENOMEM;
435 433
diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index b63d55f481fa..1a242b1338e9 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -1185,8 +1185,8 @@ static int gbefb_probe(struct platform_device *p_dev)
1185 } else { 1185 } else {
1186 /* try to allocate memory with the classical allocator 1186 /* try to allocate memory with the classical allocator
1187 * this has high chance to fail on low memory machines */ 1187 * this has high chance to fail on low memory machines */
1188 gbe_mem = dma_alloc_writecombine(NULL, gbe_mem_size, 1188 gbe_mem = dma_alloc_wc(NULL, gbe_mem_size, &gbe_dma_addr,
1189 &gbe_dma_addr, GFP_KERNEL); 1189 GFP_KERNEL);
1190 if (!gbe_mem) { 1190 if (!gbe_mem) {
1191 printk(KERN_ERR "gbefb: couldn't allocate framebuffer memory\n"); 1191 printk(KERN_ERR "gbefb: couldn't allocate framebuffer memory\n");
1192 ret = -ENOMEM; 1192 ret = -ENOMEM;
@@ -1238,7 +1238,7 @@ static int gbefb_probe(struct platform_device *p_dev)
1238out_gbe_unmap: 1238out_gbe_unmap:
1239 arch_phys_wc_del(par->wc_cookie); 1239 arch_phys_wc_del(par->wc_cookie);
1240 if (gbe_dma_addr) 1240 if (gbe_dma_addr)
1241 dma_free_writecombine(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys); 1241 dma_free_wc(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
1242out_tiles_free: 1242out_tiles_free:
1243 dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t), 1243 dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
1244 (void *)gbe_tiles.cpu, gbe_tiles.dma); 1244 (void *)gbe_tiles.cpu, gbe_tiles.dma);
@@ -1259,7 +1259,7 @@ static int gbefb_remove(struct platform_device* p_dev)
1259 gbe_turn_off(); 1259 gbe_turn_off();
1260 arch_phys_wc_del(par->wc_cookie); 1260 arch_phys_wc_del(par->wc_cookie);
1261 if (gbe_dma_addr) 1261 if (gbe_dma_addr)
1262 dma_free_writecombine(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys); 1262 dma_free_wc(NULL, gbe_mem_size, gbe_mem, gbe_mem_phys);
1263 dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t), 1263 dma_free_coherent(NULL, GBE_TLB_SIZE * sizeof(uint16_t),
1264 (void *)gbe_tiles.cpu, gbe_tiles.dma); 1264 (void *)gbe_tiles.cpu, gbe_tiles.dma);
1265 release_mem_region(GBE_BASE, sizeof(struct sgi_gbe)); 1265 release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index bb2f1e866020..76b6a7784b06 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -937,8 +937,8 @@ static int imxfb_probe(struct platform_device *pdev)
937 } 937 }
938 938
939 fbi->map_size = PAGE_ALIGN(info->fix.smem_len); 939 fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
940 info->screen_base = dma_alloc_writecombine(&pdev->dev, fbi->map_size, 940 info->screen_base = dma_alloc_wc(&pdev->dev, fbi->map_size,
941 &fbi->map_dma, GFP_KERNEL); 941 &fbi->map_dma, GFP_KERNEL);
942 942
943 if (!info->screen_base) { 943 if (!info->screen_base) {
944 dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret); 944 dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
@@ -1005,8 +1005,8 @@ failed_cmap:
1005 if (pdata && pdata->exit) 1005 if (pdata && pdata->exit)
1006 pdata->exit(fbi->pdev); 1006 pdata->exit(fbi->pdev);
1007failed_platform_init: 1007failed_platform_init:
1008 dma_free_writecombine(&pdev->dev, fbi->map_size, info->screen_base, 1008 dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base,
1009 fbi->map_dma); 1009 fbi->map_dma);
1010failed_map: 1010failed_map:
1011 iounmap(fbi->regs); 1011 iounmap(fbi->regs);
1012failed_ioremap: 1012failed_ioremap:
@@ -1041,8 +1041,8 @@ static int imxfb_remove(struct platform_device *pdev)
1041 kfree(info->pseudo_palette); 1041 kfree(info->pseudo_palette);
1042 framebuffer_release(info); 1042 framebuffer_release(info);
1043 1043
1044 dma_free_writecombine(&pdev->dev, fbi->map_size, info->screen_base, 1044 dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base,
1045 fbi->map_dma); 1045 fbi->map_dma);
1046 1046
1047 iounmap(fbi->regs); 1047 iounmap(fbi->regs);
1048 release_mem_region(res->start, resource_size(res)); 1048 release_mem_region(res->start, resource_size(res));
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 7947634ee6b0..f91b1db262b0 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1336,9 +1336,8 @@ static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len,
1336 int retval = 0; 1336 int retval = 0;
1337 dma_addr_t addr; 1337 dma_addr_t addr;
1338 1338
1339 fbi->screen_base = dma_alloc_writecombine(fbi->device, 1339 fbi->screen_base = dma_alloc_wc(fbi->device, mem_len, &addr,
1340 mem_len, 1340 GFP_DMA | GFP_KERNEL);
1341 &addr, GFP_DMA | GFP_KERNEL);
1342 1341
1343 if (!fbi->screen_base) { 1342 if (!fbi->screen_base) {
1344 dev_err(fbi->device, "Cannot allocate %u bytes framebuffer memory\n", 1343 dev_err(fbi->device, "Cannot allocate %u bytes framebuffer memory\n",
@@ -1378,8 +1377,8 @@ err0:
1378 */ 1377 */
1379static int mx3fb_unmap_video_memory(struct fb_info *fbi) 1378static int mx3fb_unmap_video_memory(struct fb_info *fbi)
1380{ 1379{
1381 dma_free_writecombine(fbi->device, fbi->fix.smem_len, 1380 dma_free_wc(fbi->device, fbi->fix.smem_len, fbi->screen_base,
1382 fbi->screen_base, fbi->fix.smem_start); 1381 fbi->fix.smem_start);
1383 1382
1384 fbi->screen_base = NULL; 1383 fbi->screen_base = NULL;
1385 mutex_lock(&fbi->mm_lock); 1384 mutex_lock(&fbi->mm_lock);
diff --git a/drivers/video/fbdev/nuc900fb.c b/drivers/video/fbdev/nuc900fb.c
index 389fa2cbb713..6680edae4696 100644
--- a/drivers/video/fbdev/nuc900fb.c
+++ b/drivers/video/fbdev/nuc900fb.c
@@ -396,8 +396,8 @@ static int nuc900fb_map_video_memory(struct fb_info *info)
396 dev_dbg(fbi->dev, "nuc900fb_map_video_memory(fbi=%p) map_size %lu\n", 396 dev_dbg(fbi->dev, "nuc900fb_map_video_memory(fbi=%p) map_size %lu\n",
397 fbi, map_size); 397 fbi, map_size);
398 398
399 info->screen_base = dma_alloc_writecombine(fbi->dev, map_size, 399 info->screen_base = dma_alloc_wc(fbi->dev, map_size, &map_dma,
400 &map_dma, GFP_KERNEL); 400 GFP_KERNEL);
401 401
402 if (!info->screen_base) 402 if (!info->screen_base)
403 return -ENOMEM; 403 return -ENOMEM;
@@ -411,8 +411,8 @@ static int nuc900fb_map_video_memory(struct fb_info *info)
411static inline void nuc900fb_unmap_video_memory(struct fb_info *info) 411static inline void nuc900fb_unmap_video_memory(struct fb_info *info)
412{ 412{
413 struct nuc900fb_info *fbi = info->par; 413 struct nuc900fb_info *fbi = info->par;
414 dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len), 414 dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
415 info->screen_base, info->fix.smem_start); 415 info->screen_base, info->fix.smem_start);
416} 416}
417 417
418static irqreturn_t nuc900fb_irqhandler(int irq, void *dev_id) 418static irqreturn_t nuc900fb_irqhandler(int irq, void *dev_id)
diff --git a/drivers/video/fbdev/omap/lcdc.c b/drivers/video/fbdev/omap/lcdc.c
index 6efa2591eaa8..e3d9b9ea5498 100644
--- a/drivers/video/fbdev/omap/lcdc.c
+++ b/drivers/video/fbdev/omap/lcdc.c
@@ -612,8 +612,8 @@ static void lcdc_dma_handler(u16 status, void *data)
612 612
613static int alloc_palette_ram(void) 613static int alloc_palette_ram(void)
614{ 614{
615 lcdc.palette_virt = dma_alloc_writecombine(lcdc.fbdev->dev, 615 lcdc.palette_virt = dma_alloc_wc(lcdc.fbdev->dev, MAX_PALETTE_SIZE,
616 MAX_PALETTE_SIZE, &lcdc.palette_phys, GFP_KERNEL); 616 &lcdc.palette_phys, GFP_KERNEL);
617 if (lcdc.palette_virt == NULL) { 617 if (lcdc.palette_virt == NULL) {
618 dev_err(lcdc.fbdev->dev, "failed to alloc palette memory\n"); 618 dev_err(lcdc.fbdev->dev, "failed to alloc palette memory\n");
619 return -ENOMEM; 619 return -ENOMEM;
@@ -625,8 +625,8 @@ static int alloc_palette_ram(void)
625 625
626static void free_palette_ram(void) 626static void free_palette_ram(void)
627{ 627{
628 dma_free_writecombine(lcdc.fbdev->dev, MAX_PALETTE_SIZE, 628 dma_free_wc(lcdc.fbdev->dev, MAX_PALETTE_SIZE, lcdc.palette_virt,
629 lcdc.palette_virt, lcdc.palette_phys); 629 lcdc.palette_phys);
630} 630}
631 631
632static int alloc_fbmem(struct omapfb_mem_region *region) 632static int alloc_fbmem(struct omapfb_mem_region *region)
@@ -642,8 +642,8 @@ static int alloc_fbmem(struct omapfb_mem_region *region)
642 if (region->size > frame_size) 642 if (region->size > frame_size)
643 frame_size = region->size; 643 frame_size = region->size;
644 lcdc.vram_size = frame_size; 644 lcdc.vram_size = frame_size;
645 lcdc.vram_virt = dma_alloc_writecombine(lcdc.fbdev->dev, 645 lcdc.vram_virt = dma_alloc_wc(lcdc.fbdev->dev, lcdc.vram_size,
646 lcdc.vram_size, &lcdc.vram_phys, GFP_KERNEL); 646 &lcdc.vram_phys, GFP_KERNEL);
647 if (lcdc.vram_virt == NULL) { 647 if (lcdc.vram_virt == NULL) {
648 dev_err(lcdc.fbdev->dev, "unable to allocate FB DMA memory\n"); 648 dev_err(lcdc.fbdev->dev, "unable to allocate FB DMA memory\n");
649 return -ENOMEM; 649 return -ENOMEM;
@@ -660,8 +660,8 @@ static int alloc_fbmem(struct omapfb_mem_region *region)
660 660
661static void free_fbmem(void) 661static void free_fbmem(void)
662{ 662{
663 dma_free_writecombine(lcdc.fbdev->dev, lcdc.vram_size, 663 dma_free_wc(lcdc.fbdev->dev, lcdc.vram_size, lcdc.vram_virt,
664 lcdc.vram_virt, lcdc.vram_phys); 664 lcdc.vram_phys);
665} 665}
666 666
667static int setup_fbmem(struct omapfb_mem_desc *req_md) 667static int setup_fbmem(struct omapfb_mem_desc *req_md)
diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
index efb57c059997..def3a501acd6 100644
--- a/drivers/video/fbdev/pxa168fb.c
+++ b/drivers/video/fbdev/pxa168fb.c
@@ -680,8 +680,8 @@ static int pxa168fb_probe(struct platform_device *pdev)
680 */ 680 */
681 info->fix.smem_len = PAGE_ALIGN(DEFAULT_FB_SIZE); 681 info->fix.smem_len = PAGE_ALIGN(DEFAULT_FB_SIZE);
682 682
683 info->screen_base = dma_alloc_writecombine(fbi->dev, info->fix.smem_len, 683 info->screen_base = dma_alloc_wc(fbi->dev, info->fix.smem_len,
684 &fbi->fb_start_dma, GFP_KERNEL); 684 &fbi->fb_start_dma, GFP_KERNEL);
685 if (info->screen_base == NULL) { 685 if (info->screen_base == NULL) {
686 ret = -ENOMEM; 686 ret = -ENOMEM;
687 goto failed_free_info; 687 goto failed_free_info;
@@ -804,8 +804,8 @@ static int pxa168fb_remove(struct platform_device *pdev)
804 804
805 irq = platform_get_irq(pdev, 0); 805 irq = platform_get_irq(pdev, 0);
806 806
807 dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len), 807 dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
808 info->screen_base, info->fix.smem_start); 808 info->screen_base, info->fix.smem_start);
809 809
810 clk_disable(fbi->clk); 810 clk_disable(fbi->clk);
811 811
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 33b2bb315a2a..2c0487f4f805 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2446,8 +2446,8 @@ static int pxafb_remove(struct platform_device *dev)
2446 2446
2447 free_pages_exact(fbi->video_mem, fbi->video_mem_size); 2447 free_pages_exact(fbi->video_mem, fbi->video_mem_size);
2448 2448
2449 dma_free_writecombine(&dev->dev, fbi->dma_buff_size, 2449 dma_free_wc(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
2450 fbi->dma_buff, fbi->dma_buff_phys); 2450 fbi->dma_buff_phys);
2451 2451
2452 iounmap(fbi->mmio_base); 2452 iounmap(fbi->mmio_base);
2453 2453
diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c
index f72dd12456f9..5f4f696c2ecf 100644
--- a/drivers/video/fbdev/s3c-fb.c
+++ b/drivers/video/fbdev/s3c-fb.c
@@ -1105,8 +1105,7 @@ static int s3c_fb_alloc_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
1105 1105
1106 dev_dbg(sfb->dev, "want %u bytes for window\n", size); 1106 dev_dbg(sfb->dev, "want %u bytes for window\n", size);
1107 1107
1108 fbi->screen_base = dma_alloc_writecombine(sfb->dev, size, 1108 fbi->screen_base = dma_alloc_wc(sfb->dev, size, &map_dma, GFP_KERNEL);
1109 &map_dma, GFP_KERNEL);
1110 if (!fbi->screen_base) 1109 if (!fbi->screen_base)
1111 return -ENOMEM; 1110 return -ENOMEM;
1112 1111
@@ -1131,8 +1130,8 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
1131 struct fb_info *fbi = win->fbinfo; 1130 struct fb_info *fbi = win->fbinfo;
1132 1131
1133 if (fbi->screen_base) 1132 if (fbi->screen_base)
1134 dma_free_writecombine(sfb->dev, PAGE_ALIGN(fbi->fix.smem_len), 1133 dma_free_wc(sfb->dev, PAGE_ALIGN(fbi->fix.smem_len),
1135 fbi->screen_base, fbi->fix.smem_start); 1134 fbi->screen_base, fbi->fix.smem_start);
1136} 1135}
1137 1136
1138/** 1137/**
diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c
index d6704add1601..0dd86be36afb 100644
--- a/drivers/video/fbdev/s3c2410fb.c
+++ b/drivers/video/fbdev/s3c2410fb.c
@@ -645,8 +645,8 @@ static int s3c2410fb_map_video_memory(struct fb_info *info)
645 645
646 dprintk("map_video_memory(fbi=%p) map_size %u\n", fbi, map_size); 646 dprintk("map_video_memory(fbi=%p) map_size %u\n", fbi, map_size);
647 647
648 info->screen_base = dma_alloc_writecombine(fbi->dev, map_size, 648 info->screen_base = dma_alloc_wc(fbi->dev, map_size, &map_dma,
649 &map_dma, GFP_KERNEL); 649 GFP_KERNEL);
650 650
651 if (info->screen_base) { 651 if (info->screen_base) {
652 /* prevent initial garbage on screen */ 652 /* prevent initial garbage on screen */
@@ -667,8 +667,8 @@ static inline void s3c2410fb_unmap_video_memory(struct fb_info *info)
667{ 667{
668 struct s3c2410fb_info *fbi = info->par; 668 struct s3c2410fb_info *fbi = info->par;
669 669
670 dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len), 670 dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
671 info->screen_base, info->fix.smem_start); 671 info->screen_base, info->fix.smem_start);
672} 672}
673 673
674static inline void modify_gpio(void __iomem *reg, 674static inline void modify_gpio(void __iomem *reg,
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index dcf774c15889..fc2aaa5aca23 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -567,8 +567,8 @@ static int sa1100fb_mmap(struct fb_info *info,
567 567
568 if (off < info->fix.smem_len) { 568 if (off < info->fix.smem_len) {
569 vma->vm_pgoff += 1; /* skip over the palette */ 569 vma->vm_pgoff += 1; /* skip over the palette */
570 return dma_mmap_writecombine(fbi->dev, vma, fbi->map_cpu, 570 return dma_mmap_wc(fbi->dev, vma, fbi->map_cpu, fbi->map_dma,
571 fbi->map_dma, fbi->map_size); 571 fbi->map_size);
572 } 572 }
573 573
574 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 574 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
@@ -1099,8 +1099,8 @@ static int sa1100fb_map_video_memory(struct sa1100fb_info *fbi)
1099 * of the framebuffer. 1099 * of the framebuffer.
1100 */ 1100 */
1101 fbi->map_size = PAGE_ALIGN(fbi->fb.fix.smem_len + PAGE_SIZE); 1101 fbi->map_size = PAGE_ALIGN(fbi->fb.fix.smem_len + PAGE_SIZE);
1102 fbi->map_cpu = dma_alloc_writecombine(fbi->dev, fbi->map_size, 1102 fbi->map_cpu = dma_alloc_wc(fbi->dev, fbi->map_size, &fbi->map_dma,
1103 &fbi->map_dma, GFP_KERNEL); 1103 GFP_KERNEL);
1104 1104
1105 if (fbi->map_cpu) { 1105 if (fbi->map_cpu) {
1106 fbi->fb.screen_base = fbi->map_cpu + PAGE_SIZE; 1106 fbi->fb.screen_base = fbi->map_cpu + PAGE_SIZE;