https://github.com/raspberrypi/linux

sort by:
Revision Author Date Message Commit Date
a2a3c94 dt: Switch hevc clock from fixed to firmware driver Signed-off-by: Dom Cobley <popcornmix@gmail.com> 16 September 2021, 11:49:31 UTC
6c47d36 staging/bcm2835-v4l2_codec: Fix for encode selection API Matches correct behaviour from DECODE and DEINTERLACE Signed-off-by: Dom Cobley <popcornmix@gmail.com> 16 September 2021, 10:45:50 UTC
6289813 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> 16 September 2021, 10:45:50 UTC
c2c698d staging/vchiq-mmal: Add the deinterlace image effects enums 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> 16 September 2021, 10:45:49 UTC
2351b41 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> 16 September 2021, 10:45:49 UTC
4a6b756 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> 16 September 2021, 10:45:48 UTC
c1d8428 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> 16 September 2021, 10:45:48 UTC
6ea578e 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> 16 September 2021, 10:45:48 UTC
688fb28 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> 16 September 2021, 10:45:47 UTC
5b8aca6 staging/vchiq-mmal: Add parameters for interlaced video support 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> 16 September 2021, 10:45:47 UTC
0ceb6a3 staging/vchiq-mmal: Add buffer flags for interlaced video Add the buffer flags that the firmware uses to identify fields on interlaced video Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 16 September 2021, 10:45:46 UTC
0bf7631 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> 16 September 2021, 10:45:46 UTC
4893628 dtoverlays: Update 7inch DSI display overlay to use newer drivers 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> 16 September 2021, 10:45:45 UTC
32afe14 defconfig: Add DRM_TOSHIBA_TC358762 and REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY Add the two newer drivers for the Pi 7" touchscreen to the defconfigs Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 16 September 2021, 10:45:45 UTC
8129c20 regulator: rpi-panel: Add GPIO control for panel and touch resets 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> 16 September 2021, 10:45:44 UTC
a9a6c15 regulator: rpi-panel: Convert to drive lines directly 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> 16 September 2021, 10:45:44 UTC
1e1819e regulator: rpi-panel: Ensure the backlight is off during probe. 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> 16 September 2021, 10:45:44 UTC
ce20942 regulator: rpi-panel: Serialise operations. 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> 16 September 2021, 10:45:43 UTC
1d3069f regulator: rpi-panel: Handle I2C errors/timing to the Atmel 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> 16 September 2021, 10:45:43 UTC
03b03ed regulator: rpi-panel: Register with a unique backlight name 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> 16 September 2021, 10:45:42 UTC
8434239 Input: edt-ft54x6: Clean up timer and workqueue on remove 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: ca61fdaba79f "Input: edt-ft5x06: Poll the device if no interrupt is configured." Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 16 September 2021, 10:45:42 UTC
b0bf133 drm/panel-simple: Add a timing for the Raspberry Pi 7" panel 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> 16 September 2021, 10:45:41 UTC
a423a93 drm/panel/raspberrypi-touchscreen: Handle I2C errors. 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> 16 September 2021, 10:45:41 UTC
33979e4 drm/panel/raspberrypi-touchscreen: Initialise the bridge in prepare 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> 16 September 2021, 10:45:41 UTC
ef63e69 drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised 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> 16 September 2021, 10:45:40 UTC
d10f2f6 drm/vc4: Correct DSI divider calculations 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> 16 September 2021, 10:45:40 UTC
4c8753f drm/vc4: Release workaround buffer and DMA in error paths and unbind 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> 16 September 2021, 10:45:39 UTC
55be8f0 drm/vc4: Reset HDMI MISC_CONTROL register. 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> 16 September 2021, 10:45:39 UTC
23cb9d5 Make rpi poe fan less noisy in cool environments Run the PoE hat fan with reduced noise when possible. The PoE hat fan will spin even at PWM=1 and spins almost silent. Tested at 17ºC, the fan PWM alternates between 1 and 10, which is a lot less noisy then alternating between PWM levels 0 and 31. 16 September 2021, 10:45:38 UTC
bbf58f6 drm/vc4: hdmi: Simplify exit path of vc4_hdmi_encoder_pre_crtc_configure 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> 14 September 2021, 16:06:40 UTC
8f70946 drm/vc4: hdmi: Remove unnecessary pm_runtime_put 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> 14 September 2021, 16:06:37 UTC
03c14b8 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> 13 September 2021, 11:12:15 UTC
1b5c956 media: i2c: imx477: Allow control of on-sensor DPC 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> 13 September 2021, 11:12:15 UTC
785c4ad overlays: README: Refer to WLAN where possible Signed-off-by: Phil Elwell <phil@raspberrypi.com> 13 September 2021, 11:12:14 UTC
6f899a3 drm/probe: Fix drm_connector_helper_hpd_irq_event deadlock 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> 13 September 2021, 11:12:13 UTC
ce16977 configs: Enable the Toneport UX1 Line 6 audio i/f See: https://github.com/raspberrypi/linux/issues/4562 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 06 September 2021, 15:30:44 UTC
ce755ed overlays: Add overlay for QCA7000 via UART0 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> 06 September 2021, 15:30:44 UTC
6e21a78 drm/vc4: Set a default HSM rate 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> 06 September 2021, 15:30:42 UTC
084118c drm/vc4: hdmi: Remove the DDC probing for status detection Commit 9d44abbbb8d5 ("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 b1b8f45b3130 ("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> 06 September 2021, 15:30:30 UTC
0eba659 drm/vc4: hdmi: Actually check for the connector status in hotplug 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> 06 September 2021, 15:30:29 UTC
3c20a2e drm/vc4: hdmi: Make sure the controller is powered up during bind 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: 411efa18e4b0 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 06 September 2021, 15:30:25 UTC
f0a7387 drm/probe-helper: Create a HPD IRQ event helper for a single connector The drm_helper_hpd_irq_event() function is iterating over all the connectors when an hotplug event is detected. During that iteration, it will call each connector detect function and figure out if its status changed. Finally, if any connector changed, it will notify the user-space and the clients that something changed on the DRM device. This is supposed to be used for drivers that don't have a hotplug interrupt for individual connectors. However, drivers that can use an interrupt for a single connector are left in the dust and can either reimplement the logic used during the iteration for each connector or use that helper and iterate over all connectors all the time. Since both are suboptimal, let's create a helper that will only perform the status detection on a single connector. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 23 August 2021, 12:06:53 UTC
ac755bc overlays: qca7000: Fix URL & README I2SE has been acquired by in-tech, so fix the URL & README accordingly. Signed-off-by: Stefan Wahren <stefan.wahren@in-tech.com> 23 August 2021, 12:06:52 UTC
66ed736 Makefiles: dt: Always set '-@' on ARCH_BCM2835 On the BCM2835 architecture, always add the '-@' option to enable the generation of symbols, rather than relying on DTC_FLAGS being empty or correct. See: https://github.com/raspberrypi/linux/issues/3846 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 23 August 2021, 12:06:52 UTC
7359cf1 overlays: rpi-poe-plus: Improve the cooling levels The PoE HAT cooling levels are not well suited for the PoE+ HAT - the fan fails to come on until the temperature reaches the third trip point (50C). Give the rpi-poe-plus overlay a different set of cooling levels - 0 32 64 128 255, as suggested by @chris-kai-in. See: https://github.com/raspberrypi/firmware/issues/1607 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 23 August 2021, 12:06:51 UTC
075d4ee xhci: guard accesses to ep_state in xhci_endpoint_reset() See https://github.com/raspberrypi/linux/issues/3981 Two read-modify-write cycles on ep->ep_state are not guarded by xhci->lock. Fix these. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 17 August 2021, 13:59:06 UTC
ae181f7 overlays: Add TI BQ32000 RTC support See: https://github.com/raspberrypi/linux/issues/4531 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 17 August 2021, 13:59:06 UTC
570268c usb: xhci: workaround for bogus SET_DEQ_PENDING endpoint state See https://github.com/raspberrypi/linux/issues/3981 An unknown unsafe memory access can result in the ep_state variable in xhci_virt_ep being trampled with a stuck SET_DEQ_PENDING state despite successful completion of a Set TR Deq Pointer command. All URB enqueue/dequeue calls for the endpoint will fail in this state so no transfers are possible until the device is reconnected. As a workaround, clear the flag if we see it set and issue a new Set TR Deq command anyway - this should be harmless, as a prior Set TR Deq command will only have been issued in the Stopped state, and if the endpoint is Running then the controller is required to ignore it and respond with a Context State Error event TRB. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 16 August 2021, 09:20:20 UTC
38e8c4b overlays: Add midi-uart{2345}-overlay.dts Added overlays for enabling MIDI baudrates on additional UARTs Signed-off-by: Pete Marshall <petemarshall303@gmail.com> 16 August 2021, 08:56:55 UTC
c590378 Revert "overlays: Update display GPIO declarations" for Goodix This reverts commit b7d685c0b1bd1b98af0e9c1f5d43769982bdbfb2 for Goodix Signed-off-by: Ahmet Inan <inan@aicodix.de> 16 August 2021, 08:56:55 UTC
2d8a055 overlays: Reduce Pi 4 vc4 CMA size to 320MB Reduce the default CMA allocation requested by the vc4-kms-v3d-pi4 and vc4-fkms-v3d-pi4 overlays to 320MB. Use magic values of the form (<n>*64 - 4)MB to encode default values of <n>*64MB, allowing these defaults to be distinguished from values set explicitly by the user with the usual overlay parameters (e.g. "cma-384"). Only default values will be capped if the Pi RAM is too small or the gpu_mem setting too large for it to be viable. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 03 August 2021, 16:49:38 UTC
318a417 media: i2c: ov7251: 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> 03 August 2021, 16:49:38 UTC
37f795d 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> 03 August 2021, 16:49:37 UTC
9123dff media: i2c: imx290: 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> 03 August 2021, 16:49:37 UTC
0828439 dtoverlays: Add orientation (and rotation) parameter to sensor overlays Add the orientation parameter to all the camera sensor overlays to avoid libcamera complaining, and add the rotation parameter where it hadn't been added before. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 03 August 2021, 16:49:36 UTC
a571b38 overlays: Add Ablic S35390A to i2c-rtc and -gpio See: https://github.com/raspberrypi/linux/pull/4492 Signed-off-by: Maxime Torrelli <maxime.torrelli@gmail.com> 03 August 2021, 16:49:36 UTC
56458a3 configs: Add RANDOM_TRUST_BOOTLOADER=y See: https://github.com/raspberrypi/firmware/issues/1595 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 28 July 2021, 10:47:24 UTC
52cea79 char: vc_mem: Delete dead code There are no error exists once device_create has succeeded, and therefore no need to call device_destroy from vc_mem_init. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 28 July 2021, 09:02:56 UTC
374f0fe configs: Add SND_BCM2708_SOC_CHIPDIP_DAC Enable the driver for the ChipDip DAC soundcard. Signed-off-by: Evgenij Sapunov <evgenij.sapunov@chipdip.ru> 27 July 2021, 16:54:08 UTC
db63c00 ASoC: bcm: Add chipdip-dac driver Driver chipdip-dac.c added into sound/soc/bcm/, files sound/soc/bcm/Kconfig and sound/soc/bcm/Makefile updated. Signed-off-by: Evgenij Sapunov <evgenij.sapunov@chipdip.ru> 27 July 2021, 16:54:07 UTC
6e37b6d overlays: Update and rename chipdip-i2s-master-dac Simple card fragment removed, GPIO fragment added. Signed-off-by: Evgenij Sapunov <evgenij.sapunov@chipdip.ru> 27 July 2021, 16:54:07 UTC
eed582f ARM: dts: Correct CM4 PHY MDIO address The firmware patches the PHY MDIO address in the DTB to cope with variations between board revisions, but the default for the CM4 PHY is currently 1 when it should be 0. Reported-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:54:07 UTC
e521693 overlays: Set CMA to 512MB on Pi 4 for vc4 Pi 4s have at least 1GB, and there are advantages to having more CMA available (HEVC works out of the box, support for more complex video setups, etc.) without significant disadvantages. Can be overridden by appending a parameter to the dtoverlay line, e.g. dtoverlay=vc4-fkms-v3d,cma-256 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:54:07 UTC
c7a0a02 brcmfmac: Try product-specific clm_blob names first Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:54:07 UTC
344126a Revert "drm/vc4: hdmi: Make sure the controller is powered up during bind" This reverts commit 94bc403a9a7af3bd042ecdc160e6ab0b08331df8. 27 July 2021, 16:54:07 UTC
30cd4e9 Revert "drm/vc4: hdmi: Switch to pm_runtime_resume_and_get" This reverts commit a2224f9777778965ff76049548ba483a23d7933e. 27 July 2021, 16:54:06 UTC
637e019 configs: Add CONFIG_DRM_GUD=m This enables support for the GUD USB Display DRM driver. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> 27 July 2021, 16:45:12 UTC
303c614 drm/gud: Add async_flush module parameter [ drm-misc commit a0356899ebe8ecde0da9c5685cc47154db973a5e ] Provide a way for userspace to choose synchronous flushing/pageflips. This helps save CPU and power. It is also useful for test scripts since userspace can know when a flush has happended and wait before doing the next visual test. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Peter Stuge <peter@stuge.se> Link: https://patchwork.freedesktop.org/patch/msgid/20210703141321.35494-2-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
472389d drm/gud: Add Raspberry Pi Pico ID [ drm-misc commit b3f4ef669357d5b9a2c5e8c33e3967a2070db7f9 ] Add VID/PID for the Raspberry Pi Pico implementation. Source: https://github.com/notro/gud-pico Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Peter Stuge <peter@stuge.se> Link: https://patchwork.freedesktop.org/patch/msgid/20210703141321.35494-1-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
ef72eba drm/gud: Use scatter-gather USB bulk transfer [ drm-misc commit 2eecd93b743b5611cd3654698794b4d0cefdc9ee ] There'a limit to how big a kmalloc buffer can be, and as memory gets fragmented it becomes more difficult to get big buffers. The downside of smaller buffers is that the driver has to split the transfer up which hampers performance. Compression might also take a hit because of the splitting. Solve this by allocating the transfer buffer using vmalloc and create a SG table to be passed on to the USB subsystem. vmalloc_32() is used to avoid DMA bounce buffers on USB controllers that can only access 32-bit addresses. This also solves the problem that split transfers can give host side tearing since flushing is decoupled from rendering. usb_sg_wait() doesn't have timeout handling builtin, so it is wrapped in a timer like 4 out of 6 users in the kernel have done. v2: - Use DIV_ROUND_UP (Linus) - Add timeout note to the commit log (Linus) - Expand note about upper buffer limit (Linus) - Change var name s/timer/ctx/ in gud_usb_bulk_timeout() Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210701170748.58009-2-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
2a72e86 drm/gud: Free buffers on device removal [ drm-misc commit f8ac863b6a93863334cefb94285daaa6617381b5 ] Free transfer and compression buffers on device removal instead of at DRM device removal time. This ensures that the usual 2x8MB buffers are released when the device is unplugged and not kept around should userspace keep the DRM device fd open. At least Ubuntu 20.04 doesn't release the DRM device on unplug. The damage_lock mutex is not destroyed because it is used outside the drm_dev_enter/exit block in gud_pipe_update(). AFAICT it's possible for an open fbdev descriptor to trigger a commit after the USB device is gone. v2: Don't destroy damage_lock Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210701170748.58009-1-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
ea49df2 drm/gud: cleanup coding style a bit [ Upstream commit 6dd7efc437611db16d432e0030f72d0c7e890127 ] Fix coccicheck warning: drivers/gpu/drm/gud/gud_internal.h:89:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_internal.h:107:2-3: Unneeded semicolon Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210402085523.76928-1-bernard@vivo.com 27 July 2021, 16:45:12 UTC
64bef14 drm/gud: Remove unneeded semicolon [ Upstream commit 166633c85c21fbe0baec40c898ca5a4f6eee0a08 ] drivers/gpu/drm/gud/gud_connector.c:658:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_connector.c:186:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_drv.c:511:3-4: Unneeded semicolon drivers/gpu/drm/gud/gud_pipe.c:127:4-5: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> [fix subject and squash 3 per file patches] Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210322174434.58849-2-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
2e13c2b drm/gud: fix sizeof use [ Upstream commit b91fbdc1df15befb3e51b9795b15d71fa4298602 ] drivers/gpu/drm/gud/gud_connector.c:710:37-43: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> [fix subject] Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210322174434.58849-1-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
f44bc26 drm: Add GUD USB Display driver [ Upstream commit 40e1a70b4aedf2859a1829991b48ef0ebe650bf2 ] This adds a USB display driver with the intention that it can be used with future USB interfaced low end displays/adapters. The Linux gadget device driver will serve as the canonical device implementation. The following DRM properties are supported: - Plane rotation - Connector TV properties There is also support for backlight brightness exposed as a backlight device. Display modes can be made available to the host driver either as DRM display modes or through EDID. If both are present, EDID is just passed on to userspace. Performance is preferred over color depth, so if the device supports RGB565, DRM_CAP_DUMB_PREFERRED_DEPTH will return 16. If the device transfer buffer can't fit an uncompressed framebuffer update, the update is split up into parts that do fit. Optimal user experience is achieved by providing damage reports either by setting FB_DAMAGE_CLIPS on pageflips or calling DRM_IOCTL_MODE_DIRTYFB. LZ4 compression is used if the device supports it. The driver supports a one bit monochrome transfer format: R1. This is not implemented in the gadget driver. It is added in preparation for future monochrome e-ink displays. The driver is MIT licensed to smooth the path for any BSD port of the driver. v2: - Use devm_drm_dev_alloc() and drmm_mode_config_init() - drm_fbdev_generic_setup: Use preferred_bpp=0, 16 was a copy paste error - The drm_backlight_helper is dropped, copy in the code - Support protocol version backwards compatibility for device v3: - Use donated Openmoko USB pid - Use direct compression from framebuffer when pitch matches, not only on full frames, so split updates can benefit - Use __le16 in struct gud_drm_req_get_connector_status - Set edid property when the device only provides edid - Clear compression fields in struct gud_drm_req_set_buffer - Fix protocol version negotiation - Remove mode->vrefresh, it's calculated v4: - Drop the status req polling which was a workaround for something that turned out to be a dwc2 udc driver problem - Add a flag for the Linux gadget to require a status request on SET operations. Other devices will only get status req on STALL errors - Use protocol specific error codes (Peter) - Add a flag for devices that want to receive the entire framebuffer on each flush (Lubomir) - Retry a failed framebuffer flush - If mode has changed wait for worker and clear pending damage before queuing up new damage, fb width/height might have changed - Increase error counter on bulk transfer failures - Use DRM_MODE_CONNECTOR_USB - Handle R1 kmalloc error (Peter) - Don't try and replicate the USB get descriptor request standard for the display descriptor (Peter) - Make max_buffer_size optional (Peter), drop the pow2 requirement since it's not necessary anymore. - Don't pre-alloc a control request buffer, it was only 4k - Let gud.h describe the whole protocol explicitly and don't let DRM leak into it (Peter) - Drop display mode .hskew and .vscan from the protocol - Shorten names: s/GUD_DRM_/GUD_/ s/gud_drm_/gud_/ (Peter) - Fix gud_pipe_check() connector picking when switching connector - Drop gud_drm_driver_gem_create_object() cached is default now - Retrieve USB device from struct drm_device.dev instead of keeping a pointer - Honour fb->offsets[0] - Fix mode fetching when connector status is forced - Check EDID length reported by the device - Use drm_do_get_edid() so userspace can overrride EDID - Set epoch counter to signal connector status change - gud_drm_driver can be const now v5: - GUD_DRM_FORMAT_R1: Use non-human ascii values (Daniel) - Change name to: GUD USB Display (Thomas, Simon) - Change one __u32 -> __le32 in protocol header - Always log fb flush errors, unless the previous one failed - Run backlight update in a worker to avoid upsetting lockdep (Daniel) - Drop backlight_ops.get_brightness, there's no readback from the device so it doesn't really add anything. - Set dma mask, needed by dma-buf importers v6: - Use obj-y in Makefile (Peter) - Fix missing le32_to_cpu() when using GUD_DISPLAY_MAGIC (Peter) - Set initial brightness on backlight device v7: - LZ4_compress_default() can return zero, check for that - Fix memory leak in gud_pipe_check() error path (Peter) - Improve debug and error messages (Peter) - Don't pass length in protocol structs (Peter) - Pass USB interface to gud_usb_control_msg() et al. (Peter) - Improve gud_connector_fill_properties() (Peter) - Add GUD_PIXEL_FORMAT_RGB111 (Peter) - Remove GUD_REQ_SET_VERSION (Peter) - Fix DRM_IOCTL_MODE_OBJ_SETPROPERTY and the rotation property - Fix dma-buf import (Thomas) v8: - Forgot to filter RGB111 from reaching userspace - Handle a device that only returns unknown device properties (Peter) - s/GUD_PIXEL_FORMAT_RGB111/GUD_PIXEL_FORMAT_XRGB1111/ (Peter) - Fix R1 and XRGB1111 format conversion - Add FIXME about Big Endian being broken (Peter, Ilia) Cc: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: Peter Stuge <peter@stuge.se> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-4-noralf@tronnes.org [ backport changes: - Remove include drm_gem_atomic_helper.h - s/drm_gem_simple_display_pipe_prepare_fb/drm_gem_fb_simple_display_pipe_prepare_fb/ - Remove const from gud_drm_driver - Change drm_gem_shmem_{vmap,vunmap} signatures - Add gud_gem_create_object() to get cached memory mapping. ] Signed-off-by: Noralf Trønnes <noralf@tronnes.org> 27 July 2021, 16:45:12 UTC
6df6598 drm/uapi: Add USB connector type [ Upstream commit 757e26712337be6be70f7405c38cc0639957eedc ] Add a connector type for USB connected display panels. Some examples of what current userspace will name the connector: - Weston: "UNNAMED-%d" - Mutter: "Unknown20-%d" - X: "Unknown20-%d" v2: - Update drm_connector_enum_list - Add examples to commit message Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-2-noralf@tronnes.org 27 July 2021, 16:45:12 UTC
2aafecf media: i2c: imx477: Fix framerates for 1332x990 mode The imx477 driver's line length for this mode had not been updated to the value supplied to us by the sensor manufacturer. With this correction the sensor delivers the framerates that are expected. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> 27 July 2021, 16:45:12 UTC
68ef9b1 ARM: dts: bcm2711: Tidy the HDMI I2C aliases The bcm2711 vc3-kms-v3d overlay enables the I2C instances used for EDID data. Give these distinct I2C interface numbers (20 & 21) to clearly separate them from other regular I2C blocks (1, 3-6) and the mux on I2C0 (10+). The 2711 DTS tree no longer includes i2c2, so the explicit deletion can be removed. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:45:12 UTC
a2a29bc configs: Add SND_SOC_WM8960=m Enable the WM8960 driver module, as used by the wm8960-soundcard overlay. See: https://github.com/raspberrypi/linux/issues/4454 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:45:12 UTC
ad82df5 drm/vc4: Fix typo when getting firmware node Signed-off-by: Dom Cobley <popcornmix@gmail.com> 27 July 2021, 16:45:11 UTC
7d89c9d drm/vc4: Refactor mode checking logic Replace drm_encoder_helper_funcs::atomic_check with drm_connector_helper_funcs::atomic_check - the former is not called during drm_mode_obj_set_property_ioctl(). Set crtc_state->mode_changed if TV norm changes even without explicit mode change. This makes things like "xrandr --output Composite-1 --set mode PAL-M" work properly. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
2c530cb drm/vc4: Allow setting the TV norm via module parameter Similar to the ch7006 and nouveau drivers, introduce a "tv_mode" module parameter that allow setting the TV norm by specifying vc4.tv_norm= on the kernel command line. If that is not specified, try inferring one of the most popular norms (PAL or NTSC) from the video mode specified on the command line. On Raspberry Pis, this causes the most common cases of the sdtv_mode setting in config.txt to be respected. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
1f18c29 drm/vc4: Add support for more analog TV standards Add support for the following composite output modes (all of them are somewhat more obscure than the previously defined ones): - NTSC_443 - NTSC-style signal with the chroma subcarrier shifted to 4.43361875 MHz (the PAL subcarrier frequency). Never used for broadcasting, but sometimes used as a hack to play NTSC content in PAL regions (e.g. on VCRs). - PAL_N - PAL with alternative chroma subcarrier frequency, 3.58205625 MHz. Used as a broadcast standard in Argentina, Paraguay and Uruguay to fit 576i50 with colour in 6 MHz channel raster. - PAL60 - 480i60 signal with PAL-style color at normal European PAL frequency. Another non-standard, non-broadcast mode, used in similar contexts as NTSC_443. Some displays support one but not the other. - SECAM - French frequency-modulated analog color standard; also have been broadcast in Eastern Europe and various parts of Africa and Asia. Uses the same 576i50 timings as PAL. Also added some comments explaining color subcarrier frequency registers. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
2a97b30 drm/vc4: Fix definition of PAL-M mode PAL-M is a Brazilian analog TV standard that uses a PAL-style chroma subcarrier at 3.575611[888111] MHz on top of 525-line (480i60) timings. This commit makes the driver actually use the proper VEC preset for this mode instead of just changing PAL subcarrier frequency. DRM mode constant names have also been changed, as they no longer correspond to the "NTSC" or "PAL" terms. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
1dd3c5c drm/vc4: Refactor VEC TV mode setting Change the mode_set function pointer logic to declarative config0, config1 and custom_freq fields, to make TV mode setting logic more concise and uniform. Additionally, remove the superfluous tv_mode field, which was redundant with the mode field in struct drm_tv_connector_state. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
530db84 drm/vc4: Fix timings for VEC modes This commit fixes vertical timings of the VEC (composite output) modes to accurately represent the 525-line ("NTSC") and 625-line ("PAL") ITU-R standards. Previous timings were actually defined as 502 and 601 lines, resulting in non-standard 62.69 Hz and 52 Hz signals being generated, respectively. Changes to vc4_crtc.c have also been made, to make the PixelValve vertical timings accurately correspond to the DRM modeline in interlaced modes. The resulting VERTA/VERTB register values have been verified against the reference values set by the Raspberry Pi firmware. Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> 27 July 2021, 16:45:11 UTC
0bf2d65 overlays: Add overlay for Si446x Transceiver SPI See: https://github.com/raspberrypi/linux/pull/4430 Signed-off-by: Sunip K. Mukherjee <sunipkmukherjee@gmail.com> 27 July 2021, 16:45:11 UTC
53183da ARM: dts: bcm2711: fold in the correct interrupt The new vec node in bcm2711.dtsi should have the correct interrupt number to start with, rather than include the bcm283x version and patch it later. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:45:11 UTC
ca5c766 ydrm/vc4: fkms: Fix margin calculations for the right/bottom edges The calculations clipped the right/bottom edge of the clipped range based on the left/top margins. https://github.com/raspberrypi/linux/issues/4447 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 27 July 2021, 16:45:11 UTC
8a52d80 drm/vc4: Fix margin calculations for the right/bottom edges The calculations clipped the right/bottom edge of the clipped range based on the left/top margins. Fixes: 666e73587f90 ("drm/vc4: Take margin setup into account when updating planes") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 27 July 2021, 16:45:11 UTC
29d034e configs: Add KEYBOARD_CAP11XX=m See: https://github.com/raspberrypi/linux/pull/4442 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:45:11 UTC
80938e1 overlays: Add overlay for cap1106 capacitive touch sensor Signed-off-by: Jesse Taube <mr.bossman075@gmail.com> 27 July 2021, 16:45:10 UTC
065fe8f overlays: Add overlay for Chipdip I2S master DAC Signed-off-by: Evgenij Sapunov <evgenij.sapunov@chipdip.ru> 27 July 2021, 16:45:10 UTC
7ca28de media: bcm2835-unicam: Forward input status from subdevice The vidioc_enum_input() v4l2 ioctl is capable of returning sensor/input status as well. This is used in current GStreamer HEAD for signal detection [1]. bcm2835-unicam does handle this syscall, but it didn't ask the subdevice driver about the input status. The input then appeared as always present. This commit adds the necessary query. There is a precedent for this - the R-Car VIN V4L2 driver does a similar call [2]. [1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/ce0be27caf69aa9d96b73bc2b50737451b6f6936/sys/v4l2/gstv4l2src.c#L553 [2]: https://github.com/raspberrypi/linux/blob/7fb9d006d3ff3baf2e205e0c85c4e4fd0a64fcd0/drivers/media/platform/rcar-vin/rcar-v4l2.c#L548 Signed-off-by: Jakub Vaněk <linuxtardis@gmail.com> 27 July 2021, 16:45:10 UTC
dcc11d3 bcm2711_thermal: Don't clamp temperature at zero The temperature sensor is valid below zero and the linux framework is happy with it. See: https://www.raspberrypi.org/forums/viewtopic.php?f=98&t=315382 Signed-off-by: Dom Cobley <popcornmix@gmail.com> 27 July 2021, 16:45:10 UTC
2ff7512 drm/vc4: hdmi: Only call into DRM framework if registered Our hotplug handler will currently call the drm_kms_helper_hotplug_event every time a hotplug interrupt is called. However, since the device is registered after all the drivers have finished their bind callback, we have a window between when we install our interrupt handler and when drm_dev_register() is eventually called where our handler can run and call drm_kms_helper_hotplug_event but the device hasn't been registered yet, causing a null pointer dereference. Fix this by making sure we only call drm_kms_helper_hotplug_event if our device has been properly registered. Fixes: f4790083c7c2 ("drm/vc4: hdmi: Rely on interrupts to handle hotplug") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 27 July 2021, 16:45:10 UTC
927bc6f drm/vc4: hdmi: Drop devm interrupt handler for hotplug interrupts The hotplugs interrupt handlers are registered through the devm_request_threaded_irq function. However, while free_irq is indeed called properly when the device is unbound or bind fails, it's called after unbind or bind is done. In our particular case, it means that on failure it creates a window where our interrupt handler can be called, but we're freeing every resource (CEC adapter, DRM objects, etc.) it might need. In order to address this, let's switch to the non-devm variant to control better when the handler will be unregistered and allow us to make it safe. Fixes: f4790083c7c2 ("drm/vc4: hdmi: Rely on interrupts to handle hotplug") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 27 July 2021, 16:45:10 UTC
4fca264 drm/vc4: hdmi: Drop devm interrupt handler for CEC interrupts The CEC interrupt handlers are registered through the devm_request_threaded_irq function. However, while free_irq is indeed called properly when the device is unbound or bind fails, it's called after unbind or bind is done. In our particular case, it means that on failure it creates a window where our interrupt handler can be called, but we're freeing every resource (CEC adapter, DRM objects, etc.) it might need. In order to address this, let's switch to the non-devm variant to control better when the handler will be unregistered and allow us to make it safe. Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 27 July 2021, 16:45:10 UTC
c582897 dwc_otg: Update NetBSD usb.h header licence NetBSD have changed their licensing requirements such that the 2-clause licence is preferred. Update usb.h in the downstream dwc_otg code accordingly. See https://www.netbsd.org/about/redistribution.html for more information. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 27 July 2021, 16:45:10 UTC
fdd95b1 vc4/drv: Only notify firmware of display done with kms fkms driver still wants firmware display to be active Signed-off-by: Dom Cobley <popcornmix@gmail.com> 27 July 2021, 16:45:10 UTC
back to top