summaryrefslogtreecommitdiffstats
path: root/include/video
Commit message (Collapse)AuthorAgeFilesLines
* gpio: have gpiod_ functions return and accept pointersAhmad Fatoum2023-06-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The gpiod_ (GPIO descriptor) API used with Linux differs from barebox' normal GPIO API: - gpiod handles are opaque pointers and not an integer, which users have an expectation of stability for - gpiod API uses logic levels by default with separate raw API for physical level instead of physical level by default and separate API taking active level into account. The barebox gpiod_ API mimics the latter point, but still uses integers requiring ugly and arguably error prone conversions when porting kernel code. Let's improve upon that by just encoding the integer into a pointer variable for API compatibility. Later commits will switch barebox GPIO support to use actual GPIO descriptors without consulting the numeric indices, but we do this temporary switch here, so we can split up provider and consumer changes. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230622072329.1339317-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: mipi_dbi: add damage tracking and partial updatesPhilipp Zabel2023-04-111-0/+6
| | | | | | | | | Track framebuffer damage with a simple rectangle that can be used to issue partial updates during fb_flush. This speeds up fbconsole. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.barebox.org/20230405122734.2348025-3-p.zabel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: add MIPI DBI framebuffer helpersPhilipp Zabel2023-04-051-0/+63
| | | | | | | | | Port helper functions for the panel-mipi-dbi driver from the Linux kernel. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.barebox.org/20230330124643.3562397-3-p.zabel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-102-2/+2
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: omap-fb: Rework to enable COMPILE_TEST optionAlexander Shiyan2022-04-251-0/+45
| | | | | | | | | | | To add a compilation check for the omap-fb driver, move the omap-fb.h header to a global location. The "omap_add_display" function is used only for legacy boards, so we will move it to a common place for such calls (omap_devices.c). Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220422071158.14631-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: add MIPI DBI Type C Option 3 supportAhmad Fatoum2022-02-082-0/+255
| | | | | | | | | Import the Linux v5.15 state of the driver to allow easy porting of MIPI-DBI displays like the Ilitek 9431 added in a follow-up commit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220202223023.341817-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: add SPDX-License-IdentifierAhmad Fatoum2022-01-053-0/+6
| | | | | | | | | All these files lack a license statement, so add the default GPL-2.0-only. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: fix atmel,lcd-wiring-mode; BGR => BRGSam Ravnborg2021-04-131-2/+2
| | | | | | | | | Fix spelling error that prevented us from getting the atmel,lcd-wiring-mode The Bindings mandate the use of BRG. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* video: backlight: add slew time parameterLucas Stach2018-06-211-0/+1
| | | | | | | | | | | | Currently the backlight implementation stretches a brightness change over a period of 100ms. While this is a fine default for PWM backlights, a user might wish to change this slew time to meet other constraints or even completely disable it for some backlight devices. Add a parameter and provide the default value from the backlight device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: define power_control gpio in platform_dataSam Ravnborg2017-09-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | Simplify board specific code by specifying the power_control gpio direct in platform data. Move registration of the GPIO to the driver so we no longer need to duplicate this for each board. As an intended side-effect there is no longer any references to platform_data outside atmel_lcdc_register() so remove it from struct atmel_lcdfb_info The implementation assumes that GPIO=0 is the same as no power control. This prevents us from using any GPIO=0 for power control, but this is not considered a problem for current users. Future DT users will not have this limitation. This commit include a fix so we will actually power down if requested. Previously this was hardcoded to ON. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: add VPL ioctl to get bus formatPhilipp Zabel2016-08-251-0/+1
| | | | | | | | | The i.MX specific DI_MODE VPL ioctl already allows to query the encoder input bus format. This patch also allows non-i.MX specific encoder drivers to report their input bus format. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: switch to media bus formatsPhilipp Zabel2016-08-252-151/+137
| | | | | | | | | | | V4L2 pixel formats are supposed to describe video frames in memory. To describe the pixel format on the hardware bus between display interface and encoders, use media bus formats, which are more expressive. This allows to get rid of the custom GBR24 and LVDS666 fourccs. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: backlight: add fallbacks for client functionsLucas Stach2015-08-191-0/+17
| | | | | | | | | | | | | | | Add empty static inline function fallbacks if backlight support is not enabled, so that drivers using the backlight don't fail to build. Fixes: In function `simple_panel_ioctl': undefined reference to `of_backlight_find' undefined reference to `backlight_set_brightness_default' undefined reference to `backlight_set_brightness' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add Video Pipeline (VPL) supportSascha Hauer2015-07-131-0/+46
| | | | | | | | | | | | | | | | | Complex video pipelines are modelled with the of_graph bindings in the devicetree. This patch adds a ioctl infrastructure to issue commands to the remote endpoint of a of_graph. Currently defined ioctls are prepare/unprepare, enable/disable and get_modes. This is enough to control LVDS or HDMI encoder or simple panels. A device node which contains of_graph endpoints can be registered as a VPL entity. An entity can receive ioctls via the .ioctl callback and also issue ioctls by calling vpl_ioctl. The core itself will never iterate over the entire pipeline. Instead, the different VPL entities should forward an ioctl to the next instance in the pipeline whenever necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add backlight supportSascha Hauer2015-06-121-0/+20
| | | | | | | This adds a small backlight layer. It provides a backlight device on which the brightness parameter can be used to adjust the brightness. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add kernel fourcc definesSascha Hauer2014-03-291-0/+261
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: add atmel lcdc frambuffer supportJean-Christophe PLAGNIOL-VILLARD2013-01-281-0/+206
This IP is present on the at91sam9 until the sam9g45, on the sam9x5 we use a new IP. This driver is based on the linux one. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>