Commit Graph

819 Commits

Author SHA1 Message Date
Tim Gover
fba5ce7d15 vcgencmd: Fix documentation URL
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.
2021-09-28 15:12:09 +01:00
popcornmix
ade66719aa tvservice: Add check to warn when running with kms 2021-09-28 15:10:41 +01:00
Dave Stevenson
37030a77e4 dtoverlay: Break on an error when parsing fragment overrides
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.
2021-09-28 15:10:08 +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
Dave Jones
45a0022ac6 Add man-pages for most commands
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).
2021-04-26 12:33:16 +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
Dave Stevenson
4a0a19b88b video_decode: Add parameter to disable timestamp validation
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.
2021-01-11 19:42:05 +00:00
Dave Stevenson
7deff646e8 MMAL/IL: Add support for the 16bpp Bayer/Grey raw 10/12/14 formats
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).
2021-01-11 19:42:05 +00:00
Dave Stevenson
093b30bbc2 RaspiCam: Correct rotation param docs to be 0/90/180/270 2020-11-30 14:51:22 +00:00
popcornmix
9f3f9054a6 Remove vcfiled and vcfilesys 2020-10-27 11:56:13 +00:00
Dave Stevenson
e432bc3400 vec: Support PAL-N.
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
2020-10-22 16:18:04 +01:00
popcornmix
7b6b0a9295 vc_image_helper: Avoid misaligned exception due to uninitialised pointer
The function parameters were extended without spotting another
user with their own local prototype.
Observed as misaligned exception when using video_render.
2020-10-22 16:14:46 +01:00
popcornmix
f73fca015d vc_service: Fix enum types to string lookup
Success and error had same values but retry was different (1 vs -2)
Only affects logging string, so not critical but fixes a warning
2020-08-13 10:59:40 +01:00
popcornmix
5828e5b768 host_applications: Install debug_sym.h 2020-08-13 10:58:20 +01:00
Dave Stevenson
6d044bc2be MMAL/IL/ISP component: Add support for mono MIPI formats, and Bayer raw 14
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.
2020-08-13 10:51:30 +01:00
Dave Stevenson
3e59217bd9 RaspiStillYUV: Add the equivalent "all manual" patch for faster captures.
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
2020-07-28 11:04:12 +01:00
Dave Stevenson
2534d69d0d interface/mmal: Reduce the header bytes alloc in the MMAL examples
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.
2020-07-28 11:04:12 +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
John Cox
188d3bfe4a Fix cast warning on vcos_llthread_current
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.
2020-06-26 14:24:31 +01:00
popcornmix
f97b1af1b3 Revert "Add MMAL and MMAL_APPS to 64bit builds"
This reverts commit 7d3c6b9f4c.
2020-05-28 15:02:54 +01:00
RaspberryPiFan
f4bccc38f9 Fix compiler warning 2020-05-28 13:27:08 +01:00
popcornmix
ad8ef597bd raspicam: Fix up whitespace 2020-05-27 15:10:26 +01:00
popcornmix
c069fd469d WF: Fix copyright headers 2020-05-27 15:07:47 +01:00
popcornmix
98c382cd3d raspicam: Allow tainted check to be skipped 2020-05-27 15:01:44 +01:00
Serge Schneider
3689a918fb Link raspicam applications with -lm 2020-05-27 14:56:57 +01:00
popcornmix
598e42e1e5 vc_sm_cma_ioctl.h: Correct licence 2020-05-27 14:29:11 +01:00
Phil Elwell
b58bb558f8 arm_loader: Add SET_LAUNCH_VPU1 mailbox message
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.
2020-05-27 14:24:19 +01:00
Dave Stevenson
ef41631200 video_encode: Add option to include header bytes with frame
V4L2 wants H264 header bytes to be included alongside an encoded
frame, therefore add a new option that selects this behaviour.
2020-05-27 14:23:10 +01:00
Dave Stevenson
04c2643311 mmal/vc: Add mapping for OMX_IndexConfigBufferStall / MMAL_PARAMETER_VIDEO_STALL_THRESHOLD
Requested on the forum, and potentially useful
https://www.raspberrypi.org/forums/viewtopic.php?f=70&t=273123&p=1655481
2020-05-27 14:23:10 +01:00
David Plowman
b420015189 isp: allow more formats of lens shading tables, including corner-sampled and 16-bit
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.
2020-05-27 14:23:10 +01:00
David Plowman
106b9ee84d isp: add application control of the gamma block
Preserves the "gamma_shift" functionality that was previously available.
2020-05-27 14:23:10 +01:00
David Plowman
998f7ee3e5 isp: add application control of (automatic) Defective Pixel Correction (DPC) block 2020-05-27 14:23:10 +01:00
David Plowman
336ef2b1d2 isp: add application control of sharpen block 2020-05-27 14:23:10 +01:00
David Plowman
f2f1eb651c isp: add application control of Green Equalisation (GEQ) parameters 2020-05-27 14:23:10 +01:00
David Plowman
010ffa92e4 isp: add application control of spatial denoise parameters 2020-05-27 14:23:10 +01:00
David Plowman
b8fa9560f9 isp: Allow setting Black Level for all 3 channels (whilst still preserving the old single channel method).
The new 3-channel method wants 16-bit black levels whereas the single-channel method uses native sensor bit depth. This does lead to some slightly awkward code; please refer to the inline comments for the conventions used.
2020-05-27 14:23:10 +01:00
Dave Stevenson
b1dc4cb6a7 isp: Add stats port to enable userspace 3A algorithms
Still needs some tarting up with regard enabling ports
in random orders, but all seems to be working.
2020-05-27 14:23:10 +01:00
popcornmix
e31da99739 Revert "mmal: Support 64 bit clients"
This reverts commit c2cd8020ed571c2db13d2ba99695c654136fb440.
2020-05-27 14:23:10 +01:00
Dave Stevenson
4a57ea4107 vc_image: Add vpitch parameter to VC_IMAGE_T for Bayer images
This allows us to use buffers that don't have any alignment on the
height.
2020-05-27 13:41:19 +01:00
popcornmix
03795057f9 Revert "tvservice: Fix freeze on old firmware. (#617)"
This reverts commit 2aaabf31e6.
2020-05-27 12:49:53 +01:00
James Hughes
a7f6686acd Fix up demo apps to abort when used on Pi4
Added a new library which contains code to read
/proc/cpuinfo and get the Type of device in use.

