- Sep 16, 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>
-
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>
-
Dave Stevenson authored
The initial state of the Atmel is not defined, so ensure the backlight PWM is set to 0 by default. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The driver was using the regmap lock to serialise the individual accesses, but we really need to protect the timings of enabling the regulators, including any communication with the Atmel. Use a mutex within the driver to control overall accesses to the Atmel, instead of the regmap lock. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The Atmel is doing some things in the I2C ISR, during which period it will not respond to further commands. This is particularly true of the POWERON command. Increase delays appropriately, and retry should I2C errors be reported. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
There's no reason why 2 Raspberry Pi DSI displays can't be attached to a Pi Compute Module, so the backlight names need to be unique. Use the parent dev_name. It's not as readable, but is unique. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
If no interrupt is defined then a timer and workqueue are used to poll the controller. On remove these were not being cleaned up correctly. Fixes: ca61fdab "Input: edt-ft5x06: Poll the device if no interrupt is configured." Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The Raspberry Pi 7" 800x480 panel uses a Toshiba TC358762 DSI to DPI bridge chip, so there is a requirement for the timings to be specified for the end panel. Add such a definition. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
rpi_touchscreen_i2c_read returns any errors from i2c_transfer, or the 8 bit received value. Check for error values before trying to process the data as valid. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The panel has a prepare call which is before video starts, and an enable call which is after. The Toshiba bridge should be configured before video, so move the relevant power and initialisation calls to prepare. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
If a call to rpi_touchscreen_i2c_write from rpi_touchscreen_probe fails before mipi_dsi_device_register_full is called, then in trying to log the error message if uses ts->dsi->dev when it is still NULL. Use ts->i2c->dev instead, which is initialised earlier in probe. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The divider calculations tried to find the divider just faster than the clock requested. However if it required a divider of 7 then the for loop aborted without handling the "error" case, and could end up with a clock lower than requested. Correct the loop so that we always have a clock greater than requested. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
On Pi0-3 the driver allocates a buffer and requests a DMA channel because the ARM can't write to DSI1's registers directly. However unbind and the error paths in bind don't release the buffer or the DMA channel. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The HDMI block can repeat pixels for double clocked modes, and the firmware is now configuring the block to do this as the PV is doing it incorrectly when at 2pixels/clock. If the kernel doesn't reset it then we end up with strange modes. Reset MISC_CONTROL. 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>
-
- Sep 13, 2021
-
-
Phil Elwell authored
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>
-
David Plowman authored
A module parameter "dpc_enable" is added to allow the control of the sensor's on-board DPC (Defective Pixel Correction) function. This is a global setting to be configured before using the sensor; there is no intention that this would ever be changed on-the-fly. Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Maxime Ripard authored
drm_connector_helper_hpd_irq_event() calls drm_kms_helper_hotplug_event() with the mode-setting lock taken while it's supposed to be called without that lock taken. This results in a lockdep warning, and a deadlock if we were to wake up a TV through CEC (and possibly other cases). Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
- Sep 06, 2021
-
-
Phil Elwell authored
See: https://github.com/raspberrypi/linux/issues/4562 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Stefan Wahren authored
This adds an overlay to connect the QCA7000 in UART mode via UART0. The qcauart driver uses the serial device bus instead of deprecated line disciplines. Signed-off-by: Stefan Wahren <stefan.wahren@in-tech.com>
-
Maxime Ripard authored
When the firmware doesn't setup the HSM rate (such as when booting without an HDMI cable plugged in), its rate is 0 and thus any register access results in a CPU stall, even though HSM is enabled. Let's enforce a minimum rate at boot to avoid this issue. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
Commit 9d44abbb ("drm/vc4: Fall back to using an EDID probe in the absence of a GPIO.") added some code to read the EDID through DDC in the HDMI driver detect hook since the Pi3 had no HPD GPIO back then. However, commit b1b8f45b ("ARM: dts: bcm2837: Add missing GPIOs of Expander") changed that a couple of years later. This causes an issue though since some TV (like the LG 55C8) when it comes out of standy will deassert the HPD line, but the EDID will remain readable. It causes an issues nn platforms without an HPD GPIO, like the Pi4, where the DDC probing will be our primary mean to detect a display, and thus we will never detect the HPD pulse. This was fine before since the pulse was small enough that we would never detect it, and we also didn't have anything (like the scrambler) that needed to be set up in the display. However, now that we have both, the display during the HPD pulse will clear its scrambler status, and since we won't detect the disconnect/reconnect cycle we will never enable the scrambler back. As our main reason for that DDC probing is gone, let's just remove it. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
The drm_helper_hpd_irq_event() documentation states that this function is "useful for drivers which can't or don't track hotplug interrupts for each connector." and that "Drivers which support hotplug interrupts for each connector individually and which have a more fine-grained detect logic should bypass this code and directly call drm_kms_helper_hotplug_event()". This is thus what we ended-up doing. However, what this actually means, and is further explained in the drm_kms_helper_hotplug_event() documentation, is that drm_kms_helper_hotplug_event() should be called by drivers that can track the connection status change, and if it has changed we should call that function. This underlying expectation we failed to provide is that the caller of drm_kms_helper_hotplug_event() should call drm_helper_probe_detect() to probe the new status of the connector. Since we didn't do it, it meant that even though we were sending the notification to user-space and the DRM clients that something changed we never probed or updated our internal connector status ourselves. This went mostly unnoticed since the detect callback usually doesn't have any side-effect. Also, if we were using the DRM fbdev emulation (which is a DRM client), or any user-space application that can deal with hotplug events, chances are they would react to the hotplug event by probing the connector status eventually. However, now that we have to enable the scrambler in detect() if it was enabled it has a side effect, and an application such as Kodi or modetest doesn't deal with hotplug events. This resulted with a black screen when Kodi or modetest was running when a screen was disconnected and then reconnected, or switched off and on. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
In the bind hook, we actually need the device to have the HSM clock running during the final part of the display initialisation where we reset the controller and initialise the CEC component. Failing to do so will result in a complete, silent, hang of the CPU. Fixes: 411efa18 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-