https://github.com/raspberrypi/linux

sort by:
Revision Author Date Message Commit Date
ec4cbb9 Revert "Revert "drm/fourcc: Add packed 10bit YUV 4:2:0 format"" This reverts commit b8e4604912994d44537516b2519085ae841fd388. 18 January 2023, 19:54:36 UTC
374925c overlays: i2c-sensor: Add mpu6050 and mpu9250 Add support for the MPU6050 and MPU9250 IMU sensors to the i2c-sensor container overlay. At the same time, deprecate the standalone mpu6050 overlay, but keep it around for now. (Also fix a few typos spotted while editing) See: https://github.com/raspberrypi/linux/issues/5325 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 17 January 2023, 17:16:43 UTC
8a31b0e .github/workflows: Set warnings-as-errors for builds To avoid code with build warnings being introduced into the tree, force CONFIG_WERROR=y in the build workflow. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 17 January 2023, 17:16:22 UTC
b8e4604 Revert "drm/fourcc: Add packed 10bit YUV 4:2:0 format" This reverts commit 5cdee934f5b921d11abd1ccf3595873b5d705dc0. 17 January 2023, 17:16:22 UTC
da78d0b bcm2835-mmc: Honor return value of mmc_of_parse() bcm2835_mmc_probe() ignores errors returned by mmc_of_parse() and in particular ignores -EPROBE_DEFER, which may be returned if the power sequencing driver configured in the devicetree is compiled as a module. The user-visible result is that access to the SDIO device fails because its power sequencing requirements have not been observed. Fix it. Signed-off-by: Lukas Wunner <lukas@wunner.de> 16 January 2023, 09:18:55 UTC
c7a679b drm/vc4: hdmi: Add property to allow manual config of RGB or YCbCr Add a custom property "Output format" that allows the overriding of the default colourspace choice in the way that the old firmware hdmi_pixel_encoding property did. If the chosen format is not supported, then it will still drop back to the older behaviour. This won't be acceptable to upstream, but it adds back the missing functionality of hdmi_pixel_encoding. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 13 January 2023, 11:12:21 UTC
bcc6e13 drm/vc4: hdmi: Correct CSC setup for YCbCr4:4:4 The CSC requires the coefficients to be swapped around for 4:4:4 mode, but the swap was incorrectly defined. Correct the swap. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 13 January 2023, 11:11:37 UTC
881932a drm/vc4: bo: Fix drmm_mutex_init memory hog Commit 374146cad469 ("drm/vc4: Switch to drmm_mutex_init") converted, among other functions, vc4_create_object() to use drmm_mutex_init(). However, that function is used to allocate a BO, and therefore the mutex needs to be freed much sooner than when the DRM device is removed from the system. For each buffer allocation we thus end up allocating a small structure as part of the DRM-managed mechanism that is never freed, eventually leading us to no longer having any free memory anymore. Let's switch back to mutex_init/mutex_destroy to deal with it properly. Fixes: 374146cad469 ("drm/vc4: Switch to drmm_mutex_init") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:12 UTC
922662e drm_probe_helper: Cancel previous job before starting new one Currently we schedule a call to output_poll_execute from drm_kms_helper_poll_enable for 10s in future. Later we try to replace that in drm_helper_probe_single_connector_modes with a 0s schedule with delayed_event set. But as there is already a job in the queue this fails, and the immediate job we wanted with delayed_event set doesn't occur until 10s later. And that call acts as if connector state has changed, reprobing modes. This has a side effect of waking up a display that has been blanked. Make sure we cancel the old job before submitting the immediate one. Signed-off-by: Dom Cobley <popcornmix@gmail.com> 12 January 2023, 14:21:12 UTC
720919f configs: Add DM_MULTIPATH=m "Allow volume managers to support multipath hardware." See: https://github.com/raspberrypi/linux/issues/4886 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:12 UTC
b2c1156 drivers: media: i2c: imx708: Fix crop information The 1536x864 mode contained incorrect crop information. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> 12 January 2023, 14:21:12 UTC
c2a710f drivers: media: imx708: Enable long exposure mode Enable long exposure modes by using the long exposure shift register setting in the imx708 sensor. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> 12 January 2023, 14:21:12 UTC
73f48bb configs: Enable the MS5637 temp + pressure driver Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:12 UTC
cc249dd overlays: i2c-sensor: MS temp & pressure sensors Add support for the Measurement Specialities temperature and pressure sensors to the i2c-sensor overlay. The supported devices are MS5637, MS5803, MS5805, MS5837 and MS8607. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:12 UTC
e62df89 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> 12 January 2023, 14:21:12 UTC
b320043 dtoverlays: Add overlays for the IMX708 image sensor New overlay to support the Sony IMX708 image sensor. This includes a VCM for lens control. Also adds support to the camera mux overlays. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
15ed03b defconfigs: Add IMX708 to all Pi defconfigs Adds the IMX708 image sensor driver to the defconfigs. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
93f7e80 media/i2c: Add a driver for the Sony IMX708 image sensor The imx708 is a 12MP MIPI sensor with a 16:9 aspect ratio, here using two CSI-2 lanes. It is a "quad Bayer" sensor with all 3 modes offering 10-bit output: 12MP: 4608x2592 up to 14.35fps (full FoV) 1080p: 2304x1296 up to 56.02fps (full FoV) 720p: 1536x864 up to 120.12fps (cropped) This imx708 sensor driver is based heavily on the imx477 driver and has been tested on the Raspberry Pi platform using libcamera. Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
908c0d9 dtbindings: media: i2c: Add IMX708 CMOS sensor binding Add YAML devicetree binding for IMX708 CMOS image sensor. Let's also add a MAINTAINERS entry for the binding and driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
468d689 media: dw9807-vcm: Smooth the first user movement of the lens The power up/down sequence is already ramped. Extend this to the first user movement as well, as this will generally avoid the "tick" noises due to rapid movements and overshooting. Subsequent movements are generally smaller and so don't cause issues. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
fa6d1c8 media: dw9807-vcm: Add regulator support to the driver Uses the regulator notifier framework so that the current focus position will be restored whenever any user of the regulator powers it up. This means that should the VCM and sensor share a common regulator then starting the sensor will automatically restore the default position. If they have independent regulators then it will behave be powered up when the VCM subdev is opened. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
3346d9d media: dt-bindings: Add regulator to dw9807-vcm The VCM driver will often be controlled via a regulator, therefore add in the relevant DT hooks. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
cc5c4b9 media: dw9807-vcm: Add support for DW9817 bidirectional VCM driver The DW9817 is effectively the same as DW9807 from a programming interface, however it drives +/-100mA instead of 0-100mA. This means that the power on ramp needs to take the lens from the midpoint, and power off return it there. It also changes the default position for the module. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
a3e4ce8 media: dt-bindings: Add DW9817 to DW9807 binding The DW9817 is programmatically the same as DW9807, but the output drive is a bi-directional -100 to +100mA instead of 0-100mA. Add the appropriate compativle string. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
8ded74b overlays: audremap: Fix setting of the pin function The brcm,function property must be set in the overlay fragment too - otherwise the parametrization won't work. At least that's the case for bcm2711-rpi-cm4.dts which starts with empty properties: &gpio { audio_pins: audio_pins { brcm,pins = <>; brcm,function = <>; }; }; This was broken since a56df85d2f42fd461fdc05f33617141aca5ba465. Signed-off-by: Krzysztof Kotlenga <k.kotlenga@sims.pl> 12 January 2023, 14:21:11 UTC
c3b35f5 drm/vc4: Fix YUV plane handling when planes are in different buffers YUV images can either be presented as one allocation with offsets for the different planes, or multiple allocations with 0 offsets. The driver only ever calls drm_fb_[dma|cma]_get_gem_obj with plane index 0, therefore any application using the second approach was incorrectly rendered. Correctly determine the address for each plane, removing the assumption that the base address is the same for each. Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:11 UTC
5353907 configs: Enable PWM drivers Add CONFIG_PWM, which now predicates the PWM drivers. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:11 UTC
1a5dd0f drm/panel: simple: Add Innolux AT056tN53V1 5.6" VGA Add support for the Innolux AT056tN53V1 5.6" VGA (640x480) TFT LCD panel. Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com> Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:10 UTC
7a67c77 xhci: constrain XHCI_VLI_HUB_TT_QUIRK to old firmware versions VLI have a firmware update for the VL805 which resolves the incorrect frame time calculation in the hub's TT. Limit applying the quirk to known-bad firmwares. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:10 UTC
a0a69c4 overlays: Add disable-emmc2 Add a new overlay that disables the EMMC2 controller on BCM2711. This can be useful on a Compute Module 4 if the onboard EMMC2 storage is unreliable and the system can be booted by other means e.g Network / USB. Signed-off-by: Tim Gover <tim.gover@raspberrypi.com> 12 January 2023, 14:21:10 UTC
fa47f42 dt: Add camX_reg and camX_reg_gpio overrides to CM4S CM4S follows the pattern of CM1&3 for routing camera GPIO control, but didn't have the overrides defined to allow enabling and configuring the camera regulator GPIOs. Add them. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:10 UTC
a875082 dt: Add camX_reg_gpio to CM4 To make it easier for custom routing of camera control GPIOs, add the camX_reg_gpio parameter to CM4 DT as well. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:10 UTC
89fe37a dt: Correct cam_reg GPIO assignments for CM1&3. The standard instructions for wiring up cameras on CM1&3 assign GPIOs for both the shutdown and LED pins on the camera connectors. The assignment in DT matched the LED wiring, not the shutdown line, so didn't control the camera power correctly. Update the base DT accordingly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:10 UTC
f6e7d64 dtoverlays: Add overlay cm-swap-i2c0 to swap buses on i2c0mux The legacy camera stack wiring instructions connect the cameras to the opposite sets of GPIOs compared to the arrangement more normally used with libcamera on all other platforms. Add an overlay to allow easy swapping of the assignments so that the legacy wiring can be used with libcamera. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:10 UTC
eec3e66 dts: bcm2711: Add 'eee' dtparam The 'eee' dtparam allows EEE to be disabled on the onboard Ethernet controller. Adding 'dtparam=eee=off' to config.txt causes 'genet.eee=N' to be added to the kernel command line, which in turn tells the Genet driver to disable EEE. See: https://github.com/raspberrypi/linux/issues/4289 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:10 UTC
ea36634 net: bcmgenet: Add 'eee' module parameter On some switches, having EEE enabled causes the link to become unstable. With this patch, adding 'genet.eee=N' to the kernel command line will cause EEE to be disabled on the link. See: https://github.com/raspberrypi/linux/issues/4289 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:10 UTC
1d84dd7 vc4_crtc: Increase setup cost in core clock calculation to handle extreme reduced blanking See: https://github.com/raspberrypi/linux/issues/4446 The formula that determines the core clock requirement based on pixel clock and blanking has been determined experimentally to minimise the clock while supporting all modes we've seen. A new reduced blanking mode (4kp60 at 533MHz rather than the standard 594MHz) has been seen that doesn't produce a high enough clock and results in "flip_done timed out" error. Increase the setup cost in the formula to make this work. The result is a reduced blanking mode increases by up to 7MHz while leaving the standard timing mode untouched Signed-off-by: Dom Cobley <popcornmix@gmail.com> 12 January 2023, 14:21:10 UTC
7bb7b57 configs: Add 8DEV USB2CAN driver support See: https://github.com/raspberrypi/linux/pull/5273 Requested-by: lihgong <lihgong@gmail.com> Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:10 UTC
0288e12 overlays: Add crystalfontz-cfa050_pi_m Add support for the Crystalfontz CFA050-PI-M series of Raspberry Pi CM4-based modules using the CFAF7201280A0_050Tx TFT LCD displays. Signed-off-by: Mark Williams <mwp@mwp.id.au> 12 January 2023, 14:21:09 UTC
cb1f846 configs: Enable LM3630A backlight module Added LM3630A module to defconfig to support Crystalfontz CFA050-PI-M. Signed-off-by: Mark Williams <mwp@mwp.id.au> 12 January 2023, 14:21:09 UTC
8313b30 drm/panel: panel-ilitek9881c: Crystalfontz support Add support for Crystalfontz CFAF7201280A0-050Tx panel. Signed-off-by: Mark Williams <mwp@mwp.id.au> 12 January 2023, 14:21:09 UTC
404d559 drm/panel: panel-ilitek9881c: Use cansleep methods Use cansleep version of gpiod_set_value so external IO drivers (like via I2C) can be used. Signed-off-by: Mark Williams <mwp@mwp.id.au> 12 January 2023, 14:21:09 UTC
1046c7c README: Add README.md with CI kernel build status tags This is a copy of README with the tags added. You can not delete the file README as then checkpatch complains you aren't in a kernel tree. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:09 UTC
77972ef .github/workflows: Create workflow to CI kernel builds Builds the bcmrpi, bcm2709, bcm2711, and bcm2835 32 bit kernels, and defconfig and bcm2711 64bit kernels, saving the artifacts for 7 days. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:09 UTC
926b76e .github/workflows: Add dtoverlaycheck workflow Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:09 UTC
7ba14e3 vc4_hdmi: Avoid log spam for audio start failure We regularly get dmesg error reports of: [ 18.184066] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 18.184098] MAI: soc_pcm_open() failed (-19) Currently I get 30 of these when booting to desktop. We always say, ignore they are harmless, but removing them would be good. A bit of investigation shows, for me, the errors are all generated by second, unused hdmi interface. It shows as an alsa device, and pulseaudio attempts to open it (numerous times), generating a kernel error message each time. systemctl --user restart pulseaudio.service generates 6 additional error messages. The error messages all come through: https://github.com/raspberrypi/linux/blob/a009a9c0d79dfec114ee5102ec3d3325a172c952/sound/soc/soc-pcm.c#L39 which suggests returning ENOTSUPP, rather that ENODEV will be quiet. And indeed it is. Note: earlier kernels do not have the quiet ENOTSUPP, so additional cherry-picks will be needed to backport Signed-off-by: Dom Cobley <popcornmix@gmail.com> 12 January 2023, 14:21:09 UTC
63bca3c ASoC: soc-pcm.c: add soc_pcm_ret() Commmit 041107289c5cebb0693a55c432ab50862a450476 upstream. Current soc-pcm.c has many similar code for error case. This patch adds soc_pcm_ret() and share the code and error message. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r10y4dzb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> 12 January 2023, 14:21:09 UTC
919ad9b media: i2c: ov7251: Add module param to select ext trig mode As there isn't currently a defined mechanism for selecting an external trigger mode on image sensors, copy the imx477 approach of using a module parameter to enable ext trig. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> 12 January 2023, 14:21:09 UTC
f1d50ec usb: xhci: add XHCI_VLI_HUB_TT_QUIRK The integrated USB2.0 hub in the VL805 chipset has a bug where it incorrectly determines the remaining available frame time before the host next sends a SOF packet with an incremented frame_number. See the USB2.0 specification sections 11.3 and 11.14.2.3. The hub's non-periodic TT handler can transmit the IN/OUT handshake token too late, so a following 64-byte DATA0/1 packet causes the ACK handshake to collide with the propagated SOF. This causes port babble. Avoid ringing doorbells for vulnerable endpoints during uFrame 7 if the TR is Idle to stop one source of babble. An IN transfer for a Running TR may happen at any time, so there's not much we can do about that. Ideally a hub firmware update to properly implement frame timeouts is needed, and to avoid spinning for up to 125us when submitting TDs to Idle rings. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:09 UTC
a355f6f configs: Enable Twofish crypto See: https://github.com/raspberrypi/linux/issues/5258 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:09 UTC
ed2bfdd overlays: Mention Digi2 Pro audio card in README https://www.hifiberry.com/blog/the-new-digi2-pro/ 12 January 2023, 14:21:08 UTC
e60a55f overlays: i2c-sensor: Make smbus-timeout-disable optional Although disabling the SMBUS timeout may be useful, not all chips support it. The driver treats attempting to disable the timeout on a non-supporting chip as an error, so make it an option enabled using the no_timeout parameter. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:08 UTC
c04fc1d overlays: audremap: Include the fsels values Add the alt function selectors, and document that pins_40_45 is not suitable for BCM2711 because the pins are split across the two PWM interfaces. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:08 UTC
b131cda overlays: Add overlay pwm1 pwm1 enables the second PWM interface found on BCM2711. It can only be mapped to GPIOs 40 & 41. See: https://forums.raspberrypi.com/viewtopic.php?t=342458 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:08 UTC
a4ae2af ASoC:ma120x0p: Corrects the volume level display Fixes the wrongly changed 'limiter volume' display back to -50dB minimum and sets the correct minimum volume level to -144dB to be aligned with the controls and display in alsamixer etc. Signed-off-by: Joerg Schambacher <joerg@hifiberry.com> 12 January 2023, 14:21:08 UTC
1f412b2 imx296-overlay: clock-frequency defaults to 54MHz but can be overridden Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> 12 January 2023, 14:21:08 UTC
9d949bc 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> 12 January 2023, 14:21:08 UTC
8f4b403 media: adv7180: Nasty hack to allow input selection. Whilst the adv7180 driver support s_routing, nothing else does, and there is a missing lump of framework code to define the mapping from connectors on a board to the inputs they represent on the ADV7180. Add a nasty hack to take a module parameter that is passed in to s_routing on any call to G_STD, or S_STD (or subdev g_input_status call). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> 12 January 2023, 14:21:08 UTC
aa39fc9 overlays: Extend audremap to supports other pins Add the parameters pins_40_41 and pins_40_45 to support other audio pin options. Also, simplify the overlay using literal assignments. Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:08 UTC
de0ca5a overlays: i2c-sensor: Add the jc42 class of sensor This is a second attempt to solve issue 5234, since it turns out that the mcp980x driver only supports MCP9800-MCP9803. MCP9804, MCP9805 and MCP9808 require the jc42 driver. See: https://github.com/raspberrypi/linux/issues/5234 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:08 UTC
61160e7 drm/vc4_hdmi: Allow hotplug detect to be forced See: https://forum.libreelec.tv/thread/24783-tv-avr-turns-back-on-right-after-turning-them-off While the kernel provides a :D flag for assuming device is connected, it doesn't stop this function from being called and generating a cec_phys_addr_invalidate message when hotplug is deasserted. That message provokes a flurry of CEC messages which for many users results in the TV switching back on again and it's very hard to get it to stay switched off. It seems to only occur with an AVR and TV connected but has been observed across a number of manufacturers. The issue started with https://github.com/raspberrypi/linux/pull/4371 and this provides an optional way of getting back the old behaviour Signed-off-by: Dom Cobley <popcornmix@gmail.com> 12 January 2023, 14:21:08 UTC
a076058 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> 12 January 2023, 14:21:07 UTC
d8bf24d Revert "clk: tests: Add some tests for clk_get_rate_range()" This reverts commit 4773156488c968530523b1f040ddace243aa3ba4. 12 January 2023, 14:21:07 UTC
250b1af drm/vc4: hdmi: Add more checks for 4k resolutions At least the 4096x2160@60Hz mode requires some overclocking that isn't available by default, even if hdmi_enable_4kp60 is enabled. Let's add some logic to detect whether we can satisfy the core clock requirements for that mode, and prevent it from being used otherwise. Signed-off-by: Dom Cobley <popcornmix@gmail.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
9260764 drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code In order to support higher HDMI frequencies, users have to set the hdmi_enable_4kp60 parameter in their config.txt file. This will have the side-effect of raising the maximum of the core clock, tied to the HVS, and managed by the HVS driver. However, we are querying this in the HDMI driver by poking into the HVS structure to get our struct clk handle. Let's make this part of the HVS bind implementation to have all the core clock related setup in the same place. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
180843d drm/vc4: hdmi: Fix hdmi_enable_4kp60 detection In order to support higher HDMI frequencies, users have to set the hdmi_enable_4kp60 parameter in their config.txt file. We were detecting this so far by calling clk_round_rate() on the core clock with the frequency we're supposed to run at when one of those modes is enabled. Whether or not the parameter was enabled could then be inferred by the returned rate since the maximum clock rate reported by the firmware was one of the side effect of setting that parameter. However, the recent clock rework we did changed what clk_round_rate() was returning to always return the minimum allowed, and thus this test wasn't reliable anymore. Let's use the new clk_get_max_rate() function to reliably determine the maximum rate allowed on that clock and fix the 4k@60Hz output. Fixes: e9d6cea2af1c ("clk: bcm: rpi: Run some clocks at the minimum rate allowed") Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
0983030 rpivid: Convert to new clock rate API Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
819ff69 drm/v3d: Convert to new clock range API Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
081063e firmware: raspberrypi: Provide a helper to query a clock max rate The firmware allows to query for its clocks the operating range of a given clock. We'll need this for some drivers (KMS, in particular) to infer the state of some configuration options, so let's create a function to do so. Acked-by: Stephen Boyd <sboyd@kernel.org> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
a93e69f firmware: raspberrypi: Move the clock IDs to the firmware header We'll need the clock IDs in more drivers than just the clock driver from now on, so let's move them in the firmware header. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
38de0be firmware: raspberrypi: Introduce rpi_firmware_find_node() A significant number of RaspberryPi drivers using the firmware don't have a phandle to it, so end up scanning the device tree to find a node with the firmware compatible. That code is duplicated everywhere, so let's introduce a helper instead. Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v4-1-a1b40526df3e@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:07 UTC
dc25c48 Revert "clk: bcm: rpi: Add a function to retrieve the maximum" This reverts commit 9797a76fd23c62d4026dba8512ddc13bf6c56235. 12 January 2023, 14:21:07 UTC
2c6ef45 Revert "clk: bcm: rpi: Add a function to retrieve the minimum" This reverts commit 367f51f52986a9bf846e5c248b2139d1ef9a8c66. 12 January 2023, 14:21:06 UTC
86ceddf Revert "drm/vc4: Make sure we don't end up with a core clock too high" This reverts commit 1980148e56124d83812671f239dd52687eba2e8f. 12 January 2023, 14:21:06 UTC
e61c07f Revert "drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection" This reverts commit 1f742ad86539135d7caceaeb9b01034053cf861e. 12 January 2023, 14:21:06 UTC
73ba066 Revert "kms/vc4_hdmi: Refuse 4096x2160@60 hdmi modes" This reverts commit 5b17013fbb764dc34f7b730c3e7794e5a54b3a17. 12 January 2023, 14:21:06 UTC
a244ae9 overlays: pisound: Make button pins owned by card The pisound overlay claims a number of GPIOs using a pinctrl node, but for some reason hangs this claim on the main gpio node. This obscures the ownership of the pins (as shown by gpioinfo and in the kernel logs) and isn't scalable - only one overlay can use the trick at a time. Change the overlay to make the pin ownership clear and avoid any future conflicts, removing a bogus claim on pins_spi0 at the same time. See: https://github.com/raspberrypi/linux/issues/5235 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:06 UTC
2a19f2e drm/connector: Set DDC pointer in drmm_connector_init Commit 35a3b82f1bdd ("drm/connector: Introduce drmm_connector_init") introduced the function drmm_connector_init() with a parameter for an optional ddc pointer to the i2c controller used to access the DDC bus. However, the underlying call to __drm_connector_init() was always setting it to NULL instead of passing the ddc argument around. This resulted in unexpected null pointer dereference on platforms expecting to get a DDC controller. Fixes: 35a3b82f1bdd ("drm/connector: Introduce drmm_connector_init") Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:06 UTC
d6ba780 overlays: i2c-sensor: Add mcp980x support See: https://github.com/raspberrypi/linux/issues/5234 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:06 UTC
094bcc7 drivers: dwc_otg: stop GCC from patching FIQ functions Configuring GCC to use task stack protector canaries means it will insert calls to check functions in FIQ code. This is bad, as a) the FIQ's stack is banked and b) the failure invokes __stack_chk_fail which eventually tries to call printk(). Printing to the console inside the FIQ is generally fatal. Add CFLAGS to stop this happening in FIQ code. Also catch one function where notrace wasn't specified. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:06 UTC
cbf5a57 overlays: Add README entry for i2c-rtc,rv3032 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:06 UTC
493ba91 overlays: Add i2c-sensor support for AHT10 Add support for the Aosong AHT10 temperature and humidity sensor. See: https://github.com/raspberrypi/linux/issues/5222 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:06 UTC
4c898d0 configs: Enable the AHT10 sensor driver module Add support for the Aosong AHT10 temperature and humidity sensor. See: https://github.com/raspberrypi/linux/issues/5222 Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:06 UTC
134c6d5 drivers/gpu/drm/vc4: Add missing 32-bit RGB formats The missing 32-bit per pixel ABGR and various "RGB with an X value" formats are added. Change sent by Dave Stevenson. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> 12 January 2023, 14:21:05 UTC
b19dacd drivers: usb: dwc_otg: fix reference passing when checking bandwidth The pointer (struct usb_host_endpoint *)->hcpriv should contain a reference to dwc_otg_qh_t if the driver has already seen a URB submitted to this endpoint. It then checks whether the qh exists and is already in a schedule in order to decide whether to allocate periodic bandwidth or not. Passing a pointer to an offset inside of struct usb_host_endpoint instead of just the pointer means it dereferences bogus addresses. Rationalise (delete) a variable while we're at it. See https://github.com/raspberrypi/linux/issues/5189 Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:05 UTC
008dc06 nvmem: Use NVMEM_DEVID_AUTO It is reasonable to declare multiple nvmem blocks. Unless a unique 'id' is passed in for each block there may be name clashes. Avoid this by using the magic token NVMEM_DEVID_AUTO. Fixes: 5a3fa75a4d9cb ("nvmem: Add driver to expose reserved memory as nvmem") Signed-off-by: Phil Elwell <phil@raspberrypi.com> 12 January 2023, 14:21:05 UTC
666b263 usb: xhci: account for num_trbs_free when invalidating TDs If a ring has a number of TDs enqueued past the dequeue pointer, and the URBs corresponding to these TDs are dequeued, then num_trbs_free isn't updated to show that these TDs have been converted to no-ops and effectively "freed". This means that num_trbs_free creeps downwards until the count is exhausted, which then triggers xhci_ring_expansion() and effectively leaks memory by infinitely growing the transfer ring. This is commonly encounted through the use of a usb-serial port where the port is repeatedly opened, read, then closed. Move the num_trbs_free crediting out of the Set TR Dequeue Pointer handling and into xhci_invalidate_cancelled_tds(). There is a potential for overestimating the actual space on the ring if the ring is nearly full and TDs are arbitrarily enqueued by a device driver while it is dequeueing them, but dequeues are usually batched during device close/shutdown or endpoint error recovery. See https://github.com/raspberrypi/linux/issues/5088 Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:05 UTC
6aca9dc drm/vc4: hdmi: Reset link on hotplug During a hotplug cycle (such as a TV going out of suspend, or when the cable is disconnected and reconnected), the expectation is that the same state used before the disconnection is reused until the next commit. However, the HDMI scrambling requires that some flags are set in the monitor, and those flags are very likely to be reset when the cable has been disconnected. This will thus result in a blank display, even if the display pipeline configuration hasn't been modified or is in the exact same state. The solution we've had so far is to enable the scrambling-related bits again on reconnection, but the HDMI 2.0 specification (Section 6.1.3.1 - Scrambling Control) requires that the scrambling enable bit is set before sending any scrambled video signal. Using that solution thus breaks that expectation. The solution used by i915 is to do a full modeset on the connector so that we disable the video signal, enable the scrambling bit, and enable the video signal again. As such, we took that code and plugged it into vc4. It probably could have been turned into an helper, but it proved to be difficult for several reasons: * i915 has fairly different structures than simpler KMS drivers such as vc4, so doing some code that works with both proved to be difficult; * Other simpler drivers could reuse some of it (tegra, dw-hdmi), but it would still require to move some parameters currently stored in private structure that are needed to compute whether the scrambling is needed or not, and then inform the driver that it needs to be enabled. Some of those parameters are already in core structures (drm_display_mode, drm_display_info, bpc), but the output format isnt't. Adding it is fairly challenging since unlike the TMDS char rate or mode, there's no consensus on what format to pick in drivers, so it's not possible to write some generic code that can depend on it. For these reasons, we chose to duplicate the code for now, until someone else really needs it as well, in which case we will be able to convert it into a generic helper. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
8386738 drm/vc4: hdmi: Move vc4_hdmi_supports_scrambling() around We'll need it earlier in the driver, so let's move it next to the other scrambling-related helpers. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
aee2120 drm/vc4: hdmi: Switch to detect_ctx We'll need the locking context in future patch, so let's convert .detect to .detect_ctx. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
69eca17 drm/vc4: hdmi: Simplify the hotplug handling Our detect callback has a bunch of operations to perform depending on the current and last status of the connector, such a setting the CEC physical address or enabling the scrambling again. This is currently dealt with a bunch of if / else statetements that make it fairly difficult to read and extend. Let's move all that logic to a function of its own. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
44efd09 drm/vc4: hdmi: Remove mutex in detect We recently introduced a new mutex to protect concurrent execution of ALSA and KMS hooks, and the concurrent access to some of vc4_hdmi fields. However, using it in the detect hook was creating a reentrency issue with CEC code. Indeed, calling cec_s_phys_addr_from_edid from detect might call the CEC adap_enable hook with the lock held, eventually resulting in a deadlock. Since we didn't really need to protect anything at the moment in the CEC code, the decision was made to ignore the mutex in those CEC hooks, working around the issue. However, we can have the same thing happening if we end up triggering a mode set from the detect callback, for example using drm_atomic_helper_connector_hdmi_reset_link(). Since we don't really need to protect anything in detect either, let's just drop the lock in detect, and add it again in CEC. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
b026cb5 drm/vc4: hdmi: Remove unused argument in vc4_hdmi_supports_scrambling Even though vc4_hdmi_supports_scrambling takes a mode as an argument, it never uses it. Let's remove it. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
fc53cf4 drm/vc4: hdmi: Constify drm_display_mode We don't modify the drm_display_mode pointer we have in the driver in most places, so let's make them const. Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:05 UTC
30e294a usb: xhci: expand mitigations for VLI_SS_BULK_OUT_BUG quirk The VL805 can cause data corruption if a SS Bulk OUT endpoint enters a flow-control condition and there are TRBs in the transfer ring that are not an integral size of wMaxPacket and the endpoint is behind one or more hubs. This is frequently the case encountered when FAT32 filesystems are present on mass-storage devices with cluster sizes of 1 sector, and the filesystem is being written to with an aggregate of small files. The initial implementation of this quirk separated TRBs that didn't adhere to this limitation into two - the first a multiple of wMaxPacket and the second the 512-byte remainder - in an attempt to force TD fragments to align with packet boundaries. This reduced the incidence rate of data corruption but did not resolve it. The fix as recommended by VIA is to disable bursts if this sequence of TRBs can occur. Limit turning off bursts to just USB mass-storage devices by searching the device's configuration for an interface with a class type of USB_CLASS_MASS_STORAGE. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com> 12 January 2023, 14:21:05 UTC
28d4d44 drm/vc4: v3d: Switch to devm_pm_runtime_enable devm_pm_runtime_enable() simplifies the driver a bit since it will call pm_runtime_disable() automatically through a device-managed action. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:04 UTC
d60cd71 drm/vc4: v3d: Rework the runtime_pm setup At bind time, vc4_v3d_bind() will read a register to retrieve the v3d version and make sure it's a version we're compatible with. However, the v3d has an optional clock that is enabled only after the register read-out and a power domain that wasn't enabled at all in the bind implementation. This was working fine at boot because both were enabled, but resulted in the version check failing if we were unbinding and rebinding the driver because the unbinding would have turned them off. The fix isn't as easy as calling pm_runtime_resume_and_get() prior to the register access to power up the power domain though. Indeed, the runtime_resume implementation will enable the clock mentioned above, call vc4_v3d_init_hw() and then vc4_irq_enable(). Prior to the previous patch, vc4_irq_enable() needed to occur after our call to platform_get_irq() and vc4_irq_install(), since vc4_irq_enable() used to call enable_irq() and vc4_irq_install() will call request_irq(). vc4_irq_install() will also do some register access, so needs the power domain to be on. So we ended up in a situation where vc4_v3d_runtime_resume() needed vc4_irq_install() to have been called before, and vc4_irq_install() needed vc4_v3d_runtime_resume(). The previous patch removed the enable_irq() call in vc4_irq_enable() and thus removed the dependency of vc4_v3d_runtime_resume() on vc4_irq_install(). Thus, we can now rework our bind implementation to call pm_runtime_resume_and_get() before our register access to make sure the power domain is on. vc4_v3d_runtime_resume() also takes care of turning the clock on and calling vc4_v3d_init_hw() so we can remove them from bind. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:04 UTC
b150c6f drm/vc4: v3d: Stop disabling interrupts The vc4_irq_disable(), among other things, will call disable_irq() to complete any in-flight interrupts. This requires its counterpart, vc4_irq_enable(), to call enable_irq() which causes issues addressed in a later patch. However, vc4_irq_disable() is called by two callees: vc4_irq_uninstall() and vc4_v3d_runtime_suspend(). vc4_irq_uninstall() also calls free_irq() which already disables the interrupt line. We thus don't require an explicit disable_irq() for that call site. vc4_v3d_runtime_suspend() doesn't have any other code. However, the rest of vc4_irq_disable() masks the interrupts coming from the v3d, so explictly disabling the interrupt line is also redundant. The only thing we really care about is thus to make sure we don't have any handler in-flight, as suggested by the comment. We can thus replace disable_irq() by synchronize_irq(). Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:04 UTC
01a4232 drm/vc4: perfmon: Add missing mutex_destroy vc4_perfmon_open_file() will instantiate a mutex for that file instance, but we never call mutex_destroy () in vc4_perfmon_close_file(). Let's add that missing call. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:04 UTC
3460c60 drm/vc4: Switch to drmm_mutex_init mutex_init is supposed to be balanced by a call to mutex_destroy that we were never doing in the vc4 driver. Since a DRM-managed mutex_init variant has been introduced, let's just switch to it. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> 12 January 2023, 14:21:04 UTC
back to top