Demo apps use that to abort as necessary.
2020-05-27 12:43:39 +01:00
popcornmix
c0e5933973 hello_pi: Add top level makefile and enable parallel build 2020-05-27 12:43:17 +01:00
Dave Stevenson
2fe4ca33dc raspistill: Add option to start in burst mode if AE settings are manual
If exposure and analogue gain are set manually, and we run a stats
pass to setup all other control algorithms, then we can skip the
viewfinder phase and jump straight into captures, saving time over
dropped frames.

Add the relevant logic to allow this.
2020-05-20 15:37:07 +01:00
Dave Stevenson
291f9cb826 MMAL / video_render: Allow column stride to be set on column formats
MMAL and video_render used not to allow the client to set the column
stride or the chroma offset.
format->es->video.width wasn't actually being used for anything as
mmal_encoding_width_to_stride returns 0 meaning the component has to
compute it.

Add an extra flag for format->flags (MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE)
that treats format->es->video.width as the column stride instead of
being ignored.

video_render also used to ignore nSliceHeight (format->es->video.width)
on the column formats.
Adding support in setting that (via vc_image vpitch) means that you can
crop down a larger image with the chroma in a different place.
eg width=(col stride), height=2160, crop.width=1920, crop.height=1080
flags = MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE
will display the top left 1080p image out of a 4k source image.
2020-05-12 13:00:20 +01:00
Naushir Patuck
cb852cdd2d raspicam: Adjust framerate limits on long exposures for stills port.
Need to reduce the min fps limit to 0.005 for 200s exposures
available in HQ cam.

commit 27db31a8a8 fixed this for the video
port, but we need to do the same for the stills port as well.
2020-05-09 20:12:32 +01:00
naushir
27db31a8a8 raspistill: Adjust framerate limits on long exposures. (#622)
Need to reduce the min fps limit to 0.005 for 200s exposures
available in HQ cam.
2020-05-08 12:23:36 +01:00
naushir
b671bee987 raspicam: Add option to draw a focus window with FoM value. (#621)
Add a new option (-fw) in the raspicam applications to draw
a Figure of Merit (FoM) value to indicate sharpness in the displayed
region.  A larger value of FoM indicates a sharper image.

This is useful for the HQ camera to help with focussing on a subject.
2020-05-07 11:15:53 +01:00
Andrew Scheller
5b1ef8b158 Fix header enum typo 2020-05-04 12:46:31 +01:00
andry
2aaabf31e6 tvservice: Fix freeze on old firmware. (#617)
This fixes infinity loop at tvservice_wait_for_reply on initialize
with older firmare. [E] No multi display support in firmware!
Checked with `tvservice --list`
2020-05-04 09:18:45 +01:00