mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
5bb18aa5279f968be7b11c0dbb003f9d3afa49f2
1398744 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5bb18aa527 |
media: i2c: ov5647: Sensor should report RAW color space
Tested on Raspberry Pi running libcamera. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> |
||
|
|
b1df4216d9 |
media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
Fixes the following v4l2-compliance failure: fail: v4l2-test-controls.cpp(871): subscribe event for control 'User Controls' failed test Signed-off-by: David Plowman <david.plowman@raspberrypi.com> |
||
|
|
a19a4d7532 |
media: i2c: ov5647: Correct minimum VBLANK value
Trial and error reveals that the minimum vblank value appears to be 24
(the OV5647 data sheet does not give any clues). This fixes streaming
lock-ups in full resolution mode.
Fixes:
|
||
|
|
4cb9419a5a |
media: i2c: ov5647: Correct pixel array offset
The top offset in the pixel array is actually 6 (see page 3-1 of the
OV5647 data sheet).
Fixes:
|
||
|
|
4116f3950a |
media: i2c: ov5647: Parse and register properties
Parse device properties and register controls for them using the V4L2 fwnode properties helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
||
|
|
474f67575c |
media: ov5647: Fix return codes from ov5647_write/ov5647_read functions.
Previously they were returning positive non-zero codes for success,
which were getting passed up the call stack. Since release 4.19,
do_dentry_open (fs/open.c) has been catching these and flagging an
error. (So this driver has been broken since that date.)
Fixes:
|
||
|
|
1ccd66f926 |
Assign crypto aliases to different AES implementation modules
The kernel modules aes-neon-blk and aes-neon-bs perform poorly, at least on Cortex-A72 without crypto extensions. In fact, aes-arm64 outperforms them on benchmarks, despite it being a simpler implementation (only accelerating the single-block AES cipher). For modes of operation where multiple cipher blocks can be processed in parallel, aes-neon-bs outperforms aes-neon-blk by around 60-70% and aes-arm64 is another 10-20% faster still. But the difference is even more marked with modes of operation with dependencies between neighbouring blocks, such as CBC encryption, which defeat parallelism: in these cases, aes-arm64 is typically around 250% faster than either aes-neon-blk or aes-neon-bs. The key trade-off with aes-arm64 is that the look-up tables are situated in RAM. This leaves them potentially open to cache timing attacks. The two other modules, by contrast, load the look-up tables into NEON registers and so are able to perform in constant time. This patch aims to load aes-arm64 more often. If none of the currently-loaded crypto modules implement a given algorithm, a new one is typically selected for loading using a platform-neutral alias describing the required algorithm. To enable users to still load aes-neon-blk or aes-neon-bs if they really want them, while still ensuring that aes-arm64 is usually selected, remove the aliases from aes-neonbs-glue.c and aes-glue.c and apply them to aes-cipher-glue.c, but still build the two NEON modules. Since aes-glue.c can also be used to build aes-ce-blk, leave them enabled if USE_V8_CRYPTO_EXTENSIONS is defined, to ensure they are selected if we in future use a CPU which has the crypto extensions enabled. Note that the algorithm priority specifiers are unchanged, so if aes-neon-bs is loaded at the same time as aes-arm64, the former will be used in preference. However, aes-neon-blk and aes-arm64 have tied priority, so whichever module was loaded first will be used (assuming aes-neon-bs is not loaded). Signed-off-by: Ben Avison <bavison@riscosopen.org> |
||
|
|
933357eeca |
spi: bcm2835: Workaround/fix for zero-length transfers
A relatively recent commit ([1]) contained optimisation for the PIO
SPI FIFO-filling functions. The commit message includes the phrase
"[t]he blind and counted loops are always called with nonzero count".
This is technically true, but it is still possible for count to become
zero before the loop is entered - if tfr->len is zero. Moving the loop
exit condition to the end of the loop saves a few cycles, but results
in a near-infinite loop should the revised count be zero on entry.
Strangely, zero-lengthed transfers aren't filtered by the SPI framework
and, even more strangely, the Python3 spidev library is triggering them
for no obvious reason.
Avoid the problem completely by bailing out of the main transfer
function early if trf->len is zero, although there may be a case for
moving the mitigation into the framework.
See: https://github.com/raspberrypi/linux/issues/4100
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
[1]
|
||
|
|
a5cbe04703 |
staging/vc04_services: Add additional unpacked raw formats
Support has been added for the unpacked (16bpp) versions of the MIPI raw 10, 12, and 14 formats, so add the 4CCs for them. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
e058eb2d80 |
dt-bindings: Add compatible for BCM2711 DSI1
DSI1 on BCM2711 doesn't require the DMA workaround that is used on BCM2835/6/7, therefore it needs a new compatible string. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
6878aa01bf |
Input: edt-ft5x06: Poll the device if no interrupt is configured.
Not all systems have the interrupt line wired up, so switch to polling the touchscreen off a timer if no interrupt line is configured. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> input: edt-ft5x06: Handle unreliable TOUCH_UP events The ft5x06 is unreliable in sending touch up events, so some touch IDs can become stuck in the detected state. Ensure that IDs that are unreported by the controller are released. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> input: edt-ft5x06: Only look at the number of points reported Register 0x02 in the FT5x06 is TD_STATUS containing the number of valid touch points being reported. Iterate over that number of points rather than all that are supported on the device. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> input: edt-ft5x06: Only read data for number of points reported Rather than always reading the maximum number of points supported by the chip (which may be as high as 10), read the number of active points first, and read data for just those. In most cases this will result in less data on the I2C bus, with only the maximum touch points taking more due to a second read that has to configure the start address. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> input: edt-ft5x06: Fix patch reading only the number of points reported Fix bad conflict resolution from upstream updates. Need to read from tsdata->tdata_offset bytes, not from tsdata->offset. Also fix logging of i2c read errors to cover both transactions. Fixes: |
||
|
|
42c645e1cd |
firmware: raspberrypi: Add support for tryonce reboot flag
Define a new mailbox (SET_REBOOT_FLAGS) which may be used to pass optional flags to the Raspberry Pi firmware that changes the behaviour of the bootloader and firmware during a reboot. Currently this just defines the 'tryboot' flag which causes the firmware to load tryboot.txt instead config.txt. This alternate configuration file can be used to specify the path of an alternate firmware and kernels allowing a fallback mechanism to be implemented for OS upgrades. |
||
|
|
c3ca11d85e |
watchdog: bcm2835: Ignore params after the partition number
Use sscanf to extract the partition number and ignore extra parameters which are only relevant to other reboot notifiers. |
||
|
|
aa5813f5b9 |
gpio: Add gpio-fsm driver
The gpio-fsm driver implements simple state machines that allow GPIOs to be controlled in response to inputs from other GPIOs - real and soft/virtual - and time delays. It can: + create dummy GPIOs for drivers that demand them, + drive multiple GPIOs from a single input, with optional delays, + add a debounce circuit to an input, + drive pattern sequences onto LEDs etc. Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Fix a build warning Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Rename 'num-soft-gpios' to avoid warning As of 5.10, the Device Tree parser warns about properties that look like references to "suppliers" of various services. "num-soft-gpios" resembles a declaration of a GPIO called "num-soft", causing the value to be interpreted as a phandle, the owner of which is checked for a "#gpio-cells" property. To avoid this warning, rename the gpio-fsm property to "num-swgpios". Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Show state info in /sys/class/gpio-fsm Add gpio-fsm sysfs entries under /sys/class/gpio-fsm. For each state machine show the current state, which state (if any) will be entered after a delay, and the current value of that delay. Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Fix shutdown timeout handling The driver is intended to jump directly to a shutdown state in the event of a timeout during shutdown, but the sense of the test was inverted. Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Clamp the delay time to zero The sysfs delay_ms value is calculated live, and it is possible for the time left to appear to be negative briefly if the timer handling hasn't completed. Ensure the displayed value never goes below zero, for the sake of appearances. Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio-fsm: Sort functions into a more logical order Move some functions into a more logical ordering. This change causes no functional change and is essentially cosmetic. Signed-off-by: Phil Elwell <phil@raspberrypi.com> gpio_fsm: Rework the atomic-vs-non-atomic split Partition the code to separate atomic and non-atomic methods so that none of them have to handle both cases. The result avoids using deferred work unless necessary, and should be easier to understand. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
2560562fbc |
staging: vc04_services: ISP: Add a more complex ISP processing component
Driver for the BCM2835 ISP hardware block. This driver uses the MMAL component to program the ISP hardware through the VC firmware. The ISP component can produce two video stream outputs, and Bayer image statistics. This can't be encompassed in a simple V4L2 M2M device, so create a new device that registers 4 video nodes. This patch squashes all the development patches from the earlier rpi-5.4.y branch into one Signed-off-by: Naushir Patuck <naush@raspberrypi.com> staging/bcm2835-isp: Add the unpacked (16bpp) raw formats Now that the firmware supports the unpacked (16bpp) variants of the MIPI raw formats, add the mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-isp: Log the number of excess supported formats When logging that the firmware has provided more supported formats than we had allocated storage for, log the number allocated and returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: vc04_services: ISP: Add colour denoise control Add colour denoise control to the bcm2835 driver through a new v4l2 control: V4L2_CID_USER_BCM2835_ISP_CDN. Add the accompanying MMAL configuration structure definitions as well. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> bcm2835-isp: Allow formats with different colour spaces. Each supported format now includes a mask showing the allowed colour spaces, as well as a default colour space for when one was not specified. Additionally we translate the colour space to mmal format and pass it over to the VideoCore. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> media: i2c: add ov9281 driver. Change-Id: I7b77250bbc56d2f861450cf77271ad15f9b88ab1 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: fix mclk issue when probe multiple camera. Takes the ov9281 part only from the Rockchip's patch. Change-Id: I30e833baf2c1bb07d6d87ddb3b00759ab45a90e4 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: add enum_frame_interval function for iq tool 2.2 and hal3 Adds the ov9281 parts of the Rockchip patch adding enum_frame_interval to a large number of drivers. Change-Id: I03344cd6cf278dd7c18fce8e97479089ef185a5c Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: Fixup for recent kernel releases, and remove custom code The Rockchip driver was based on a 4.4 kernel, and had several custom Rockchip parts. Update to 5.4 kernel APIs, with the relevant controls required by libcamera, and remove custom Rockchip parts. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Read chip ID via 2 reads Vision Components have made an OV9281 module which blocks reading back the majority of registers to comply with NDAs, and in doing so doesn't allow auto-increment register reading as used when reading the chip ID. Use two reads and manually combine the results. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Add support for 8 bit readout The sensor supports 8 bit mode as well as 10bit, so add the relevant code to allow selection of this. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: ov9281: Add 1280x720 and 640x480 modes Breaks out common register set and adds the different registers for 1280x720 (cropped) and 640x480 (skipped) modes Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Fixed picture line bug in all ov9281 modes Signed-off-by: Mathias Anhalt <mathiasanhalt@web.de> Added hflip and vflip controls to ov9281 Signed-off-by: Mathias Anhalt <mathiasanhalt@web.de> media: i2c: ov9281: Remove override of subdev name From the original Rockchip driver, the subdev was renamed from the default to being "mov9281 <dev_name>" whereas the default would have been "ov9281 <dev_name>". Remove the override to drop back to the default rather than a vendor custom string. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: v4l2-subdev: add subdev-wide state struct Signed-off-by: Dom Cobley <popcornmix@gmail.com> media: i2c: ov9281: Add fwnode properties controls Add call to v4l2_ctrl_new_fwnode_properties to read and create the fwnode based controls. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Sensor should report RAW color space Tested on Raspberry Pi running libcamera. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Partial revert "media: i2c: add ov9281 driver." This partially reverts commit |
||
|
|
e7e95f8bc2 |
uapi: bcm2835-isp: Add bcm2835-isp uapi header file
This file defines the userland interface to the bcm2835-isp driver that will follow in a separate commit. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> uapi: bcm2835-isp: Add colour denoise configuration Add a configuration structure for colour denoise to the bcm2835_isp driver. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
f404df57c2 |
staging: vc04_services: Add a V4L2 M2M codec driver
This adds a V4L2 memory to memory device that wraps the MMAL video decode and video_encode components for H264 and MJPEG encode and decode, MPEG4, H263, and VP8 decode (and MPEG2 decode if the appropriate licence has been purchased). This patch squashes all the work done in developing the driver on the Raspberry Pi rpi-5.4.y kernel branch. Thanks to Kieran Bingham, Aman Gupta, Chen-Yu Tsai, and Marek Behún for their contributions. Please refer to the rpi-5.4.y branch for the full history. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Ensure OUTPUT timestamps are always forwarded The firmware by default tries to ensure that decoded frame timestamps always increment. This is counter to the V4L2 API which wants exactly the OUTPUT queue timestamps passed to the CAPTURE queue buffers. Disable the firmware option. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/vc04_services/codec: Add support for CID MPEG_HEADER_MODE Control V4L2_CID_MPEG_VIDEO_HEADER_MODE controls whether the encoder is meant to emit the header bytes as a separate packet or with the first encoded frame. Add support for it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/vc04_services/codec: Clear last buf dequeued flag on START It appears that the V4L2 M2M framework requires the driver to manually call vb2_clear_last_buffer_dequeued on the CAPTURE queue during a V4L2_DEC_CMD_START. Add such a call. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/vc04-services/codec: Fix logical precedence issue Two issues identified with operator precedence in logical expressions. Fix them. https://github.com/raspberrypi/linux/issues/4040 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Switch to s32fract staging/bcm2835-codec: Add the unpacked (16bpp) raw formats Now that the firmware supports the unpacked (16bpp) variants of the MIPI raw formats, add the mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Log the number of excess supported formats When logging that the firmware has provided more supported formats than we had allocated storage for, log the number allocated and returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Add support for pixel aspect ratio If the format is detected by the driver and a V4L2_EVENT_SOURCE_CHANGE event is generated, then pass on the pixel aspect ratio as well. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Implement additional g_selection calls for decode v4l_cropcap calls our vidioc_g_pixelaspect function to get the pixel aspect ratio, but also calls g_selection for V4L2_SEL_TGT_CROP_BOUNDS and V4L2_SEL_TGT_CROP_DEFAULT. Whilst it allows for vidioc_g_pixelaspect not to be implemented, it doesn't allow for either of the other two. Add in support for the additional selection targets. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Add VC-1 support. Providing the relevant licence has been purchased, then Pi0-3 can decode VC-1. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Fix support for levels 4.1 and 4.2 The driver said it supported H264 levels 4.1 and 4.2, but was missing the V4L2 to MMAL mappings. Add in those mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Set the colourspace appropriately for RGB formats Video decode supports YUV and RGB formats. YUV needs to report SMPTE170M or REC709 appropriately, whilst RGB should report SRGB. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Pass corrupt frame flag. MMAL has the flag MMAL_BUFFER_HEADER_FLAG_CORRUPTED but that wasn't being passed through, so add it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Do not update crop from S_FMT after res change During decode, setting the CAPTURE queue format was setting the crop rectangle to the requested height before aligning up the format to cater for simple clients that weren't expecting to deal with cropping and the SELECTION API. This caused problems on some resolution change events if the client didn't also then use the selection API. Disable the crop update after a resolution change. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> bcm2835: Allow compressed frames to set sizeimage (#4386) Allow the user to set sizeimage in TRY_FMT and S_FMT if the format flags have V4L2_FMT_FLAG_COMPRESSED set Signed-off-by: John Cox <jc@kynesim.co.uk> staging/bcm2835-codec: Change the default codec res to 32x32 In order to effectively guarantee that a V4L2_EVENT_SOURCE_CHANGE event occurs, adopt a default resolution of 32x32 so that it is incredibly unlikely to be decoding a stream of that resolution and therefore failing to note a "change" requiring the event. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Add support for decoding interlaced streams The video decoder can support decoding interlaced streams, so add the required plumbing to signal this correctly. The encoder and ISP do NOT support interlaced data, so trying to configure an interlaced format on those nodes will be rejected. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Correct ENUM_FRAMESIZES stepsize to 2 Being YUV420 formats, the step size is always 2 to avoid part chroma subsampling. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Return buffers to QUEUED not ERROR state Should start_streaming fail, or buffers be queued during stop_streaming, they should be returned to the core as QUEUED and not (as currently) as ERROR. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835_codec: Log MMAL flags in hex The flags is a bitmask, so it's far easier to interpret as hex data instead of decimal. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Allow custom specified strides/bytesperline. If the client provides a bytesperline value in try_fmt/s_fmt then validate it and correct if necessary. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835_codec: Add support for image_fx to deinterlace Adds another /dev/video node wrapping image_fx doing deinterlace. Co-developed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Dom Cobley <popcornmix@gmail.com> staging/bcm2835-v4l2_codec: Fix for encode selection API Matches correct behaviour from DECODE and DEINTERLACE Signed-off-by: Dom Cobley <popcornmix@gmail.com> staging: bcm2835-codec: Allow decode res changed before STREAMON(CAPTURE) The V4L2 stateful video decoder API requires that you can STREAMON on only the OUTPUT queue, feed in buffers, and wait for the SOURCE_CHANGE event. This requires that we enable the MMAL output port at the same time as the input port, because the output port is the one that creates the SOURCE_CHANGED event. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Do not send buffers to the VPU unless streaming With video decode we now enable both input and output ports on the component. This means that buffers will get passed to the VPU earlier than desired if they are queued befoer STREAMON. Check that the queue is streaming before sending buffers to the VPU. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Format changed should trigger drain When a format changed event occurs, the spec says that it triggers an implicit drain, and that needs to be signalled via -EPIPE. For BCM2835, the format changed event happens at the point the format change occurs, so no further buffers exist from before the resolution changed point. We therefore signal the last buffer immediately. We don't have a V4L2 available to us at this point, so set the videobuf2 queue last_buffer_dequeued flag directly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Signal the firmware to stop on all changes The firmware defaults to not stopping video decode if only the pixel aspect ratio or colourspace change. V4L2 requires us to stop decoding on any change, therefore tell the firmware of the desire for this alternate behaviour. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Queue flushed buffers instead of completing When a buffer is returned on a port that is disabled, return it to the videobuf2 QUEUED state instead of DONE which returns it to the client. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835_codec: Correct flushing code for refcounting Completions don't reference count, so setting the completion on the first buffer returned and then not reinitialising it means that the flush function doesn't behave as intended. Signal the completion when the last buffer is returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Ensure all ctrls are set on streamon Currently the code was only setting some controls from bcm2835_codec_set_ctrls, but it's simpler to use v4l2_ctrl_handler_setup to avoid forgetting to adding new controls to the list. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Add support for H&V Flips to ISP The ISP can do H & V flips whilst resizing or converting the image, so expose that via V4L2_CID_[H|V]FLIP. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> bcm2835-v4l2-codec: Remove advertised support of VP8 The support for this format by firmware is very limited and won't be faster than the arm. Signed-off-by: Dom Cobley <popcornmix@gmail.com> Pass V4L2_CID_MPEG_VIDEO_H264_MIN_QP/MAX_QP to bcm2835-v4l2-codec Following raspberrypi/linux#4704. This is necessary to set up quantization for variable bitrate to avoid video flickering. staging/bcm2835-codec: bytesperline for YUV420/YVU420 needs to be 64 Matching https://github.com/raspberrypi/linux/pull/4419, the ISP block (which is also used on the input of the encoder, and output of the decoder) needs the base address of all planes to be aligned to multiples of 32. This includes the chroma planes of YUV420 and YVU420. If the height is only a multiple of 2 (not 4), then you get an odd number of lines in the second plane, which means the 3rd plane starts at a multiple of bytesperline/2. Set the minimum bytesperline alignment to 64 for those formats so that the plane alignment is always right. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-codec: Allow a different stride alignment per role Deinterlace and decode aren't affected in the same way as encode and ISP by the alignment requirement on 3 plane YUV420. Decode would be affected, but it always aligns the height up to a macroblock, and uses the selection API to reflect that. Add in the facility to set the bytesperline alignment per role. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: vc04_services: codec: Add support for V4L2_PIX_FMT_RGBA32 format We already support V4L2_PIX_FMT_BGR32 which is the same thing with red and blue swapped, so it makes sense to include this variant as well. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> bcm2835-codec: Return empty buffers to the VPU instead of queueing to vbuf2 The encoder can skip frames totally should rate control overshoot the target bitrate too far. In this situation it generates an output buffer of length 0. V4L2 treats a buffer of length 0 as an end of stream flag, which is not appropriate in this case, therefore we can not return that buffer to the client. The driver was returning the buffer to videobuf2 in the QUEUED state, however that buffer was then not dequeued again, so the number of buffers was reduced each time this happened. In the pathological case of using GStreamer's videotestsrc in mode 1 for noise, this happens sufficiently frequently to totally stall the pipeline. If the port is still enabled then return the buffer straight back to the VPU rather than to videobuf2. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Add support for V4L2_PIX_FMT_NV12_COL128 V4L2_PIX_FMT_NV12_COL128 is supported by the ISP and the input of video_encode, output of video_decode, and both input and output of the ISP. Add in the plumbing to support the format on those ports. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Set crop_height for compressed formats In particular for the encoder where the CAPTURE format dictates the parameters given to the codec we need to be able to set the value passed as the crop_height for the compressed format. There's no crop available for cropped modes, so always set crop_height to the requested height. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Set port format from s_selection s_selection allows the crop region of an uncompressed pixel format to be specified, but it wasn't passing the setting on to the firmware. Depending on call order this would potentially mean that the crop wasn't actioned. Set the port format on s_selection if we have a component created. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> bcm2835-codec: /dev/video31 as interface to image_encode JPEG encoder Signed-off-by: Maxim Devaev <mdevaev@gmail.com> bcm2835-v4l2-codec: support H.264 5.0 and 5.1 levels vc04_services: bcm2835-codec: Remove redundant role check vidioc_try_encoder_cmd checks the role, but the ioctl is disabled for any roles in which it is invalid. Remove the redundant check. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Allow encoder_cmd on ISP and deinterlace ISP and deinterlace also need a mechanism for passing effectively an EOS through the pipeline to signal when all buffers have been processed. VIDIOC_ENCODER_CMD does exactly this for encoders, so reuse the same function for ISP and deinterlace. (VIDIOC_DECODER_CMD is slightly different in that it also passes details of when and how to stop, so is not as relevant). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835_codec: Allow larger images through the ISP Whilst the codecs are restricted to 1920x1080 / 1080x1920, the ISP isn't, but the limits advertised via V4L2 was 1920x1920 for all roles. Increase the limit to 16k x 16k for the ISP. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-v4l2-codec: Enable selection ioctl for ISP The ISP cases do nothing. Remove the break that separates them from the deinterlace case so they now do the same as deinterlace. This enables simple width & height setting, but does not enable setting left and top coordinates. Signed-off-by: John Cox <jc@kynesim.co.uk> media: bcm2835-v4l2-codec: Add profile & level ctrls to decode In order to support discovery of what profile & levels are supported by stateful decoders implement the profile and level controls where they are defined by V4L2. Signed-off-by: John Cox <jc@kynesim.co.uk> vc04_services: bcm2835_codec: Ignore READ_ONLY ctrls in s_ctrl In adding the MPEG2/MPEG4/H264 level and profile controls to the decoder, they weren't declared as read-only, nor handlers added to bcm2835_codec_s_ctrl. That resulted in an error message "Invalid control" being logged every time v4l2_ctrl_handler_setup was called from bcm2835_codec_create_component. Define those controls as read only, and exit early from s_ctrl on read only controls. Fixes: "media: bcm2835-v4l2-codec: Add profile & level ctrls to decode" Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835_codec: Set MPEG2_LEVEL control to READ_ONLY V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL was missed from "vc04_services: bcm2835_codec: Ignore READ_ONLY ctrls in s_ctrl" Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Add V4L2_CID_MPEG_VIDEO_B_FRAMES control FFmpeg insists on trying to set V4L2_CID_MPEG_VIDEO_B_FRAMES to 0, and generates an error should it fail. As our encoder doesn't support B frames, add a stub handler for it to silence FFmpeg. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Add support for V4L2_CID_MPEG_VIDEO_GOP_SIZE For H264, V4L2_CID_MPEG_VIDEO_H264_I_PERIOD is meant to be the intra I-frame period, whilst V4L2_CID_MPEG_VIDEO_GOP_SIZE is the intra IDR frame period. The firmware encoder doesn't produce I-frames that aren't IDR as well, therefore V4L2_CID_MPEG_VIDEO_GOP_SIZE is technically the correct control, however users may have adopted V4L2_CID_MPEG_VIDEO_H264_I_PERIOD. Add support for V4L2_CID_MPEG_VIDEO_GOP_SIZE controlling the encoder, and have VIDIOC_S_CTRL for V4L2_CID_MPEG_VIDEO_H264_I_PERIOD update the value for V4L2_CID_MPEG_VIDEO_GOP_SIZE (the reverse is not implemented). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Add missing alignment for V4L2_PIX_FMT_RGBA32 The patch adding image encode (JPEG) to the driver missed adding the alignment constraint for V4L2_PIX_FMT_RGBA32, which meant it ended up giving a stride and size of 0. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Downgrade the level for a debug message The debug message from bcm2835_codec_buf_prepare when the buffer size is incorrect can be a little spammy if the application isn't careful on how it drives it, therefore drop the priority of the message. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc04_services: bcm2835-codec: Correct alignment requirements for YUYV The firmware wants the YUYV format stride alignment to be to a multiple of 32pixels / 64 bytes. The kernel driver was configuring it to a multiple of 16 pixels / 32 bytes, which then failed when it tried starting to stream. Correct the alignment requirements. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: Fix up for 6.8 - use ignore_cap_streaming Drops downstream patch to v4l2_mem2mem, and uses the new mainline flag to achieve the same functionality Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835-codec: 32bpp RGB formats need a 64byte alignment The firmware needs 16 pixel alignment on RGBx 32bpp formats, which would be 64 byte. The driver was only setting 32byte alignment. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: bcm2835_codec: Pass framerate to the component if set late For video encoding, if the framerate was set after the component was created, then it wasn't set correctly on the port, and an old value was encoded in the bitstream. Update the port status when the framerate is set. https://github.com/raspberrypi/rpicam-apps/issues/664 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: vc04_services: bcm2835-codec: Drop include Makefile directive Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes in the bcm2835-v4l2-codec instead. The fix is equivalent to the four patches between |
||
|
|
2a5f83b926 |
staging: mmal-vchiq: 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 mmal-vchiq. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc-sm-cma: fixed kbuild problem error logs: drivers/staging/vc04_services/vc-sm-cma/Kconfig:1:error: recursive dependency detected! drivers/staging/vc04_services/vc-sm-cma/Kconfig:1: symbol BCM_VC_SM_CMA is selected by BCM2835_VCHIQ_MMAL drivers/staging/vc04_services/vchiq-mmal/Kconfig:1: symbol BCM2835_VCHIQ_MMAL depends on BCM2835_VCHIQ drivers/staging/vc04_services/Kconfig:14: symbol BCM2835_VCHIQ is selected by BCM_VC_SM_CMA For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" Tested-by: make ARCH=arm64 bcm2711_defconfig Test platform: fedora 33 Branch: rpi-5.10.y |
||
|
|
adf2461584 |
staging: mmal-vchiq: Add monochrome image formats
Adds support for monochrome image formats in the various MIPI packings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
3c05571b78 |
staging: vchiq-mmal: Add support for 14bit Bayer
Add in the missing defines. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
7381f351fd |
staging: vc04_services: Add new vc-sm-cma driver
Add Broadcom VideoCore Shared Memory support. This new driver allows contiguous memory blocks to be imported into the VideoCore VPU memory map, and manages the lifetime of those objects, only releasing the source dmabuf once the VPU has confirmed it has finished with it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: vcsm-cma: Fix memory leak from not detaching dmabuf When importing there was a missing call to detach the buffer, so each import leaked the sg table entry. Actually the release process for both locally allocated and imported buffers is identical, so fix them to both use the same function. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/vc-sm-cma: Avoid log spamming on Pi0/1 over cache alias. Pi 0/1 use the 0x80000000 cache alias as the ARM also sees the world through the VPU L2 cache. vc-sm-cma was trying to ensure it was in an uncached alias (0xc), and complaining on every allocation if it weren't. Reduce this logging. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> vc-sm-cma: Restore correct cache maintainance operations We have been using the more expensive flush operations rather than invalidate and clean since kernel rpi-5.9.y These are exposed with: |
||
|
|
18931fe031 |
staging: bcm2835-camera: Replace deprecated V4L2_PIX_FMT_BGR32
V4L2_PIX_FMT_BGR32 is deprecated as it is ambiguous over where the alpha byte is. Cheese/GStreamer appear to get it wrong for one, and qv4l2 gets red and blue swapped. Swap to the newer V4L2_PIX_FMT_BGRX32 format. https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=267736&p=1738912 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
f7889785ef |
brcmfmac: Increase power saving delay to 2s
Increase the delay before entering the lower power state to 2 seconds (the maximum allowed) in order to reduce the packet latencies, particularly for inbound packets. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
55d7aeb955 |
staging/fbtft: Add support for display variants
Display variants are intended as a replacement for the now-deleted fbtft_device drivers. Drivers can register additional compatible strings with a custom callback that can make the required changes to the fbtft_display structure. Start the ball rolling by adding adafruit18, adafruit18_green and sainsmart18 displays. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
e8f82966f4 |
leds: Add the actpwr trigger
The actpwr trigger is a meta trigger that cycles between an inverted mmc0 and default-on. It is written in a way that could fairly easily be generalised to support alternative sets of source triggers. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
c2d6fa3849 |
serial: 8250: bcm2835aux - defer if clock is zero
See: https://github.com/raspberrypi/linux/issues/3700 Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
2a7e88e0a1 |
media: platform: Move bcm2835-unicam compatible to downstream driver
The upstream Unicam driver needs a set of userland changes to get libcamera to run, and those aren't written or merged yet. Move the "brcm,bcm2835-unicam" compatible from the upstream driver to the old downstream version so that users can run libcamera against 6.10. Once the libcamera changes have been merged this can be reverted to use the upstream driver. If using the non-legacy compatible then assume we want to use media-controller API for configuration. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
f4a0e30639 |
media: bcm2835-unicam: Driver for CCP2/CSI2 camera interface
Add a driver for the Unicam camera receiver block on BCM283x processors. Compared to the bcm2835-camera driver present in staging, this driver handles the Unicam block only (CSI-2 receiver), and doesn't depend on the VC4 firmware running on the VPU. The commit is made up of a series of changes cherry-picked from the rpi-5.4.y branch of https://github.com/raspberrypi/linux/ with additional enhancements, forward-ported to the mainline kernel. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: kbuild test robot <lkp@intel.com> media: bcm2835-unicam: Add support for get_mbus_config to set num lanes Use the get_mbus_config pad subdev call to allow a source to use fewer than the number of CSI2 lanes defined in device tree. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: Avoid gcc warning over {0} on endpoint Older gcc versions object to = { 0 } initialisation if the first elemtn in the structure is a substructure. Use = { } to avoid this compiler warning. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: Reinstate V4L2_CAP_READWRITE in the caps v4l2-compliance throws a failure if the device doesn't advertise V4L2_CAP_READWRITE but allows read or write operations. We do support read, so reinstate the flag. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: Ensure type is VIDEO_CAPTURE in [g|s]_selection [g|s]_selection pass in a buffer type that needs to be validated before passing on to the sensor subdev. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835: unicam: Set VPU min clock freq to 250Mhz. When streaming with Unicam, the VPU must have a clock frequency of at least 250Mhz. Otherwise, the input fifos could overrun, causing image corruption. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> media: bcm2835-unicam: Drop WARN on uing direct cache alias Pi 0&1 pass all ARM accesses through the VPU L2 cache, therefore the dma-ranges property sets the cache alias bits to other than the direct alias, hence this WARN was firing. It was overprotective coding, so assume that everything is OK with the dma-ranges, and remove the WARN. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: Always service interrupts From when bringing up the driver, there was a check in the isr to ignore interrupts (claiming them handled) should the driver not be streaming. The VPU now will not register a camera driver if it finds a CSI2 node enabled in device tree, therefore this flawed check is redundant. https://github.com/raspberrypi/linux/issues/3602 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835: unicam: Fix uninitialized warning Signed-off-by: Jacko Dirks <jdirks.linuxdev@gmail.com> media: bcm2835-unicam: Fixup review comments from Hans. Updates the driver based on the upstream review comments from Hans Verkuil at https://patchwork.linuxtv.org/patch/63531/ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: Retain packing information on G_FMT The change to retrieve the pixel format always on g_fmt didn't check whether the native or unpacked version of the format had been requested, and always returned the packed one. Correct this so that the packing setting is retained whereever possible. Fixes "9d59e89 media: bcm2835-unicam: Re-fetch mbus code from subdev on a g_fmt call" Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: bcm2835-unicam: change minimum number of vb2_queue buffers to 1 Since the unicam driver was modified to write to a dummy buffer when no user-supplied buffer is available, it can now write to and return a buffer even when there's only a single one. Enable this by changing the min_buffers_needed in the vb2_queue; it will be useful for enabling still captures without allocating more memory than absolutely necessary. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> staging: vc04_services: ISP: Add a more complex ISP processing component Driver for the BCM2835 ISP hardware block. This driver uses the MMAL component to program the ISP hardware through the VC firmware. The ISP component can produce two video stream outputs, and Bayer image statistics. This can't be encompassed in a simple V4L2 M2M device, so create a new device that registers 4 video nodes. This patch squashes all the development patches from the earlier rpi-5.4.y branch into one Signed-off-by: Naushir Patuck <naush@raspberrypi.com> staging/bcm2835-isp: Add the unpacked (16bpp) raw formats Now that the firmware supports the unpacked (16bpp) variants of the MIPI raw formats, add the mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging/bcm2835-isp: Log the number of excess supported formats When logging that the firmware has provided more supported formats than we had allocated storage for, log the number allocated and returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> staging: vc04_services: ISP: Add colour denoise control Add colour denoise control to the bcm2835 driver through a new v4l2 control: V4L2_CID_USER_BCM2835_ISP_CDN. Add the accompanying MMAL configuration structure definitions as well. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> bcm2835-isp: Allow formats with different colour spaces. Each supported format now includes a mask showing the allowed colour spaces, as well as a default colour space for when one was not specified. Additionally we translate the colour space to mmal format and pass it over to the VideoCore. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> media: i2c: add ov9281 driver. Change-Id: I7b77250bbc56d2f861450cf77271ad15f9b88ab1 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: fix mclk issue when probe multiple camera. Takes the ov9281 part only from the Rockchip's patch. Change-Id: I30e833baf2c1bb07d6d87ddb3b00759ab45a90e4 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: add enum_frame_interval function for iq tool 2.2 and hal3 Adds the ov9281 parts of the Rockchip patch adding enum_frame_interval to a large number of drivers. Change-Id: I03344cd6cf278dd7c18fce8e97479089ef185a5c Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> media: i2c: ov9281: Fixup for recent kernel releases, and remove custom code The Rockchip driver was based on a 4.4 kernel, and had several custom Rockchip parts. Update to 5.4 kernel APIs, with the relevant controls required by libcamera, and remove custom Rockchip parts. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Read chip ID via 2 reads Vision Components have made an OV9281 module which blocks reading back the majority of registers to comply with NDAs, and in doing so doesn't allow auto-increment register reading as used when reading the chip ID. Use two reads and manually combine the results. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Add support for 8 bit readout The sensor supports 8 bit mode as well as 10bit, so add the relevant code to allow selection of this. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: ov9281: Add 1280x720 and 640x480 modes Breaks out common register set and adds the different registers for 1280x720 (cropped) and 640x480 (skipped) modes Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Fixed picture line bug in all ov9281 modes Signed-off-by: Mathias Anhalt <mathiasanhalt@web.de> Added hflip and vflip controls to ov9281 Signed-off-by: Mathias Anhalt <mathiasanhalt@web.de> media: i2c: ov9281: Remove override of subdev name From the original Rockchip driver, the subdev was renamed from the default to being "mov9281 <dev_name>" whereas the default would have been "ov9281 <dev_name>". Remove the override to drop back to the default rather than a vendor custom string. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: v4l2-subdev: add subdev-wide state struct Signed-off-by: Dom Cobley <popcornmix@gmail.com> media: i2c: ov9281: Add fwnode properties controls Add call to v4l2_ctrl_new_fwnode_properties to read and create the fwnode based controls. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> media: i2c: ov9281: Sensor should report RAW color space Tested on Raspberry Pi running libcamera. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Partial revert "media: i2c: add ov9281 driver." This partially reverts commit |
||
|
|
6fea361c70 |
brcmfmac: Prefer a ccode from OTP over nvram file
Allow the nvram file to set a default ccode (regulatory domain) without overriding one set in OTP. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
ace0f5c2d9 |
gpiolib: Don't prevent IRQ usage of output GPIOs
Upstream Linux deems using output GPIOs to generate IRQs as a bogus use case, even though the BCM2835 GPIO controller is capable of doing so. A number of users would like to make use of this facility, so disable the checks. See: https://github.com/raspberrypi/linux/issues/2527 Signed-off-by: Phil Elwell <phil@raspberrypi.org> |
||
|
|
47b7b1b579 |
staging:vc04_services: bcm2835-camera: Request headers with I-frame
V4L2 wishes to have the codec header bytes in the same buffer as the first encoded frame, so it does become 1-in 1-out for encoding. The firmware now has an option to do this, so enable it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
772eab6d17 |
staging: vc04_services: mmal-vchiq: Update parameters list
Adds in a couple of new MMAL parameter defines. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
eddbd487f7 |
media: uapi: v4l-ctrls: Add CID base for the bcm2835-isp driver
We are reserving controls for the new bcm2835-isp driver. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
0429cd2d1c |
media: uapi: v4l2-core: Add ISP statistics output V4L2 fourcc type
Add V4L2_META_FMT_BCM2835_ISP_STATS V4L2 format type. This new format will be used by the BCM2835 ISP device to return out ISP statistics for 3A. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
ce7bec1977 |
media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media bus format
This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam driver to support CSI-2 embedded data streams from camera sensors. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
c441b44f07 |
media: uapi: v4l2-core: Add sensor ancillary data V4L2 foucc type.
Add V4L2_META_FMT_SENSOR_DATA format 4CC. This new format will be used by the BCM2835 Unicam device to return out camera sensor embedded data. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
04cdccba0f |
spi: Force CS_HIGH if GPIO descriptors are used
Commit |
||
|
|
5c3ab8b241 |
media: dt-bindings: media: Add binding for the Raspberry PI HEVC decoder
Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |
||
|
|
1e0444b15a |
bcmgenet: Disable skip_umac_reset by default
Possible fixed upstream by 'net: bcmgenet: keep MAC in reset until PHY is up' Signed-off-by: popcornmix <popcornmix@gmail.com> |
||
|
|
9f282225d5 |
dt-bindings: pci: Add DT docs for Brcmstb PCIe device
The DT bindings description of the Brcmstb PCIe device is described. This node can be used by almost all Broadcom settop box chips, using ARM, ARM64, or MIPS CPU architectures. Signed-off-by: Jim Quinlan <jim2101024@gmail.com> |
||
|
|
515db3d212 |
pinctrl: bcm2835: Remove gpiochip on error
A failure in gpiochip_irqchip_add leads to a leak of a gpiochip. Fix
the leak with the use of devm_gpiochip_add_data.
Fixes:
|
||
|
|
378af3537a |
staging: vchiq: Load bcm2835_isp driver from vchiq
bcmn2835_isp is a platform driver dependent on vchiq, therefore add the load/unload functions for it to vchiq. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> |
||
|
|
e37bdd82e7 |
staging: vchiq_arm: Usa a DMA pool for small bulks
During a bulk transfer we request a DMA allocation to hold the scatter-gather list. Most of the time, this allocation is small (<< PAGE_SIZE), however it can be requested at a high enough frequency to cause fragmentation and/or stress the CMA allocator (think time spent in compaction here, or during allocations elsewhere). Implement a pool to serve up small DMA allocations, falling back to a coherent allocation if the request is greater than VCHIQ_DMA_POOL_SIZE. Signed-off-by: Oliver Gjoneski <ogjoneski@gmail.com> |
||
|
|
3a4204cf96 |
staging: vchiq_arm: Set up dma ranges on child devices
The VCHIQ driver now loads the audio, camera, codec, and vc-sm drivers as platform drivers. However they were not being given the correct DMA configuration. Call of_dma_configure with the parent (VCHIQ) parameters to be inherited by the child. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> staging: vchiq: Use the old dma controller for OF config on platform devices vchiq on Pi4 is no longer under the soc node, therefore it doesn't get the dma-ranges for the VPU. Switch to using the configuration of the old dma controller as that will set the dma-ranges correctly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> staging: vchiq_arm: Give vchiq children DT nodes vchiq kernel clients are now instantiated as platform drivers rather than using DT, but the children of the vchiq interface may still benefit from access to DT properties. Give them the option of a a sub-node of the vchiq parent for configuration and to allow them to be disabled. Signed-off-by: Phil Elwell <phil@raspberrypi.com> staging: vchiq_arm: Add 36-bit address support Conditional on a new compatible string, change the pagelist encoding such that the top 24 bits are the pfn, leaving 8 bits for run length (-1), giving a 36-bit address range. Manage the split between addresses for the VPU and addresses for the 40-bit DMA controller with a dedicated DMA device pointer that on non- BCM2711 platforms is the same as the main VCHIQ device. This allows the VCHIQ node to stay in the usual place in the DT. Signed-off-by: Phil Elwell <phil@raspberrypi.com> staging: vchiq_arm: children inherit DMA config Although it is no longer necessary for vchiq's children to have a different DMA configuration to the parent, they do still need to explicitly to have their DMA configuration set - to be that of the parent. Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
de10be0ae1 |
net: phy: BCM54210PE does not support PTP
BCM54213PE is an Ethernet PHY that supports PTP hardware timestamping. BCM54210PW ia another Ethernet PHY, but one without PTP support. Unfortunately the two PHYs return the same ID when queried, so some extra information is required to determine whether the PHY is PTP- capable. There are two Raspberry Pi products that use these PHYs - Pi 4B and CM4 - and fortunately they use different PHY addresses, so use that as a differentiator. Choose to treat a PHY with the same ID but another address as a BCM54210PE, which seems more common. See: https://github.com/raspberrypi/linux/issues/5104 Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
b64cd61dc5 |
net: phy: broadcom: optionally enable link-down powersave based on DT
It's really a function of the board whether or not to use this feature as it may require MAC compatibility as well as interop testing. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> |
||
|
|
594e51d784 |
phy: broadcom: Add bcm54213pe configuration
Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
0075ad045a |
phy: broadcom: split out the BCM54213PE from the BCM54210E IDs
The last nibble is a revision ID, and the 54213pe is a later rev than the 54210e. Running the 54210e setup code on a 54213pe results in a broken RGMII interface. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org> |
||
|
|
9f0d053a9a |
net: phy: broadcom: Allow ethernet LED mode to be set via device tree
Add device tree entries and code to allow the specification of the lighting modes for the LED's on the ethernet connector. Signed-off-by: James Hughes <james.hughes@raspberrypi.org> net:phy:2711 Change the default ethernet LED actions This should return default behaviour back to that of previous releases. net: phy: broadcom: Make LEDs 3+4 shadow LEDs 1+2 CM4 uses BCM54210PE, which supports 2 additional LEDs, choosing LED3 for the amber LED because it shows activity by default (LED4 is not connected). However, this makes it uncontrollable by the eth_led<n> dtparams which target LEDs 1+2. Solve the problem by making LEDs 3+4 mirror LEDs 1+2 (which is much simpler than adding baseboard-specific overrides, but comes with a risk of making one of the LEDs redundant). See: https://github.com/raspberrypi/linux/issues/5289 Signed-off-by: Phil Elwell <phil@raspberrypi.com> |
||
|
|
3bf81c1716 |
staging: vchiq_arm: Register bcm2835-codec as a platform driver
Following the same pattern as bcm2835-camera and bcm2835-audio, register the V4L2 codec driver as a platform driver Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> |