summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
...
| * video: tc358767: fix EDID read for DP displaysAndrey Gusakov2017-07-061-5/+16
| | | | | | | | | | | | | | | | Desktop displays do not always support E-DDC. So do not fall on EDID segment index write operation. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/misc'Lucas Stach2017-07-313-14/+58
|\ \
| * | video/ssd1307fb: add support for VBATBastian Stender2017-07-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support to the driver to enable VBAT regulator at init time. This is similar to ba14301e0356 ("fbdev/ssd1307fb: add support to enable VBAT") and cfc5b2b551d8 ("fbdev/ssd1307fb: fix optional VBAT support") in Linux kernel. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@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: tc358767: demote ASSR enable failure to debug levelLucas Stach2017-07-201-1/+1
| |/ | | | | | | | | | | | | Same as in the Linux kernel. Failure to enable ASSR isn't a critical failure and can happen in normal use. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* / atmel_lcdfb: fix so the correct guard_time is usedSam Ravnborg2017-07-202-1/+2
|/ | | | | | | | | | | guard_time is set in platform data but was never copied to atmel_lcdfb_info thus a guard_time of 0 have always been used. This issue was found during code inspection and no know bugs is fixed by this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> 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>
* Merge branch 'for-next/parameter-types'Sascha Hauer2017-05-053-3/+3
|\
| * param: make parameter functions more consistentSascha Hauer2017-04-113-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a consitent set of device parameter functions. With this we have: dev_add_param_<type><access> "type" is one of: int32, uint32, int64, uint64, string, mac, ipv4, enum, bitmask The improvement here is that we now can exactly specify the width of the int type parameters and also correctly distinguish between signed and unsigned variables which means that a variable no longer ends up with INT_MAX when it's assigned -1. "access" can be empty for regular read/write parameter, "_ro" for readonly parameters which get their value from a variable pointer in the background or "_fixed" for parameters which are set to a fixed value (without a pointer in the background). Some more exotic types are not (yet) implemented, like dev_add_param_ip_ro. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drivers: video: drop unused of_display_timings_exist()Antony Pavlov2017-04-281-19/+0
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ofpart'Sascha Hauer2017-04-071-8/+4
|\
| * treewide: Use of_property_write_string() where appropriateSascha Hauer2017-03-301-8/+4
| | | | | | | | | | | | | | Replace users which use of_set_property() to set a property to a string with of_property_write_string(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-071-1/+1
|\ \
| * | video: edid.c: fix "no previous prototype" warningAntony Pavlov2017-03-301-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | The patch fixes this compiler's warning: drivers/video/edid.c:390:5: warning: no previous prototype for 'fb_get_mode' [-Wmissing-prototypes] int fb_get_mode(int flags, u32 val, struct fb_videomode *var) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> 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>
* Merge branch 'for-next/video'Sascha Hauer2017-03-135-22/+682
|\
| * video: make enable/disable ops optionalJean-Christophe PLAGNIOL-VILLARD2017-03-101-2/+4
| | | | | | | | | | | | | | | | Some framebuffers cannot be enabled/disabled, so make the corresponding ops optional. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: call fb_[en|dis]able instead of fops directlySascha Hauer2017-03-101-3/+5
| | | | | | | | | | | | | | | | We have fb_enable and fb_disable which handle enabling of a framebuffer, so use it instead of calling into the ops directly. This gets the enable count straight. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: add support for Solomon SSD1307 OLED controller familyBastian Stender2017-03-063-0/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was ported from linux v4.10. Like the kernel driver only communication via I2C is supported. It has only been tested with a SSD1306 and a 96x16 OLED display: &i2c0 { status = "okay"; ssd1306: oled@3c { compatible = "solomon,ssd1306fb-i2c"; reg = <0x3c>; reset-gpios = <&gpio1 1 0>; solomon,height = <16>; solomon,width = <96>; solomon,page-offset = <0>; solomon,com-invdir; solomon,com-seq; }; Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fb: introduce flush for virtual framebufferBastian Stender2017-02-282-0/+29
| | | | | | | | | | | | | | | | | | | | | | Some drivers need an explicit sync method to flush the virtual framebuffer to the display. It is called fb_flush(). fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle in the fbtest command. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: replace set_active by open/closeBastian Stender2017-02-281-10/+18
| | | | | | | | | | | | | | | | | | Opening and closing consoles should be independent from setting them active. This way it is possible to open e.g. a framebuffer console and display text on it without showing stdout/stderr. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fbconsole: implement vt100 cursor shown/hiddenBastian Stender2017-02-281-5/+50
| | | | | | | | | | | | | | | | | | This implements the vt100 show cursor command '[?25h' and the hide cursor command '[?25l'. It is useful for displaying text on a non-active (no stdout/stdin/stderr) console with 'echo'. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fbconsole: check cursor position before movingBastian Stender2017-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | Moving the cursor to x=2, y=2 with "\e[3;3H" on a 12x2 framebuffer console lead to a barebox crash while drawing the cursor. If the cursor position is out of bounds clip the cursor to the corresponding edge. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2017-03-133-0/+273
|\ \
| * | video: add EFI Graphics Output Protocol supportJean-Christophe PLAGNIOL-VILLARD2017-03-093-0/+273
| |/ | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / 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>