staging: vc04_services: Use vc-sm-cma to support zero copy
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Tue, 25 Sep 2018 15:07:55 +0000 (16:07 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:32:51 +0000 (16:32 +0100)
commit3fdd2f7eec6aea039ed57c9eca52c53bbfaece39
tree981549d11a538abda4da8736d2305a8dabf3fb79
parentb6c66856c22c9eef5f033e5da3702ce92451a365
staging: vc04_services: Use vc-sm-cma to support zero copy

With the vc-sm-cma driver we can support zero copy of buffers between
the kernel and VPU. Add this support to vchiq-mmal.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
staging: vc-sm-cma: Use a void* pointer as the handle within the kernel

The driver was using an unsigned int as the handle to the outside world,
and doing a nasty cast to the struct dmabuf when handed it back.
This breaks badly with a 64 bit kernel where the pointer doesn't fit
in an unsigned int.

Switch to using a void* within the kernel. Reality is that it is
a struct dma_buf*, but advertising it as such to other drivers seems
to encourage the use of it as such, and I'm not sure on the implications
of that.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/vchiq-mmal/Kconfig
drivers/staging/vc04_services/vchiq-mmal/mmal-common.h
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h