summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* video: sdl fix typoJean-Christophe PLAGNIOL-VILLARD2017-03-061-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: tc358767: add copyright linesAndrey Gusakov2017-01-201-0/+2
| | | | | | | Add copyright lines for Zodiac who paid for driver development. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> 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: tc358767: depend on EDID helpersLucas Stach2016-10-041-0/+1
| | | | | | | The eDP part need to be able to read the panel EDID. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2016-09-1310-29/+1354
|\
| * video/edid: Fix edid_to_display_timings error pathPhilipp Zabel2016-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | edid_to_display_timings is called in drivers/video/imx-ipu-v3/imx-hdmi.c, drivers/video/simple-panel.c, and drivers/video/edid.c with the struct display_timings *timings parameter pointing to an embedded struct display_timings inside a struct fb_info. The timings pointer is not to be freed in the error path. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: tc358767: add eDP video encoder driverAndrey Gusakov2016-08-253-0/+1322
| | | | | | | | | | | | | | | | | | This patch adds support for the Toshiba TC358767 eDP bridge, connected via DPI. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Philipp Zabel <p.zabel@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>
* | video: backlight: fix the value of 'brightness_max'Sascha Hauer2016-08-291-1/+3
|/ | | | | | | | | Fixes: 87c6a88 video/backlight-pwm: fix the value of 'brightness_max'. brightness_max should really contain the number of brightness steps, so the number of elements in the brightness array. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/backlight-pwm: properly handle the case of an empty ↵iw3gtf@arcor.de2016-07-151-7/+13
| | | | | | | | | | | | | | | 'brightness-levels' in the device tree. In case of an empty 'brightness-levels' array in the device tree or a non empty one but containing only zeros the value of 'pwm_backlight->scale' would remain 0 possibly causing a division by zero in the function compute_duty_cycle(). To fix it we check the computed value in case we actually have a 'brightness-levels' array in the device tree otherwise we implicitly assume a simple array of the form { 0, 1, 2, ..., 100 } and set the scale to 100. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/backlight-pwm: code readability improvement.iw3gtf@arcor.de2016-07-151-6/+5
| | | | | | | We use the local variable 'length' instead of the lengthy 'pwm_backlight->backlight.brightness_max' within pwm_backlight_parse_dt(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/backlight-pwm: fix the value of 'brightness_max'.iw3gtf@arcor.de2016-07-151-1/+1
| | | | | | | | The field pwm_backlight->backlight.brightness_max should be the maximum allowed brightness value for the backlight, not the max index of the array 'pwm_backlight->levels[]'. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/backlight-pwm: fixed a loop index going out of range.iw3gtf@arcor.de2016-07-151-1/+1
| | | | | | | | In the function pwm_backlight_parse_dt() the last iteration of the for loop accessed memory past the end of the array 'pwm_backlight->levels[]' because of a wrong test ( '<=' instead of '<'). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/edid: Move int_sqrt() outAndrey Smirnov2016-06-301-29/+0
| | | | | | | | Move int_sqrt() out of drivers/video/edid.c so that it is availible to other parts of Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-155-11/+13
| | | | | | | | | | 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-078-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* drivers: video: drop unused of_get_display_timing()Antony Pavlov2016-02-081-25/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: video: fb: make locally used fb_set_shadowfb() staticAntony Pavlov2016-02-081-1/+1
| | | | | | | | | | | | The patch fixes this compiler's warning: drivers/video/fb.c:233:5: warning: no previous prototype for 'fb_set_shadowfb' [-Wmissing-prototypes] int fb_set_shadowfb(struct param_d *p, void *priv) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>
* bcm2835: introduce mach-bcm283xAlexander Aring2016-01-042-5/+5
| | | | | | | | | | | | This patch changes the most part of mach-bcm2835 to mach-bcm283x. This prepares to add RPi2 support which is a bcm2836. This patch changes the Kconfig entry namens to BCM283X for drivers only. These drivers should working the same in bcm2836. While updating defconfig I added LED support/trigger option. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx'Sascha Hauer2015-12-081-4/+22
|\
| * 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: pwm-backlight: Honour discrete brightness levels from dtSascha Hauer2015-11-231-7/+20
| | | | | | | | | | | | | | | | | | If probed from device tree we have an array of pwm duty cycle levels in the brightness-levels property. Although the driver parsed the property, the values have been ignored. Make use of these flags so that the driver can work for example with inverted PWMs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | font: fbconsole: add custom font supportsDu Huanpeng2015-11-231-2/+3
| | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fbconsole: move font variable into struct font_descDu Huanpeng2015-11-091-19/+17
|/ | | | | | | | replace font related variables with a struct pointer, font_desc. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-11-062-5/+13
|\
| * fb: alloc or free shadowfb whether fb enabled or disabledAleksey Kuleshov2015-11-061-2/+2
| | | | | | | | | | | | | | | | Resolution can't be changed anyway once fb_enable() has been called, since no corresponding fb_disable() call appears in the code. Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fb: satisfy semantics for shadowfb's alloc/freeAleksey Kuleshov2015-11-061-2/+9
| | | | | | | | | | | | | | | | | | Console enable -> alloc shadowfb. Console disable -> free shadowfb. Otherwise, if resolution gets changed, shadowfb will not be affected. Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fbconsole: no need to copy extra lineAleksey Kuleshov2015-11-061-1/+2
| | | | | | | | | | Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/memtest'Sascha Hauer2015-11-063-9/+6
|\ \
| * | rework remap_rangeSascha Hauer2015-11-033-9/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2015-11-061-1/+1
|\ \ | |/ |/|
| * video: ipuv3: Silence VPL messageSascha Hauer2015-10-271-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: simple-panel: depend on OFDEVICELucas Stach2015-10-141-1/+1
|/ | | | | | | | | Fixes: In function `simple_panel_ioctl': undefined reference to `of_get_display_timings' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-10-074-5/+8
|\
| * 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: vpl: depend on OFTREELucas Stach2015-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | VPL uses the of_graph bindings, which are only available if OFTREE support is compiled in. Also fix the drivers using VPL to depend on OFTREE. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: backlight-pwm: Add regulator supportSascha Hauer2015-10-011-0/+13
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: backlight-pwm: Add error messageSascha Hauer2015-10-011-1/+3
| | | | | | | | | | | | Inform the user when we can't find a pwm for the backlight driver. 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: simple-panel: Add support for device tree provided nodesSascha Hauer2015-10-011-0/+8
| | | | | | | | | | | | This adds support for display timings provided from device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: simple-panel: Add debug/error messagesSascha Hauer2015-10-011-5/+23
| | | | | | | | | | | | Let the driver be more informative when something goes 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>