OMAP VRAM patch set intro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This patch set is a prototype video ram allocator for OMAP for review.

The reasons I made this are:

- The DMA_CONSISTENT memory area is only 14M, and that may not be enough.
  1280*1024*4 framebuffer takes more than 5M. Three of those, and perhaps
  double buffering, and we are easily over the 14M limit.

- dma_alloc doesn't let you allocate big areas (I think the limit is ~4M).

- You can't specify the physical memory address where you want to alloc the
  memory. This is needed if the bootloader sets up the display and the kernel
  continues using that same memory area.

- dma_alloc doesn't support SRAM

At boot time memory areas (SDRAM or SRAM) defined in board file are reserved
with reserve_bootmem() or alloc_bootmem(). These areas are added to the VRAM
memory pool. Later on the OMAPFB or V4L2 devices can allocate needed memory
from the VRAM manager. If there's no VRAM left, the VRAM manager will fall back
to dma_alloc. The VRAM manager automatically mmaps the memory areas with
ioremap_wc() when the driver allocates VRAM.

The OMAPFB patch removes the old memory manager from dispc.c, which did mostly
the same thing as this one, and replaces it with this one.

Now some questions as I'm not too familiar with memory management:

Is it ok to use ioremap() to map SRAM/SDRAM? If not, how should the mapping be
done?

What actually are the types that should be used with physical and virtual
addresses here? dma_alloc() returns dma_addr_t and void * for physical and
virtual addresses. ioremap() takes unsigned long as physical address and
returns void __iomem *. What does __iomem mean? "This is pointer to memory that
is not RAM"?

How do other platforms implement video ram that is in the main memory?

Is it better to ioremap the whole VRAM area at boot time, or is it better to
ioremap the smaller pieces when the driver allocates memory?

Is it possible to not ioremap at all (in SDRAM case), but use the direct SDRAM
mapping that already exists? This would need modification of that mapping so
that the memory is not cached.

 Tomi Valkeinen

--

 arch/arm/mach-omap2/board-3430sdp.c      |   10 +
 arch/arm/plat-omap/Makefile              |    2 +-
 arch/arm/plat-omap/fb-vram.c             |  439 ++++++++++++++++++++++++++++++
 arch/arm/plat-omap/fb.c                  |   22 ++-
 arch/arm/plat-omap/include/mach/omapfb.h |    8 +
 drivers/video/omap/dispc.c               |  281 ++-----------------
 drivers/video/omap/omapfb_main.c         |   11 +-
 7 files changed, 504 insertions(+), 269 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux