- 论坛徽章:
- 0
|
本帖最后由 person_luo 于 2012-09-09 23:19 编辑
framebuffer内存申请是使用的dma_alloc_coherent,所以fb内存不是使用的WC方式:
/* allocate frame buffer */
da8xx_fb_info->screen_base = dma_alloc_coherent(NULL,
par->databuf_sz + PAGE_SIZE,
(resource_size_t *)
&da8xx_fb_info->fix.smem_start,
GFP_KERNEL | GFP_DMA);
/*
* Allocate DMA-coherent memory space and return both the kernel remapped
* virtual and bus address for that space.
*/
void *
dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
{
void *memory;
if (dma_alloc_from_coherent(dev, size, handle, &memory))
return memory;
return __dma_alloc(dev, size, handle, gfp,
pgprot_dmacoherent(pgprot_kernel));
}
EXPORT_SYMBOL(dma_alloc_coherent); |
|