summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* treewide: surround Kconfig file paths with double quotesMasahiro Yamada2019-03-211-1/+1
| | | | | | | | | Based on Linux commit 8636a1f9677db4f883f29a072f401303acfc2edd This will be needed when you sync Kconfig with Linux 5.0 or later. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: video: Fix parsing oftree timingsAlexander Shiyan2019-03-181-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the parsing of the display timings options if the range is specified (min/typ/max). Also fixed the double release of memory in case of failure. barebox 2018.12.0-00341-g23b28d33a-dirty #6 Fri Mar 15 09:20:25 MSK 2019 Board: Mega-Milas Informer i.MX6 detected i.MX6 Quad revision 1.2 i.MX reset reason POR (SRSR: 0x00000001) mdio_bus: miibus0: probed eth0: got preset MAC address: 50:2d:f4:07:71:0b nand: NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64 Bad block table found at page 524224, version 0x01 Bad block table found at page 524160, version 0x01 m25p80 flash@00: n25q128a13 (16384 Kbytes) imx-usb 2184000.usb@2184000: USB EHCI 1.00 imx-usb 2184200.usb@2184200: USB EHCI 1.00 imx-esdhc 2198000.usdhc@2198000: registered as mmc2 imx-ipuv3 2400000.ipu@2400000: IPUv3H probed ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: illegal timing specification in clock-frequency ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: error reading timing properties ERROR: /ldb/lvds-channel@0: error in timing 1 ERROR: unable to handle NULL pointer dereference at address 0x00000013 pc : [<4fe05742>] lr : [<4fe05849>] sp : 4ffefa80 ip : ffffffff fp : 2fefe84c r10: 2ff656e8 r9 : 0000002c r8 : 2ff19630 r7 : 00000000 r6 : 0000004c r5 : 2ff65960 r4 : 00000007 r3 : 00000013 r2 : 00000000 r1 : 4fe87584 r0 : 2fefb460 Flags: nzcv IRQs off FIQs off Mode SVC_32 [<4fe05742>] (remove_free_block+0xe/0x3e) from [<4fe05849>] (block_locate_free+0x7f/0x88) [<4fe05849>] (block_locate_free+0x7f/0x88) from [<4fe0599b>] (tlsf_malloc+0x17/0x32) [<4fe0599b>] (tlsf_malloc+0x17/0x32) from [<4fe0559b>] (malloc+0x13/0x24) [<4fe0559b>] (malloc+0x13/0x24) from [<4fe3a1f3>] (strdup+0x11/0x22) [<4fe3a1f3>] (strdup+0x11/0x22) from [<4fe006f3>] (pr_puts+0x33/0x84) [<4fe006f3>] (pr_puts+0x33/0x84) from [<4fe00803>] (dev_printf+0x6f/0x8c) [<4fe00803>] (dev_printf+0x6f/0x8c) from [<00000000>] (0x0) [<4fe54715>] (unwind_backtrace+0x1/0x60) from [<4fe00de1>] (panic+0x1d/0x34) [<4fe00de1>] (panic+0x1d/0x34) from [<4fe5285d>] (do_exception+0xd/0x10) [<4fe5285d>] (do_exception+0xd/0x10) from [<4fe528bd>] (do_data_abort+0x21/0x2c) [<4fe528bd>] (do_data_abort+0x21/0x2c) from [<4fe524d4>] (do_abort_6+0x48/0x54) ### ERROR ### Please RESET the board ### Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: Drop dev_lseek_default()Andrey Smirnov2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2019-01-151-2/+5
|\
| * video: mtl017: fix driver name variableSam Ravnborg2019-01-041-2/+2
| | | | | | | | | | | | | | | | | | It look like a copy-paste bug that the twl_driver name was used. Rename to the more sensible mtl_driver Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: mtl017: Make sure errno is not used as a regulator pointerAndrey Smirnov2018-12-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Since regulator_get() can return an errno via regulator pointer, we need to make sure we handle that case without passing bogus pointers around. Add code to convert mtl017->regulator to a dummy regulator if regulator_get() fails. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | backlight: rave-sp: init all brightness to default levelLucas Stach2018-12-131-1/+1
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/missing-prototypes'Sascha Hauer2018-12-071-1/+1
|\
| * video: vpl: make locally used function staticSascha Hauer2018-11-121-1/+1
| | | | | | | | | | | | of_find_vpl() is only used locally, so make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-12-072-1/+2
|\ \
| * | video: ipuv3: use non-fractional clock for parallel displayLucas Stach2018-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to keep DI and parent clock in sync for the parallel display interface, but some displays really don't like the jitter introduced by using a fractional clock. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: ipuv3: use closest fractional dividerLucas Stach2018-11-191-0/+1
| |/ | | | | | | | | | | | | | | | | Currently the divider is always rounded down, which may lead to a rather big overshoot of the display clock. Try to match the clock better by rounding to closest. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / video/ssd1307fb: fix potential memory leak on errorOleksij Rempel2018-11-191-2/+5
|/ | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net-switch-mv88e6xxx'Sascha Hauer2018-11-092-2/+2
|\
| * drivers: Introduce dev_set_name()Andrey Smirnov2018-10-182-2/+2
| | | | | | | | | | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/missing-prototypes'Sascha Hauer2018-11-091-1/+1
|\ \
| * | video: imx-ipu-v3: Make locally used function staticSascha Hauer2018-10-181-1/+1
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-11-094-25/+4
|\ \
| * | i2c: introduce device_i2c_driver() macroMarco Felsch2018-10-193-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rave-sp: backlight: Specify parent device correctlyAndrey Smirnov2018-10-161-0/+1
| |/ | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: at91: remove mach/io.hSascha Hauer2018-11-062-2/+0
|/ | | | | | | Remove at91_sys_read() and at91_sys_write() since these are no longer used. This makes mach/io.h empty so remove that aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-07-092-2/+13
|\
| * video: backlight: add slew time parameterLucas Stach2018-06-212-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video: Port RAVE SP backlight driver from Linux kernelAndrey Smirnov2018-06-213-0/+81
|/ | | | | | | | | | This is a minimal port of a kernel commit 6552d3141064 ("backlight: Add RAVE SP backlight driver"). All of the changes were kept to a minimum and limited to impedance matching between Barebox/Linux driver API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-05-091-1/+0
|\
| * video: tc358767: don't link AUX i2c adapter to parent OF nodeLucas Stach2018-04-251-1/+0
| | | | | | | | | | | | | | | | Otherwise the i2c core will try to populate the TC358767 child nodes as i2c devices, which is wrong. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | 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>
* | fb: reject enable request when framebuffer has no modeLucas Stach2018-04-091-0/+3
|/ | | | | | | | | | If no display is connected or the display modes are incompatible with the scanout hardware we might end up with a registered framebuffer with no modes. Trying to enable such a framebuffer will blow up with NULL ptr dereferences in various places, so just don't do it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-04-061-4/+4
|\
| * video: tc358767: register aux i2c bus after validating linkAndrey Gusakov2018-03-121-4/+4
| | | | | | | | | | | | | | | | | | Register AUX i2c adapter only if AUX link is functional. This should avoid possible hung during tc358767 probe when no display connected. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-04-061-0/+1
|\ \
| * | video: tc358767: set num_modes=0 if no valid mode foundAndrey Gusakov2018-03-261-0/+1
| |/ | | | | | | | | | | | | | | | | | | Since commit f986661 "video: ipu: register framebuffer, even when no modes are found" value returned from VPL_GET_VIDEOMODES ioctl is ignored. So set valid num_modes in error case to avoid crash in register_framebuffer. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / rename file_operations -> cdev_operationsSascha Hauer2018-04-061-1/+1
|/ | | | | | | | Linux also has struct file_operations which are something different. Rename our file_operations to cdev_operations which better matches what we have. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: introduce driver dataSam Ravnborg2018-01-173-25/+63
| | | | | | | | | | | | | | | | | | | | | From b1cb4bbebbe8f2ef7049cdc8604f516bb0108403 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Sat, 6 Jan 2018 14:33:53 +0100 Subject: [PATCH] atmel_lcdfb: introduce driver data Introduce driver data like known from the kernel. This allows us to get rid of the hack where the intensity bit support was included in the lcd wiring mode. (No longer any support for IBGR, IRBG) It has the nice side-effect that all places where we test for hacks can now use flags and not a set of cpu's. So we keep all the configuration in one place. The configuration is included for non-DT users. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove checks for xzalloc() returning NULLUwe Kleine-König2017-09-262-4/+0
| | | | | | | xzalloc() either returns memory or panics, so checking for NULL is useless. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: add DT supportSam Ravnborg2017-09-062-4/+138
| | | | | | | | | | | | | | | | | | | | | | | Some boards use "have_intensity_bit". To support this the syntax for lcd_wiring_mode was extended to include this info. This is an extension compared to the documented bindings, and an extension the kernel does not support (yet). The binding documents that there can be more than one gpio to power on/off the display but current implmentation supports only one gpio. There are no users that requires more than one gpio so this is good enough. The clk name used for hclk differs from device trees and platform data. We could rename the clocl used in platform data but the name "hclk" is not unique. Configure clockname based on configuration method. Devicetree => hclk Platform data => hck1 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: move pdata init to a separate functionSam Ravnborg2017-09-061-24/+41
| | | | | | | | Keep atmel_lcdc_register() readable by separating out pdata handling in a helper function Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: define power_control gpio in platform_dataSam Ravnborg2017-09-062-6/+57
| | | | | | | | | | | | | | | | | | | | | | 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>
* atmel_lcdfb: move lcd_wiring_mode, have_intensity_bit to local dataSam Ravnborg2017-09-062-4/+7
| | | | | | | | | Copy lcd_wiring_mode and have_intensity_bit to atmel_lcdfb_info to minimize dependency on the atmel_lcdfb_platform_data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_lcdfb: move dmacon, lcdcon2 to local dataSam Ravnborg2017-09-064-8/+8
| | | | | | | | Copy dmacon + lcdcon2 to atmel_lcdfb_info to minimize dependency on the atmel_lcdfb_platform_data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tc358767'Lucas Stach2017-07-311-50/+179
|\
| * video: tc358767: accept any hsync and vsync polatiryAndrey Gusakov2017-07-061-6/+7
| | | | | | | | | | | | | | | | Do not fix modes. Instead set any sync polarity passed through VPL_PREPARE and fb_videomode. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: filter out modes with too high pixelclockAndrey Gusakov2017-07-061-0/+83
| | | | | | | | | | | | | | | | | | Minimum pixel clock period is 6.5 nS for DPI. Remove modes with lower pixel clock period. Also sort modes in decreasing order because currently first resolution in list is picked. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: optimize DPCD register writeAndrey Gusakov2017-07-061-11/+13
| | | | | | | | | | Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: optimize aux i2c bus checksAndrey Gusakov2017-07-061-11/+2
| | | | | | | | | | | | | | | | Move common check to tc_aux_i2c_xfer Remove duplicated check from tc_aux_i2c_write Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: support newer DPCD revisions and higher data ratesAndrey Gusakov2017-07-061-4/+16
| | | | | | | | | | | | | | | | | | Do not fail on newer DPCD revision. Assume it backwards compatible. Try to fall back to supported data rate in case display reports too high data rate. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: do not fail if sink supports more than 2 lanesAndrey Gusakov2017-07-061-5/+31
| | | | | | | | | | | | | | Display should support lower lane count for backward compatibility Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix AUXDATAn registers access during writeAndrey Gusakov2017-07-061-2/+2
| | | | | | | | | | | | | | | | | | First four bytes should go to DP0_AUXWDATA0. Due to bug if len > 4 first four bytes was writen to DP0_AUXWDATA1 and all data get shifted by 4 bytes. Fix it. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix timing calculationAndrey Gusakov2017-07-061-10/+13
| | | | | | | | | | | | | | | | Fields in HTIM01 and HTIM02 regs should be even. Recomended thresh_dly value is max_tu_symbol. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix DP0_MISC register setAndrey Gusakov2017-07-061-2/+2
| | | | | | | | | | | | | | | | Remove shift from TU_SIZE_RECOMMENDED define as it used to calculate max_tu_symbols. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>