Commit Graph

20 Commits

Author SHA1 Message Date
Dave Stevenson
76c0680083 MMAL and vcsm fixups for 64bit builds
Fixes various casts to/from integer of a different size, and printf
for size_t not using %zu.
2019-12-11 14:04:13 +00:00
imbens
13b33c8ee5 Fix confusing typo swapping _MAP and _ALLOC 2019-11-28 16:59:46 +00:00
Dave Stevenson
9238b8c5eb uservcsm: Fix incorrect struct type
vcsm_clean_invalid2 created and filled a struct for the older
kernel driver, and this caused problems when used against the
new driver.
Use the correct struct.
2019-11-18 17:03:12 +00:00
Dave Stevenson
5fbf5de17b vcsm: If /dev/vcsm fails, then try /dev/vcsm-cma not already tried.
If export is not requested, then /dev/vcsm was the only device tried.

On aarch64 we are not including /dev/vcsm as it has too many
32 bit assumptions, therefore the sensible thing is to try
/dev/vcsm-cma, even if export hasn't been explicitly requested.
2019-10-03 16:19:32 +01:00
Dave Stevenson
02c45b3266 vcsm: Add vcsm_clean_invalid2 to vcsm_cma
Not portable with 64 bit, and rather nasty to be exposing caching
operations to userspace, but effectively reimplement the same
as the older vcsm driver did.
2019-09-27 15:10:44 +02:00
Dave Stevenson
c2c06cc90c vcsm: Add support for vcsm_vc_addr_from_hdl to vcsm-cma path
It does have potential nasty failure mechanisms should you be
using 64 bit kernels etc, but should work for all current cases.
2019-09-03 23:25:25 +02:00
Dave Stevenson
945d7d0560 vcsm: Fixup vcsm_clean_invalid2
It was doing the wrong thing in both branches.
2019-07-24 16:29:43 +01:00
Dave Stevenson
4d9243ebc0 user-vcsm: Remove an erroneous debug line from vcsm_free. 2019-07-24 16:29:32 +01:00
Dave Stevenson
3eb81193e7 user-vcsm: Add option to pass in an external fd to vcsm 2019-07-24 16:29:23 +01:00
Dave Stevenson
fece203905 uservcsm: Error if export requested and existing connection doesn't use it.
Next step into making vcsm-cma the default.

Only one instance can be opened per process, and that is then used for
all clients. If the first client didn't ask for export so opened
vc-sm, but a subsequent request wants export (and therefore vcsm-cma)
then fail the vcsm_init.
2019-07-24 16:29:12 +01:00
Dave Stevenson
5c57ed546f user-vcsm: Add a local copy of the kernel dma-buf.h uapi header
Avoids entertainment in trying to cross-compile.
2019-07-24 16:29:00 +01:00
Dave Stevenson
18a4906311 user-vcsm: Reinstate vcsm_init as a funtion (not an inline)
Some apps may already be compiled looking for the symbol
vcsm_init, so having changed it to an inline will fail.

Reinstate vcsm_init as a function.
2019-07-24 16:28:46 +01:00
Dave Stevenson
0d6dda8d96 user_vcsm: Use const char* for names of objects
Avoids warnings from more recent compilers of const being stripped
2019-07-24 16:28:38 +01:00
Dave Stevenson
336c8c3d1e vc-sm-cma support 2019-07-24 16:27:58 +01:00
Yukimasa Sugizaki
c9d823d0c3 user-vcsm: Add an interface to get a VideoCore address of handle (#445) 2018-01-03 14:55:14 +00:00
Dave Stevenson
a7976021a8 vcsm: Add dmabuf import function. 2017-09-08 18:29:52 +01:00
popcornmix
3caf0cd4a6 vcsm: Add new clean/invalidate command for 2D blocks 2017-08-22 15:23:00 +01:00
popcornmix
cecb2f6a54 Fix some compiler warnings
See: https://github.com/raspberrypi/userland/pull/290
2016-02-16 00:26:17 +00:00
popcornmix
d4aa617de3 vcsm: Add ioctl for custom cache flushing 2015-05-25 22:33:48 +01:00
popcornmix
f3a029e67c Build libvcsm and vcsmem test utility
Add experimental VCSM support to the ALL_APPS build. mmal-play
seems to work but until VCSM is verified don't make MMAL depend on VCSM
because this might require makefile updates for other projects.
2014-07-25 22:44:23 +01:00