- Sep 27, 2021
-
-
Dave Stevenson authored
The driver was implementing a get_brightness function that tried to read back the PWM setting of the display to report as the current brightness. The controller on the display does not support that, therefore we end up reporting a brightness of 0, and that confuses systemd's backlight service. Remove the hook so that the framework returns the current brightness automatically. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
GabyPCgeeK authored
Can configure mcp2515 on spi0/1/2 without the need for multiple overlays.
-
Guennadi Liakhovetski authored
This allows using the video-i2c camera driver with MLX90640 thermal infrared sensors, connected to Raspberry Pi. CONFIG_VIDEO_V4L2_I2C has to be selected to use the camera. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-
- Sep 23, 2021
-
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
Should we go through the timeout failure case with port_disable not returning all buffers for whatever reason, the buffers_with_vpu counter gets left at a non-zero value, which will cause reference counting issues should the instance be reused. Reset the count when the port is enabled again, but before any buffers have been sent to the VPU. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
Adds a module parameter "debug" to enable various logging levels. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
The list of includes was slightly over generic, and wasn't in alphabetical order. Clean it up. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
John Cox authored
Before uniniting the decode context sync with the IRQ queues to ensure that decode no longer has any buffers in use. This fixes a problem that manifested as ffmpeg leaking CMA buffers when it did a stream off on OUTPUT before CAPTURE, though in reality it was probably much more dangerous than that. Signed-off-by: John Cox <jc@kynesim.co.uk>
-
John Cox authored
Remove unused ctx state tracking variable and associated defines. Their presence implies they might be used, but they aren't. Signed-off-by: John Cox <jc@kynesim.co.uk>
-
Phil Elwell authored
With EDPWRDOWN set in idle, it must be cleared before checking for ENERGYON going high, indicating that a link is being established. The existing code allows 640ms for ENERGYON to go high, but on Raspberry Pis that appears not to be enough, causing link detection to fail. Increase the polling timeout to 1500ms - with a polling interval of 10ms it shouldn't cause unnecessary delays. See: https://github.com/raspberrypi/linux/issues/4393 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
- Sep 22, 2021
-
-
John Cox authored
V4L2 spec says that G/S/TRY_FMT IOCTLs should never return errors for anything other than wrong buffer types. Improve the capture format function such that this is so and unsupported values get converted to supported ones properly. Signed-off-by: John Cox <jc@kynesim.co.uk>
-
- Sep 21, 2021
-
-
Phil Elwell authored
A failure of some CPU cores to come online has been traced to the failure of a stm instruction while the cache is disabled. The symptom is that the saved values read back as zeroes, a catastrophic error since one of the values is a return address. This patch forces a readback and retry until the correct value is returned, Notes: At this stage in the boot process the core is running with its cache disabled. Before enabling the cache its contents must be explicitly invalidated, a process that requires quite a few registers that the caller must preserve. Evidence suggests that something is writing a block of zeroes over that space at a time when all other cores should be idle, possibly some kind of write-combiner, and retrying is an attempt to avoid the problem. The previous attempted fix (forcing the accesses to only be 4-byte aligned) appears to have only worked for a while and likely for less obvious reasons such as a change in code alignment. See: https://github.com/Hexxeh/rpi-firmware/issues/232 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
This reverts commit fe4cc0ed . The speculative patch that this commit reverts is proving to not be effective any more, so revert it and try a new approach. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
- Sep 17, 2021
-
-
Phil Elwell authored
Add the driver for the PEAK Systems USB CAN interface. See: https://github.com/raspberrypi/linux/issues/4583 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Jeff Geerling authored
-
- Sep 15, 2021
-
-
Dom Cobley authored
Matches correct behaviour from DECODE and DEINTERLACE Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
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>
-
Dave Stevenson authored
As we're wanting to wrap the image_fx component for deinterlacing, add the deinterlace algorithm values to enum mmal_parameter_imagefx Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
Being YUV420 formats, the step size is always 2 to avoid part chroma subsampling. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
Dave Stevenson authored
Adds enum mmal_interlace_type and struct mmal_parameter_video_interlace_type to allow for querying the interlacing mode on decoders. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Add the buffer flags that the firmware uses to identify fields on interlaced video Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
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>
-
- Sep 14, 2021
-
-
Maxime Ripard authored
The exit path of vc4_hdmi_encoder_pre_crtc_configure() is fairly hard to maintain given its numerous error conditions. Switch to a goto based approach to simplify it. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
Unlike pm_runtime_get_sync(), pm_runtime_resume_and_get() doesn't take a reference on failure, so we don't need to call pm_runtime_put() on failure. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
Our detect function calls pm_runtime_resume_and_get() and pm_runtime_put() to make sure the device is properly powered before trying to access the controller. However, it also makes sure the HSM clock is properly enabled (and disabled), which is redundant with what runtime_pm is doing already. Let's just remove it. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Dave Stevenson authored
The older panel-raspberrypi-touchscreen driver had issues in that it also controlled the power for the touchscreen without having an appropriate hook for the touchscreen driver to control that. Mainline has now added a Toshiba TC358762 bridge driver, and a regulator/backlight driver for the ATTiny microcontroller on the board. That allows clean integration with the touchscreen driver. Switch the overlays over to using newer drivers. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Add the two newer drivers for the Pi 7" touchscreen to the defconfigs Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
We need independent control of the resets for the panel&bridge, vs the touch controller. Expose the reset lines that are on the Atmel's port C via the GPIO API so that they can be controlled appropriately. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The Atmel was doing a load of automatic sequencing of control lines, however it was combining the touch controller's reset with the bridge/panel control. Change to control the control signals directly rather than through the automatic POWERON control. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-