Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

au1200fb: don't use DMA_ATTR_NON_CONSISTENT

au1200fb allocates DMA memory using DMA_ATTR_NON_CONSISTENT, but never
calls dma_cache_sync to synchronize the memory between the CPU and the
device. If it was use on a not cache coherent bus that would be fatal,
but as far as I can tell from the naming and the mips platform
implementation it always is used in cache coherent systems. Remove
the DMA_ATTR_NON_CONSISTENT flag, which is a no-op in that case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190625121321.10197-1-hch@lst.de

authored by

Christoph Hellwig and committed by
Bartlomiej Zolnierkiewicz
5ae01cba a74cefd9

+2 -3
+2 -3
drivers/video/fbdev/au1200fb.c
··· 1234 1234 struct au1200fb_device *fbdev = info->par; 1235 1235 1236 1236 return dma_mmap_attrs(fbdev->dev, vma, fbdev->fb_mem, fbdev->fb_phys, 1237 - fbdev->fb_len, DMA_ATTR_NON_CONSISTENT); 1237 + fbdev->fb_len, 0); 1238 1238 } 1239 1239 1240 1240 static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata) ··· 1692 1692 1693 1693 fbdev->fb_mem = dmam_alloc_attrs(&dev->dev, 1694 1694 PAGE_ALIGN(fbdev->fb_len), 1695 - &fbdev->fb_phys, GFP_KERNEL, 1696 - DMA_ATTR_NON_CONSISTENT); 1695 + &fbdev->fb_phys, GFP_KERNEL, 0); 1697 1696 if (!fbdev->fb_mem) { 1698 1697 print_err("fail to allocate framebuffer (size: %dK))", 1699 1698 fbdev->fb_len / 1024);