- Oct 09, 2023
-
-
John Cox authored
In order to use iommu on hevc set dma mask_and_coherent in probe. I am assured dma_set_mask_and_coherent is benign on Pi4 (which has no iommu) and it seems to be so in practice. Also adds a bit of debug to make internal buffer allocation failure easier to spot in future Signed-off-by: John Cox <jc@kynesim.co.uk>
-
- Oct 08, 2023
-
-
Phil Elwell authored
Forcing a gpiochip to have a fixed base number now leads to a warning message. Remove the need to do so by calculating hwirq numbers based on bank numbers. Signed-off-by: Phil Elwell <phil@raspberrypi.com> Fixes: 3b0213d5 ("gpio: Add GPIO support for Broadcom STB SoCs")
-
- Oct 06, 2023
-
-
Phil Elwell authored
While the Pi 5 work was on a branch, some config settings were added to the Pi 4 defconfig that should also have been added for Pi 5. Add them now. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
- Oct 05, 2023
-
-
Dom Cobley authored
-
Dom Cobley authored
Since "drm/vc4: hvs: Support BCM2712 HVS" booting Pi4 with dual 4kp30 displays connected fails with: vc4-drm gpu: [drm] *ERROR* [CRTC:107:pixelvalve-4] flip_done timed out It has been tracked down to the referenced commit adding a path to clear the SCALER_DISPBKGND_FILL when not required. Dual 4kp30 works with a core clock of 297MHz when background fill is enabled, but requires a higher value with it disabled. 320MHz still fails, while 330MHz seems okay. Lets always enable background fill for Pi0-4. Fixes: e84da235 ("drm/vc4: hvs: Support BCM2712 HVS") Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
- Oct 04, 2023
-
-
Dave Stevenson authored
In order to keep the DRM names consistent as DSI-1 and DSI-2, add aliases to the Pi5 DT. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Allow DT aliases of eg DSI2 to force make DRM allocate the display with the requested name. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Naushir Patuck authored
It was accidentally placed in the audio decoder section. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
When the FE is enabled, ensure that the FE_CONFIG node is enabled. Otherwise fail cfe_start_streaming() entirely. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Tomi Valkeinen authored
Set default meta format's field to V4L2_FIELD_NONE, instead of zeroing it which indicates V4L2_FIELD_ANY. Metadata doesn't have fields, so NONE makes sense, and furthermore the default v4l2 link validation will check for matching fields, or that the sink field is NONE. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
When pisp_fe_pad_set_fmt() is given an mbus code that CFE does not support, it currently defaults to MEDIA_BUS_FMT_SBGGR10_1X10. This is not correct, as FE does not support SBGGR10. Set the default to MEDIA_BUS_FMT_SRGGB16_1X16 instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Set hardcoded values for enum csi2_mode, as the values will be programmed to HW registers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Drop 'sensor_embedded_data' field, as it is unused. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Track the errors from the CSI-2 receiver: overflows and discards. These are recorded in a table which can be read by the userspace via debugfs. As tracking the errors may cause much more interrupt load, the tracking needs to be enabled with a module parameter. Note that the recording is not perfect: we only record the last discarded DT for each discard type, instead of recording all of them. This means that e.g. if the device is discarding two unmatched DTs, the debugfs file only shows the last one recorded. Recording all of them would need a more sophisticated recording system to avoid the need of a very large table, or dynamic allocation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Expose the verbose debug flag as a module parameter. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Add back debug prints in csi2 and pisp_fe reg_write() functions, but use the 'irq' variants to avoid spamming in normal situation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Rename the xxx_dbg_irq() macros to xxx_dbg_verbose(), as they can be used to verbose debugs outside irq context too. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
The debug print in cfe_schedule_next_csi2_job() is printed every frame, and should thus use cfe_dbg_irq() to avoid spamming, rather than cfe_dbg(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
Use ~0, not -1, when working with unsigned values (-1 is not unsigned). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
The driver has two places where it writes a register based on a condition, and when that condition is false, the driver presumes that the register has the reset value. This is not a good idea, so fix those places to always write the register. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
The logic for handling width & height in cfe_start_channel() is somewhat odd and, afaics, broken. The code reads: bool start_fe = is_fe_enabled(cfe) && test_all_nodes(cfe, NODE_ENABLED, NODE_STREAMING); if (start_fe || is_image_output_node(node)) { width = node->fmt.fmt.pix.width; height = node->fmt.fmt.pix.height; } cfe_start_channel() is called for all video nodes that will be used. So this means that if, say, fe_stats is enabled as the last node, start_fe will be true, and width and height will be taken from fe_stats' node. The width and height will thus contain garbage, which then gets programmed to the csi2 registers. It seems that this often still works fine, though, probably if the width & height are large enough. Drop the above code, and instead get the width & height from the csi2 subdev's sink pad for the csi2 channel that is used. For metadata the width & height will be 0 as before. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Tomi Valkeinen authored
cfe_probe_complete() calls cfe_put() on both success and fail code paths. This works for the success path, but causes the cfe_device struct to be freed, even if it will be used later in the teardown code. Fix this by making the ref handling a bit saner: Let the video nodes have the refs as they do now, but also keep a ref in the "main" driver, released only at cfe_remove() time. This way the driver does not depend on the video nodes keeping the refs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
- Oct 03, 2023
-
-
Matthias Reichl authored
Commit b84b5314 upstream. Commit 4e087133 ("ASoC: hdmi-codec: fix channel info for compressed formats") accidentally changed hcp->chmap_idx from ca_id, the CEA channel allocation ID, to idx, the index to the table of channel mappings ordered by preference. This resulted in wrong channel maps being reported to userspace, eg for 5.1 "FL,FR,LFE,FC" was reported instead of the expected "FL,FR,LFE,FC,RL,RR": ~ # speaker-test -c 6 -t sine ... 0 - Front Left 3 - Front Center 1 - Front Right 2 - LFE 4 - Unknown 5 - Unknown ~ # amixer cget iface=PCM,name='Playback Channel Map' | grep ': values' : values=3,4,8,7,0,0,0,0 Switch this back to ca_id in case of PCM audio so the correct channel map is reported again and set it to HDMI_CODEC_CHMAP_IDX_UNKNOWN in case of non-PCM audio so the PCM channel map control returns "Unknown" channels (value 0). Fixes: 4e087133 ("ASoC: hdmi-codec: fix channel info for compressed formats") Cc: stable@vger.kernel.org Signed-off-by: Matthias Reichl <hias@horus.com> Link: https://lore.kernel.org/r/20230929195027.97136-1-hias@horus.com Signed-off-by: Mark Brown <broonie@kernel.org>
-
Matthias Reichl authored
This reverts commit a319c6c1.
-
- Sep 30, 2023
-
-
Phil Elwell authored
Fix the touchscreen. See: https://github.com/raspberrypi/linux/issues/5619 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
- Sep 29, 2023
-
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Tomi Valkeinen authored
The driver does not lock the imx477 mutex when calling imx477_set_framing_limits(), leading to: WARNING: CPU: 3 PID: 426 at drivers/media/v4l2-core/v4l2-ctrls-api.c:934 __v4l2_ctrl_modify_range+0x1a0/0x210 [ videodev] Fix this by taking the lock. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-
Dave Stevenson authored
The 10.1" panel doesn't work with the timings defined. vc4 will always have been fixing up the timing due to the limited integer divider, so compute the fixed up mode and use it directly. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
vc4 has always fixed up the timing, so the values defined have never actually appeared on the wire. The display appears to want a slightly longer HFP, so extend the timings and recompute the clock to give the same frame rate. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Avoid double buffering LBM allocations by making the allocation a single alloc per crtc at atomic_flush. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dom Cobley authored
On 2712, the firmware always runs these clock at a speed sufficient for dual 4kp60. The requests here prevent the gpu from going into its lowest voltage mode, so just skip the clock requests. With this applied the idle voltage on my pi 5 reduces from 0.7424V to 0.72V. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Maxime Ripard authored
The BCM2712 comes with a different LBM size computation than the previous generations, so let's add the few examples provided as kunit tests to make sure we always satisfy those requirements. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
We'll start testing our planes code in situations where we will use more than XRGB8888, so let's add a few common pixel formats. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
We'll start to add some tests for the plane state logic, so let's create a helper to add a plane to an existing atomic state. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
Some tests will need to find a plane to run a test on for a given CRTC. Let's create a small helper to do that. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
The current mock planes were just using the regular drm_plane_state, while the driver expect struct vc4_plane_state that subclasses drm_plane_state. Hook the proper implementations of reset, duplicate_state, destroy and atomic_check to create vc4_plane_state. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
The name collide with the Full KMS functions that are going to be made public. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
The BCM2712 has a simpler pipeline than the BCM2711, and thus the muxing requirements are different. Create some tests to make sure we get proper muxing decisions. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-