Commit Graph

48 Commits

Author SHA1 Message Date
Phil Elwell
7f72bc257d userland: Reduce debug_sym error messages
There are several reasons why /dev/fb0 might not exist, none of them
worrying, and the debug_sym library has fallbacks for those cases.
Suppress error messages for the ENOENT case, and only print one
message for other errors (unless the error keeps changing, which is
unlikely).

See: https://forums.raspberrypi.com/viewtopic.php?f=98&t=322238
2021-10-25 15:34:16 +01:00
Phil Elwell
97bc8180ad bcm_host: Recognise all Pi 4 variants, add BCM2711
bcm_host_is_model_pi4 should be equivalent to a test that the processor
type is BCM2711, so implement it as such (having added BCM2711 as a
recognised processor type and deprecating the name BCM2838).

See: https://github.com/raspberrypi/userland/issues/695

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2021-06-23 14:17:39 +01:00
doe300
d4a960e781 vcsm: properly handle too many CMA allocation attempts
Fixes #690
2021-05-13 18:55:43 +01:00
Andrew Scheller
3fd8527eef Update board revision codes
...with info from https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
2021-03-19 11:21:31 +00:00
popcornmix
5828e5b768 host_applications: Install debug_sym.h 2020-08-13 10:58:20 +01:00
Dave Stevenson
fdc2102ccf Remove vcfiled and vcfilesys.
Both these libraries/apps were related to the VPU accessing the
host file system over VCHI. This has never been used on the Pi,
and is creating build warnings with the latest versions of gcc.
Remove them from the source tree.
2020-07-28 11:04:12 +01:00
popcornmix
598e42e1e5 vc_sm_cma_ioctl.h: Correct licence 2020-05-27 14:29:11 +01:00
Dave Stevenson
6fb59736b1 debug_sym: Fixup whitespace issues from previous patch.
Fixes up "vcdbg/debugsym: Add option to specify the file size."
for whitespace issues that hadn't been raised during review on
the firmware tree.
2020-03-16 16:18:52 +00:00
Dave Stevenson
e75e59d9e3 vcdbg/debugsym: Add option to specify the file size.
This allows the use of /dev/mem instead of /dev/vc-mem (ie it
should work on mainline kernel builds.
vcdbg needs the offset and size of memory to work.
The firmware should have inserted these into the kernel
command line as vc_mem.mem_base and vc_mem.mem_size, so libdebugsym
tries to extract those values from /proc/cmdline, or you can
provide them on the command line via -l and -s

(/dev/mem couldn't be used previously as libdebugsym tries to do
lseek(SEEK_END) to get the length, and that isn't supported by
/dev/mem).
2020-03-16 16:18:52 +00:00
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
popcornmix
a14ee020d3 bcm_host: Add support for querying processor type and fkms status 2019-09-27 15:10:44 +02: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
Phil Elwell
17d2fdc1ab bcm_host: Adjust for 64-bit physical addresses 2019-07-24 17:44:57 +01: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
Dave Stevenson
ed1958642c debug_sym: Remove annoying message should fb copy fail
Any kernel not using bcm2708_fb as the FB driver is likely to
fail the FBIODMACOPY ioctl that vcdbg tries to use to access
the hidden 16MB of RAM behind the peripheral space.
Remove the error message as it drops back to using /dev/mem
instead anyway.
2019-07-24 15:22:37 +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
aa3977538b vcdbg: Don't use dma when file provided 2017-06-13 18:07:28 +01:00
popcornmix
71b8977ff6 cmake: Install user-vcsm.h to opt/vc/include/interface/vcsm 2017-03-21 20:55:48 +00:00
Khem Raj
cdb5da59f9 bcm_host: Honor previously set value of CMAKE_SHARED_LINKER_FLAGS
This fixes the problem where linker flags coming from top level
makefiles or environment are no longer respected anymore. This
is for example important to pass hardening flags to the build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-03-11 10:11:41 +00:00
popcornmix
aeb5a97143 cmake: Expose all symbols from vchostif in bcm_host 2017-03-02 00:34:04 +00:00
popcornmix
a2a955eeb8 debug_sym: Use pointer type for user address 2017-02-08 19:29:45 +00:00
popcornmix
2165408c7f vcdbg: Use dma driver to access gpu memory 2016-11-14 16:01:04 +00:00
popcornmix
a1b89e91f3 Updates for vcdbg build 2016-09-14 21:26:03 +01:00
popcornmix
22eb237060 vchiq: Allow inclusion from C++ 2016-09-14 21:23:22 +01:00
popcornmix
481fcfbcf8 Fix some typos found by codespell
See: https://github.com/raspberrypi/userland/pull/299
2016-04-06 19:47:08 +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
2eb4db3575 tvserver: Make tvservice state report LCD state 2015-09-09 23:21:47 +01:00
popcornmix
d4aa617de3 vcsm: Add ioctl for custom cache flushing 2015-05-25 22:33:48 +01:00
popcornmix
3b81b91c18 hello_fft: Use addresses from device tree rather than hard-coded constants 2015-01-28 18:43:21 +00:00
popcornmix
30cefd5b89 mmal: Add mmal_vc_diag code 2014-09-15 23:07:05 +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
Sebastian Dröge
599a30801b Load eglIntOpenMAXILDoneMarker() explicitely via dlsym() instead of having a stub in libEGL and libbcm_host
This fixes linking problems caused by "wrong" linking order and especially
makes this work reliable if libopenmaxil is loaded via dlopen().

https://github.com/raspberrypi/firmware/issues/158
2013-03-14 08:52:59 +01:00
Dom Cobley
83e1597d57 Fix location of bcm_host.h 2012-11-13 10:54:44 +00:00
Dom Cobley
61232b4033 Add hello_pi apps and bcm_host.h to userland. Merge with latest code. 2012-11-13 01:59:50 +00:00
popcornmix
729c0e6562 Initial import of userland code 2012-10-24 11:42:57 +01:00