Add the ability to embed arbitrary byte data in strings. The change was
motivated by the desire to allow parameters to supply multiple compatible
strings, but there may be other uses.
The acceptable escape sequences are most of the range supported by C, but
with the hexadecimal ('\x??`) escape limited to precisely two digits.
See: https://forums.raspberrypi.com/viewtopic.php?t=330792
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: https://github.com/raspberrypi/firmware/issues/1728
Seems to be an issue with library ordering.
I guess it appeared with update to bullseye, or gcc.
Note: these are largely deprectated and several fail to run with kms
(with an error message), but may as well fix build errors
FDT errors are small negative integers, and non-fatal errors are the
positive versions of the same errors. This scheme only works if the
non-fatal error values are never returned from a function where a
positive integer has another interpretation.
dtoverlay_get_target_offset broke this rule, leading eventually to
an invalid DT and failure to boot. Fortunately, finding the offset for
a fragment target is a non-destructive operation and therefore always
non-fatal, so move the NON_FATAL classification to the callers - of
which there are only three.
See: https://github.com/raspberrypi/firmware/issues/1686
Aliases and labels/symbols are stored in the same way - as path strings.
The overlay application code already knows how to rewrite exported
symbol paths so they are correct in the base DTB (rebasing), so use the
same logic to rebase aliases as they are applied.
Add a src-length-limited version of VCOS_SAFE_STRCPY. For some
reason the vc4 linker complained about not being able to find strnlen,
hence the open-coded version.
The default linker option with Bullseye appears to now set
as-needed, so as the core doesn't call into mmal_vc_client
it is viewed as unnecesary, missing that mmal_vc_client has
a constructor that registers functions with the core.
Move the registration of the component supplier to the core_init.
The linker is therefore satisfied that mmal_vc_client is used,
and actually links to it.
This allows Picamera to work again.
https://github.com/waveform80/picamera/issues/697
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
If the system is obviously configured for libcamera (for example) by
dint of /dev/video0 being given over to "unicam", complain and abort
immediately. In all other circumstances maintain previous behaviour.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
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
V4L2 needs to stop on any change that triggers a V4L2_EVENT_SOURCE_CHANGE,
and that includes aspect ratio and colourspace changes.
Add a new parameter to request that behaviour from the RIL component.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This change adds a colour denoise config structure to allow us to set the
operating mode of the software colour denoise. This essentially chooses
between the video and stills colour denoise variants.
The related kernel change is at:
https://github.com/raspberrypi/linux/pull/4069
The link was broken during the documentation revamp. Just link
to vcgencmd in the online docs. Related documentation is easy
to find with the online search and reduces the number for links
to update in the future.
A misformed string in an override, eg
changeme = <0>, "-1,-2";
would stall the parsing as it didn't know how to handle ','
and kept trying to process it over and over.
Abort on incorrect syntax.
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>
I've spent a little time going through the excellent raspberry pi
documentation site in order to build some man-pages for most of the
utilities in the suite. Note that not all utilities are covered here
(notably vchiq_test, mmal_vc_diag are missing) but I think it covers the
most commonly used utilities.
I've also included some auxilliary man-pages (in section 7) for
information relevant to utilities like vcmailbox (covering things like
the mailbox info from the wiki-page, and the OTP registers from the
documentation site).
Video_decode was always ensuring that timestamps increased in value
during a stream.
V4L2 M2M API wants a direct mapping, so add an option to disable it.
Unicam can unpack to 16bpp, but only using the bottom N bits, and
V4L2 supports them all. It is also far easier for a CPU to process.
Adds support to the framework and to the ISP component (changes the
black level config).
It's supported as a standard preset within the VEC, but there was
no way of selecting it.
The 2 bits for SDTV mode in enum SDTV_MODE_T were fully utilised,
so add it as a modifier in one of the higher bits if PAL is
selected.
https://github.com/raspberrypi/firmware/issues/811
The function parameters were extended without spotting another
user with their own local prototype.
Observed as misaligned exception when using video_render.
MIPI raw 14 wasn't previously defined, so add it for completeness
To support monochrome image sensors, add formats to handle the relevant
packed data formats into the ISP, and disable demosaic.
The Bayer pipeline is still active in Bayer mode, so all 4 channels need
to be programmed with the same data for blocks such as black level and
lens shading.
Adds the equivalent to "Add option to start in burst mode if AE settings
are manual" patch to RaspiStillYUV so it too can drop straight into
capture mode.
See https://github.com/raspberrypi/userland/issues/640
The examples read the first 512 bytes of the stream and try stuffing
them into the codec as header bytes.
If running a debug build of MMAL this will fail as the extradata
field of the port format is bigger than MMAL_FORMAT_EXTRADATA_MAX_SIZE
Reduce the header bytes array down to 128bytes to match
MMAL_FORMAT_EXTRADATA_MAX_SIZE.
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.
Current header generates warnings of the form "warning: cast from
function call of type ‘pthread_t’ {aka ‘long unsigned int’} to
non-matching type ‘VCOS_LLTHREAD_T *’ {aka ‘struct VCOS_LLTHREAD_T *’}
[-Wbad-function-cast]". Fix that.
SET_LAUNCH_VPU (0x30013) works like SET_EXECUTE_CODE except it
runs the code on VPU1 using the QPU rpc thread. The mailbox
returns immediately, and will only fail if out of memory.
The old lens_shading parameter structures exist for backwards
compatability, but there's a new v2 version which includes a
corner_sampled flag (when the grid is sampled on cell corners rather
than centrally) and a gain_format, which allows different fractional
precision in the uint8_t values, and even a u4.10 16-bit format.
Calls through the V4L2 interface to the ISP should use the v2
style of structure.