vcsm: VideoCore shared memory service for BCM2835
authorTim Gover <tgover@broadcom.com>
Tue, 22 Jul 2014 14:41:04 +0000 (15:41 +0100)
committerpopcornmix <popcornmix@gmail.com>
Mon, 20 Feb 2017 12:17:54 +0000 (12:17 +0000)
commit88aa24ea460b430378d2942bbf60c4565f49a9ed
tree21926421669df48f37c5d7146a0f16e76912e3d3
parent7462da7db0c02c71fe9c78dd08d333b9076df089
vcsm: VideoCore shared memory service for BCM2835

Add experimental support for the VideoCore shared memory service.
This allows user processes to allocate memory from VideoCore's
GPU relocatable heap and mmap the buffers. Additionally, the memory
handles can passed to other VideoCore services such as MMAL, OpenMax
and DispmanX

TODO
* This driver was originally released for BCM28155 which has a different
  cache architecture to BCM2835. Consequently, in this release only
  uncached mappings are supported. However, there's no fundamental
  reason which cached mappings cannot be support or BCM2835
* More refactoring is required to remove the typedefs.
* Re-enable the some of the commented out debug-fs statistics which were
  disabled when migrating code from proc-fs.
* There's a lot of code to support sharing of VCSM in order to support
  Android. This could probably done more cleanly or perhaps just
  removed.

Signed-off-by: Tim Gover <timgover@gmail.com>
config: Disable VC_SM for now to fix hang with cutdown kernel

vcsm: Use boolean as it cannot be built as module

On building the bcm_vc_sm as a module we get the following error:

v7_dma_flush_range and do_munmap are undefined in vc-sm.ko.

Fix by making it not an option to build as module

vcsm: Add ioctl for custom cache flushing

vc-sm: Move headers out of arch directory

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
drivers/char/broadcom/Kconfig
drivers/char/broadcom/Makefile
drivers/char/broadcom/vc_sm/Makefile [new file with mode: 0644]
drivers/char/broadcom/vc_sm/vc_sm_defs.h [new file with mode: 0644]
drivers/char/broadcom/vc_sm/vc_sm_knl.h [new file with mode: 0644]
drivers/char/broadcom/vc_sm/vc_vchi_sm.c [new file with mode: 0644]
drivers/char/broadcom/vc_sm/vc_vchi_sm.h [new file with mode: 0644]
drivers/char/broadcom/vc_sm/vmcs_sm.c [new file with mode: 0644]
include/linux/broadcom/vmcs_sm_ioctl.h [new file with mode: 0644]