vcsm: VideoCore shared memory service for BCM2835
authorTim Gover <tgover@broadcom.com>
Tue, 22 Jul 2014 14:41:04 +0000 (15:41 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 00:59:45 +0000 (00:59 +0000)
commit8ae1eea045ee73395419b1420d2309eb35e23e4e
treedd800325f4c3976dde3b63a6a665164265309eb9
parenta7667f32e0ed0b72df2d0e3380648a4761b9c634
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]