From: Timur Tabi Date: Fri, 2 Dec 2011 23:03:27 +0000 (-0600) Subject: drivers/video: fsl-diu-fb: merge all allocated data into one block X-Git-Tag: v3.3-rc1~59^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddd3d905436b572ebadc09dcf2d12ca5b37020a0;p=pandora-kernel.git drivers/video: fsl-diu-fb: merge all allocated data into one block The Freescale DIU driver allocates multiple blocks of memory, including multiple DMA buffers. Merge all of these blocks into one data structure. Specifically: 1) struct fsl_diu_data now contains everything that needs to be allocated, except for the framebuffers themselves. DMA'able objects are aligned correctly within the structure. 2) struct diu_addr is no longer needed, because we don't have to manage multiple blocks of DMA memory. 3) Since there's no diu_addr any more, macro DMA_ADDR is used to calculate the DMA address of any field in fsl_diu_data. 4) Functions allocate_buf() and free_buf() are no longer needed, because we now assume that dma_alloc_coherent() will allocate a page-aligned block, and everything is properly aligned with fsl_diu_data already, so we no longer need to align any memory blocks ourselves. 5) The "dummy" area descriptor is now defined separately from the other five ADs, so NUM_AOIS (previously called FSL_AOI_NUM) is now set to five instead of six. Previously, all six were combined together to avoid a separate call to allocate_buf() just for the dummy AD. 6) framebuffer_alloc() and framebuffer_release() are no longer used. The framebuffer is initialized manually. 7) Error handling is simplified since there's only one memory buffer allocated. Signed-off-by: Timur Tabi Signed-off-by: Florian Tobias Schandinat --- Reading git-diff-tree failed