- Mar 28, 2022
-
-
Dave Stevenson authored
The encoder can skip frames totally should rate control overshoot the target bitrate too far. In this situation it generates an output buffer of length 0. V4L2 treats a buffer of length 0 as an end of stream flag, which is not appropriate in this case, therefore we can not return that buffer to the client. The driver was returning the buffer to videobuf2 in the QUEUED state, however that buffer was then not dequeued again, so the number of buffers was reduced each time this happened. In the pathological case of using GStreamer's videotestsrc in mode 1 for noise, this happens sufficiently frequently to totally stall the pipeline. If the port is still enabled then return the buffer straight back to the VPU rather than to videobuf2. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Noralf Trønnes authored
Add a "drm" parameter that enables use of the drm/mi0283qt driver instead of fbtft/fb_ili9341. Also add a "backlight-pwm" parameter that can be used with the "drm" parameter. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-
Noralf Trønnes authored
This reverts commit 97d1b136. The fbtft backlight problem was fixed in 5.15.6 so this workaround has to be reverted to make backlight work again. Ref: https://github.com/notro/fbtft/issues/571 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-
- Mar 27, 2022
-
-
Matt Flax authored
Use dev_err_probe to follow best practice, and leave a message in the kernel log indicate the driver was started successfully.
-
- Mar 26, 2022
-
-
Noralf Trønnes authored
Add an overlay that can be used with all displays that have a MIPI DBI compatible controller (pixels over SPI). Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-
Noralf Trønnes authored
Enable DRM_PANEL_MIPI_DBI as a module. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-
Noralf Trønnes authored
commit 0e65e2e6 upstream. Add a driver that will work with most MIPI DBI compatible SPI panels. This avoids adding a driver for every new MIPI DBI compatible controller that is to be used by Linux. The 'compatible' Device Tree property with a '.bin' suffix will be used to load a firmware file that contains the controller configuration. Example (driver will load sainsmart18.bin): display@0 { compatible = "sainsmart18", "panel-mipi-dbi-spi"; ... }; v5: - kconfig: s/DRM_KMS_CMA_HELPER/DRM_GEM_CMA_HELPER/ (Sam) - kconfig: Add select VIDEOMODE_HELPERS (Sam) - kconfig: Add wiki url in the description (Sam) - Split out and use of_get_drm_panel_display_mode()(Sam) - Only use the first compatible to look for a firmware file since the binding mandates 2 compatibles. - Make having a firmware file mandatory so we can print an error message if it's missing to improve the user experience. It's very unlikely that a controller doesn't need to be initialized and if it doesn't, it's possible to have a firmware file containing only a DCS NOP. v4: - Move driver to drm/tiny where the other drivers of its kind are located. The driver module will not be shared with a future DPI driver after all. v3: - Move properties to DT (Maxime) - The MIPI DPI spec has optional support for DPI where the controller is configured over DBI. Rework the command functions so they can be moved to drm_mipi_dbi and shared with a future panel-mipi-dpi-spi driver v2: - Drop model property and use compatible instead (Rob) - Add wiki entry in MAINTAINERS Acked-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-6-noralf@tronnes.org
-
Noralf Trønnes authored
commit 1e7e8e18 upstream. devm_drm_dev_alloc() can't allocate structures that embed a structure which then again embeds drm_device. Workaround this by adding a driver_private pointer to struct mipi_dbi_dev which the driver can use for its additional state. v3: - Add documentation Acked-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-5-noralf@tronnes.org
-
Noralf Trønnes authored
commit 95ae342d upstream. Add a function to get a drm_display_mode from a panel-timing device tree subnode. Suggested-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-4-noralf@tronnes.org
-
Noralf Trønnes authored
commit 2f3468b8 upstream. Add binding for MIPI DBI compatible SPI panels. v6: - Fix indentation (Rob) v5: - Add sainsmart18 to compatible items (Rob) - Expand write-only description (Sam) v4: - There should only be two compatible (Maxime) - s/panel-dbi-spi/panel-mipi-dbi-spi/in compatible v3: - Move properties to Device Tree (Maxime) - Use contains for compatible (Maxime) - Add backlight property to example - Flesh out description v2: - Fix path for panel-common.yaml - Use unevaluatedProperties - Drop properties which are in the allOf section - Drop model property (Rob) Acked-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-2-noralf@tronnes.org
-
- Mar 25, 2022
-
-
Naushir Patuck authored
When all nodes have stopped streaming, ensure the firmware has released its handle on the LS table dmabuf. This is done by passing a null handle in the LS params. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
- Mar 24, 2022
-
-
Dom Cobley authored
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
- Mar 23, 2022
-
-
Phil Elwell authored
This reverts commit 40686d87. See: https://github.com/raspberrypi/linux/issues/4930 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
- Mar 22, 2022
-
-
Dave Stevenson authored
The HVS always composes in the RGB domain, but there is a colourspace conversion block on the output to allow for sending YCbCr over the HDMI interface. The colourspace on that link is configurable via the "Colorspace" property on the connector, and that updates the infoframes. There is also selection of limited or full range based on the mode selected or an override. Add code to update the CSC as well so that the metadata matches the image data. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
DRM will automatically handle the backlight with the display if told about the linking, so link the two together. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Jeff LaBundy authored
The device's active-high interrupt normally serves as a push-pull output, but becomes high-impedance during bootloader mode. Enable a pull-down to hold the pin in the inactive state. Signed-off-by: Jeff LaBundy <jeff@labundy.com>
-
Phil Elwell authored
See: https://github.com/raspberrypi/linux/pull/4945 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Rafael Sobral authored
property name is gpio and not gpios
-
Dave Stevenson authored
Adds the zpos property to all planes, and creates the dlist by placing the fragments in the correct order based on zpos. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Upstream commit 9a48ab11 The drm_plane_create_color_properties() function asks for an initial value for the color encoding and range, and will set the associated plane state variable with that value if a state is present. However, that function is usually called at a time where there's no state yet. Since the drm_plane_state reset helper doesn't take care of reading that value when it's called, it means that in most cases the initial value will be 0 (so DRM_COLOR_YCBCR_BT601 and DRM_COLOR_YCBCR_LIMITED_RANGE, respectively), or the drivers will have to work around it. Let's add some code in __drm_atomic_helper_plane_state_reset() to get the initial encoding and range value if the property has been attached in order to fix this. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-19-maxime@cerno.tech
-
Dave Stevenson authored
Upstream commit 1a7998da The drm_plane_create_zpos_property() function asks for an initial value, and will set the associated plane state variable with that value if a state is present. However, that function is usually called at a time where there's no state yet. Since the drm_plane_state reset helper doesn't take care of reading that value when it's called, it means that in most cases the initial value will be 0, or the drivers will have to work around it. Let's add some code in __drm_atomic_helper_plane_state_reset() to get the initial zpos value if the property has been attached in order to fix this. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-8-maxime@cerno.tech
-
Dave Stevenson authored
Upstream commit adf47b75 . Some functions to create properties (drm_plane_create_zpos_property or drm_plane_create_color_properties for example) will ask for a range of acceptable value and an initial one. This initial value is then stored in the values array for that property. Let's provide an helper to access this property. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-7-maxime@cerno.tech
-
Dave Stevenson authored
There's already a regulator module called ad5398 that exposes this device through the regulator API. That is meaningless in the terms that it uses and how it maps to V4L2, so a new driver was added. However the module name collision wasn't noted, so rename it now. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Supports AD5398 controlled lens, as found on some 3rd party OV5647 and IMX219 image sensors. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
v4l2_async_register_subdev doesn't bind in lens or flash drivers, but v4l2_async_register_subdev_sensor does. Switch to using v4l2_async_register_subdev_sensor. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Adds a driver for the Analog Devices AD5398 10 bit I2C DAC which is commonly used for driving VCM lens mechanisms. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Add a binding for Analog Devices AD5398 10bit current sinking DAC when used as a lens VCM driver. FIXME: Convert to YAML Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Daniel Scally authored
Upon an async fwnode match, there's some typical behaviour that the notifier and matching subdev will want to do. For example, a notifier representing a sensor matching to an async subdev representing its VCM will want to create an ancillary link to expose that relationship to userspace. To avoid lots of code in individual drivers, try to build these links within v4l2 core. Signed-off-by: Daniel Scally <djrscally@gmail.com>
-
Daniel Scally authored
Add functions to create ancillary links, so that they don't need to be manually created by users. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com>
-
Daniel Scally authored
Now we have three types of media link, printing the right name during debug output is slightly more complicated. Add a helper function to make it easier. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com>
-
Daniel Scally authored
To describe in the kernel the connection between devices and their supporting peripherals (for example, a camera sensor and the vcm driving the focusing lens for it), add a new type of media link to introduce the concept of these ancillary links. Add some elements to the uAPI documentation to explain the new link type, their purpose and some aspects of their current implementation. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com>
-
Daniel Scally authored
When iterating over the media graph, don't follow links that are not data links. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com>
-
Maxim Devaev authored
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
-
Dave Stevenson authored
TC358762 wants the DSI host to be prepared before it is powered up, so set the flag to request that the upstream bridges have their pre_enable called first. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
drm_panel.h wants to reference enum drm_panel_orientation which is defined in drm_connector.h (despite the name). Include drm_connector.h in drm_panel.h to avoid the rare situation where drm_panel.h is used with drm_connector.h https://github.com/raspberrypi/linux/issues/4919 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-