summaryrefslogtreecommitdiffstats
path: root/drivers/video/imx-ipu-v3
Commit message (Collapse)AuthorAgeFilesLines
* video: IPUv3-LDB: demote dual-channel message to info levelLucas Stach2018-04-091-1/+1
| | | | | | | | Dual channel mode is a valid mode of operation, so there is no reason to print this at the warning level. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: IPUv3-LDB: fix dual-channel modeLucas Stach2017-07-201-13/+33
| | | | | | | | For the dual-channel mode to work correctly, both channels need to be muxed to the same DI and both clock branches need to be configured correctly. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* video: select OFTREE from DRIVER_VIDEO_IMX_IPUV3Lucas Stach2017-05-171-0/+1
| | | | | | | | DRIVER_VIDEO_IMX_IPUV3 selects VIDEO_VPL, which has a hard dependency on OFTREE, so it is required to select this one, too. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ipu: register framebuffer, even when no modes are foundSascha Hauer2017-04-031-3/+1
| | | | | | | | | When no monitor is connected it might be normal that no modes are found. Do not bail out with an error in this case, which gives an ugly error message, but instead still register the framebuffer. This gives the user a chance to examine it and see that the framebuffer has no modes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ipu: convert "failed to get modes" message to dev_dbgSascha Hauer2017-04-031-1/+1
| | | | | | | | When no monitor is connected the it's normal for some outputs that no modes can be found. Convert dev_err to dev_dbg to decrease the visibility of this message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: IPU framebuffer: honor clock and enable polaritiesJan Luebbe2017-01-101-2/+3
| | | | | | | | These flags are already parsed from DT, so we can just use them to configure the timings correctly. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: IPUv3: Add parallel display supportPhilippe Leduc2017-01-103-0/+123
| | | | | | | | | Add a driver compatible with "fsl,imx-parallel-display" in order to enable parallel display with the i.MX IPUv3. Signed-off-by: Philippe Leduc <ledphilippe@gmail.com> Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: add VPL ioctl to get bus formatPhilipp Zabel2016-08-251-2/+6
| | | | | | | | | 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-256-28/+28
| | | | | | | | | | | 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>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-153-7/+6
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-072-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: Fix return check of dev_request_mem_regionSascha Hauer2016-02-232-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region returns an ERR_PTR, fix places which check for a NULL pointer instead. This patch has been generated with this semantic patch, written by me and improved by Andrey Smirnov: // <smpl> @@ expression e; expression e1; @@ e = dev_request_mem_region(...); ... -if (!e) - return e1; +if (IS_ERR(e)) + return PTR_ERR(e); @ rule1 @ expression e; @@ e = dev_request_mem_region(...); @@ expression rule1.e; identifier ret, label; constant errno; @@ if (!e) { ... ( - ret = -errno; + ret = PTR_ERR(e); ... goto label; | - return -errno; + return PTR_ERR(e); ) } @depends on rule1@ expression rule1.e; @@ - if (e == NULL) + if (IS_ERR(e)) { ... } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
* Introduce include/linux/mutex.hYegor Yefremov2016-02-032-0/+2
| | | | | | | Move mutex related defines to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce include/linux/spinlock.hYegor Yefremov2016-02-011-0/+1
| | | | | | | Move spinlock related definitions to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3: Set ldb clocks correctlySascha Hauer2015-11-301-4/+22
| | | | | | | | | | | | The clocks for the LVDS display bridge have a fixed /3.5 and a configurable /1,/2 divider in their path. The configurable divider has to be explicitly configured for single/dual channel support, so we can't rely on clock rate parent propagation here. Clear the CLK_SET_RATE_PARENT flag for the configurable divider and configure the clock explicitly in the ldb driver. Tested on a custom i.MX6 board, currently untested on i.MX53. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: ipuv3: Silence VPL messageSascha Hauer2015-10-271-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-10-073-5/+5
|\
| * video: imx-hdmi: Remove unused 'regmap' structureFabio Estevam2015-10-011-1/+0
| | | | | | | | | | | | | | | | As regmap is not used in Barebox we can remove this field from the imx_hdmi struct. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * introduce strerrorpSascha Hauer2015-09-231-4/+4
| | | | | | | | | | | | | | | | | | | | putting an error pointer into strerror can be a bit confusing since strerror takes a positive error code but PTR_ERR returns a negative number, so we have to do strerror(-PTR_ERR(errp)). Some places got this wrong already, so introduce a strerrorp function which directly takes an error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: imx-hdmi: depend on EDID supportLucas Stach2015-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | HDMI support is not generally useful without EDID support. Fixes: In function `imx_hdmi_ioctl': undefined reference to `edid_read_i2c' 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: ipuv3: print error message when no modes are foundSascha Hauer2015-10-011-1/+3
| | | | | | | | | | | | | | This is a common error, so print a message to inform the user what went wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: ipuv3: imx-ldb: Support video modes in ldb nodeSascha Hauer2015-10-011-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | We used to support video modes directly in the ldb device node, that was lost in: 5bda17e video: ipuv3: Replace ipu_output with VPL. Add this support back. Also drop duplicate vpl ioctl forwarding for several calls. With this patch modes can either be retrieved from the ldb node as originally done or from the panel remote port. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: ipuv3: imx-ldb: remove unused variableSascha Hauer2015-10-011-7/+0
| | | | | | | | | | | | endpoint is set but not used. Remove the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | 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>
* 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: 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>
* 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-062-2/+1
| | | | | | | | | | 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-061-1/+2
| | | | | | | | | 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>
* 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: 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>
* sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+1
| | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3 ldb: implement i.MX53 supportSascha Hauer2014-05-091-1/+30
| | | | | | Configure the clock path correctly for i.MX53. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3: Implement i.MX5 IPU reset supportSascha Hauer2014-05-091-0/+29
| | | | | | Needed to make the IPU driver work on i.MX5 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3: Print error as stringSascha Hauer2014-05-081-2/+2
| | | | | | And add a missing newline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3: remove debug leftoverSascha Hauer2014-05-081-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: imx-ipu-v3: remove unneeded 'dmfc' checkSascha Hauer2014-04-231-3/+0
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Suggested-by: Fabio Estevam <festevam@gmail.com>
* video: i.MX IPUv3: Add hdmi supportSascha Hauer2014-03-294-0/+2333
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: i.MX IPUv3: Add lvds bridge supportSascha Hauer2014-03-293-0/+314
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add i.MX IPUv3 supportSascha Hauer2014-03-2912-0/+3902
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>