summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
...
* | video: ipuv3: Do not crash when no mode is foundSascha Hauer2015-10-011-0/+5
| | | | | | | | | | | | | | | | When something is missing in the device tree or not all necessary drivers are compiled in it may happen that no valid mode is found. Do not crash in this case but print an error message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: imx: assert that image buffer doesn't cross a 4 MiB boundaryUwe Kleine-König2015-09-211-10/+39
|/ | | | | | | | | | | | | | The reference manual (for the i.MX25 in my case) states: This field must start at a location that enables a complete picture to be stored in a 4 Mbyte memory boundary (A [21:0]). A [31:22] has a fixed value for a picture’s image. Check this condition for user-supplied framebuffer values and enforce it for driver-allocated buffers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fb-imx-ipu-v3'Sascha Hauer2015-09-016-152/+273
|\
| * video: simple-panel: mode support depends on I2C and EDIDLucas Stach2015-08-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading modes from EDID EEPROMs requires both I2C and EDID support to be available. As the simple panel driver is also useful without mode reading support, only built it in if the requirements are met. Fixes: In function `simple_panel_get_modes': simple-panel.c:88: undefined reference to `of_find_i2c_adapter_by_node' simple-panel.c:91: undefined reference to `edid_read_i2c' simple-panel.c:95: undefined reference to `edid_to_display_timings' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: MTL017: depend on I2CLucas Stach2015-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | This driver uses I2C functions and isn't useful without them. Fixes: In function `mtl017_init': drivers/video/mtl017.c:278: undefined reference to `i2c_bus' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipu-fb: mark internally used functions as staticLucas Stach2015-08-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes symbol clashes with the IPUv3 driver: In function `ipu_ch_param_write_field': drivers/video/imx-ipu-v3/ipu-common.c:103: multiple definition of `ipu_ch_param_write_field' drivers/video/imx-ipu-fb.c:359: first defined here In function `ipu_cpmem_set_format_rgb': drivers/video/imx-ipu-v3/ipu-common.c:155: multiple definition of `ipu_cpmem_set_format_rgb' drivers/video/imx-ipu-fb.c:504: first defined here Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fb: imx-ipu-v3: Use writecombine memory for fbSascha Hauer2015-08-071-1/+1
| | | | | | | | | | | | To speed up copying to the framebuffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipuv3: Adjust videomode to IPU limitationsSascha Hauer2015-08-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | The IPU needs an upper margin >= 2. Make this sure. This is based on Linux commit: commit 6541d71082fdb91f862c92920c6530e4e0548d6f Author: Jiada Wang <jiada_wang@mentor.com> Date: Thu Dec 18 18:00:20 2014 -0800 gpu: ipu-di: Add ipu_di_adjust_videomode() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: imx-hdmi: sync with kernelSascha Hauer2015-08-072-148/+235
| | | | | | | | | | | | | | | | | | This syncs the imx-hdmi driver with Linux 4.2-rc1 where it makes sense. This makes it easier to compare the driver with the kernel. This also adds hdmi_av_composer which is mandatory. Somehow the driver worked without it in lower resolutions, but now it also works for higher resolutions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: fbcon: needs console supportLucas Stach2015-08-201-0/+1
| | | | | | | | | | | | | | | | | | Fixes: In function `register_fbconsole': drivers/video/fbconsole.c:425: undefined reference to `console_register Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: fbconsole: Add missing blitsSascha Hauer2015-08-201-1/+8
| | | | | | | | | | | | | | When using offscreen rendering we need some more points where we blit the offscreen buffer to the screen. Add them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: fbconsole: print cursor after clearing the screenSascha Hauer2015-08-201-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gui: Use fb provided shadowfb for offscreen renderingSascha Hauer2015-08-201-1/+1
| | | | | | | | | | | | | | The fb core now has builtin support for offscreen rendering, use this and drop offscreen handling in the gui code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: Add shadowfb supportSascha Hauer2015-08-201-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | For speeding up rendering we need shadow framebuffers. This is currently implemented in the gui functions. This does not work properly when two users (splash and fbconsole) use the same framebuffer since in this case two different shadow framebuffers will be used. This patch implements shadowfb handling in the fb core directly. With this the fb device gets a parameter 'shadowfb'. When this is true the fb core will allocate a shadow fb and provide it to the users. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: return original fb_info in FBIOGET_SCREENINFOSascha Hauer2015-08-201-1/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: fbconsole: do not enter when we are already in fbconsoleSascha Hauer2015-08-201-0/+6
|/ | | | | | | Make it possible to issue console messages from inside the fbconsole code without entering the fbconsole again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vpl'Sascha Hauer2015-08-0711-182/+778
|\
| * video: Add simple-panel supportSascha Hauer2015-07-133-0/+170
| | | | | | | | | | | | | | | | | | | | This adds support for simple panels. These are panels which don't need special handling but can have enable gpios and such. Unlike the Linux kernel implementation this one is able to understand display-timings nodes so that it's not necessary to keep a list of all known displays with their corresponding timings in barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipuv3: match ipu_di_signal_cfg's clk_pol with its descriptionSascha Hauer2015-07-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From this Linux commit: commit 85de9d17c485c4196f74d45de2206d4802f8a3be Author: Denis Carikli <denis@eukrea.com> Date: Mon Apr 7 14:44:43 2014 +0200 imx-drm: match ipu_di_signal_cfg's clk_pol with its description. According to the datasheet, setting the di0_polarity_disp_clk field in the GENERAL di register sets the output clock polarity to active high. Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipuv3: Replace ipu_output with VPLSascha Hauer2015-07-135-178/+197
| | | | | | | | | | | | | | | | The ipuv3 makes heavy use of video encoders internally to the SoC but also external encoders are common. Switch to VPL support to be able to handle these properly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipuv3: remove unused variableSascha Hauer2015-07-132-2/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: Add MTL017 LVDS encoder supportSascha Hauer2015-07-133-0/+290
| | | | | | | | | | | | | | | | The MTL017 is found on the Efika Smartbook. Not much is known about this chip, so this driver only programs a register dump which is suitable for some panels. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: Add Video Pipeline (VPL) supportSascha Hauer2015-07-133-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/video'Sascha Hauer2015-08-062-36/+94
|\ \
| * | video: stm: reserve framebuffer memory for LinuxSascha Hauer2015-07-061-0/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: Add generic fixup handler to reserve fb memorySascha Hauer2015-07-061-0/+21
| | | | | | | | | | | | | | | | | | | | | When a framebuffer is kept enabled when Linux starts its framebuffer memory should be reserved. Otherwise Linux may overwrite its contents. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: honor display_flagsSascha Hauer2015-07-061-2/+4
| | | | | | | | | | | | | | | | | | | | | stmfb uses custom flags FB_SYNC_DE_HIGH_ACT and FB_SYNC_CLK_INVERT. These have generic counterparts in display_flags. Honor them aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: read bits-per-pixel from device treeSascha Hauer2015-07-061-0/+3
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: read interface width from device treeSascha Hauer2015-07-061-0/+6
| | | | | | | | | | | | | | | | | | | | | The interface width has not been initialized when probed from device tree. Fix that. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: use uncached memorySascha Hauer2015-07-061-1/+8
| | | | | | | | | | | | | | | | | | To avoid caching effects on the display use uncached memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: code buswidth in platform data as decimalSascha Hauer2015-07-061-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of putting hardware specific bit masks in platform_data just use the decimal interface width and encode this in the driver. This makes it easier to create the platform_data and helps device tree based implementations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: copy platform_data to driver dataSascha Hauer2015-07-061-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the individual fields of struct imx_fb_platformdata to the driver data rather than keeping a pointer to platform_data. This works better with device tree where no platform_data * is available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: stm: remove unnecessary info functionSascha Hauer2015-07-061-13/+0
| |/ | | | | | | | | | | devinfo will show the information without the help of the driver anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fbcon'Sascha Hauer2015-08-065-12/+483
|\ \
| * | video: implement framebuffer consoleAntony Pavlov2015-07-204-0/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch realizes framebuffer console support for barebox. It supports colors and enough escape sequences to show the barebox console and editor properly. fbconsole mini-HOWTO ==================== 1. compile sandbox barebox with CONFIG_VIDEO=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_DRIVER_VIDEO_SDL=y 2. run barebox 3. test fbconsole fbconsole0.active=oe Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fb: sdl: create graphics window on enablingSascha Hauer2015-07-201-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The framebuffer should be enabled on the fb_enable callback and disabled in the fb_disable callback. In SDL context this means the grapics window has to be created / destroyed in fb_enable / fb_disable. With this change the framebuffer has to be enabled explicitly with fb0.enable=1 like with other framebuffer driver aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fb: Add fb_enable/disable functionsSascha Hauer2015-07-201-5/+24
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / video: backlight-pwm: depend on GPIOLIBLucas Stach2015-07-291-1/+1
|/ | | | | | | | | | | | The PWM backlight driver does not only control PWMs but also GPIOs. Fixes: In file included from include/gpio.h:4:0, from drivers/video/backlight-pwm.c:27: arch/arm/include/asm/gpio.h:5:23: fatal error: mach/gpio.h: No such file or directory Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add PWM backlight supportSascha Hauer2015-06-123-0/+208
| | | | | | This adds a backlight driver for backlights controlled by a PWM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add backlight supportSascha Hauer2015-06-123-0/+95
| | | | | | | 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: stmfb: Add device tree supportSascha Hauer2015-06-121-10/+42
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-303-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: move DMA alloc functions to dma.hLucas Stach2015-03-068-6/+5
| | | | | | | | | | This better separates the DMA from the MMU functionality. Also move all drivers that only depends on asm/mmu.h for the alloc functions over to the common header. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: change dma_alloc/free_coherent to match other architecturesLucas Stach2015-03-065-10/+14
| | | | | | | | | As a lot drivers currently rely on the 1:1 virt->phys mapping on ARM we define DMA_ADDRESS_BROKEN to mark them. In order to use them on other architectures with a different mapping they need proper fixing. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-01-091-1/+0
|\
| * drivers: remove unnecessary mach/imx-regs.h includeSascha Hauer2015-01-051-1/+0
| | | | | | | | | | | | And replace the ones needed with the SoC specific header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: imx-hdmi: search for DDC node only when EDID support is enabledLucas Stach2014-12-171-9/+11
|/ | | | | | | | | | | | | This uses i2c functions that may not be available in every configuration and is only needed if EDID support is enabled, which in turn already selects I2C. Fixes: drivers/video/imx-ipu-v3/imx-hdmi.c: undefined reference to `of_find_i2c_adapter_by_node' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: EDID: depends on I2CSascha Hauer2014-11-271-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ipuv3: select OFDEVICE for HDMI and LVDSLucas Stach2014-11-241-0/+2
| | | | | | | Both components need the OF display timings helpers. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx: ipu-v3: fix typo leading to build warningLucas Stach2014-10-211-1/+1
| | | | | | | This PAGE_SIZE clearly should not be there. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>