summaryrefslogtreecommitdiff
path: root/drivers/video
Commit message (Collapse)AuthorAgeLines
* sunxi: display: Use PWM to drive backlight where applicableHans de Goede2016-08-26-0/+11
| | | | | | | | | | | | | | | | | | | | | When the backlight's pwm input is connected to a pwm output of the SoC, actually use pwm to drive the backlight. The mean reason for doing this is to fix the backlight turning off for aprox. 1 second while the kernel is booting. This is caused by the kernel actually using pwm to drive the backlight, so that it can dim the backlight. First the pwm driver loads and switches the pinmux for the pin driving the backlight's pwm input to the pwm controller. Then about 1s later the actual backlight driver loads and tells the pwm driver to actually update the pwm settings, which have a power-on-reset value of "off". An additional advantage is that this allows us to initatiate the backlight at 80%, which is the kernel default, avoiding a brightness change while the kernel loads. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed by: Peter Korsgaard <peter@korsgaard.com>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2016-07-27-1/+3
|\
| * video: allow version string to be optional when using LOGOTim Harvey2016-07-11-1/+3
| | | | | | | | | | | | | | The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the U-Boot version string on top of the logo. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* | rockchip: Use rockchip_get_clk() to obtain the SoC clockSimon Glass2016-07-25-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The current code picks the first available clock. In U-Boot proper this is the oscillator device, not the SoC clock device. As a result the HDMI display does not work. Fix this by calling rockchip_get_clk() instead. Fixes: 135aa950 (clk: convert API to match reset/mailbox style) Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* | Various, unrelated tree-wide typo fixes.Robert P. J. Day2016-07-16-1/+1
|/ | | | | | | | | | | | | | | | | | | Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini2016-07-06-281/+52
|\
| * tegra: video: Always use write-through cache on LCDSimon Glass2016-07-05-18/+3
| | | | | | | | | | | | | | | | This seems to give the best performance, so let's use it always. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * video: tegra: Move to using simple-panel and pwm-backlightSimon Glass2016-07-05-263/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have standard drivers for panels and backlights which can do most of the work for us. Move the tegra20 LCD driver over to use those instead of custom code. This patch includes device tree changes for the nvidia boards. I have only been able to test seaboard. If this patch is applied, these boards will also need to be synced with the kernel, and updated to use display-timings: - colibri - medcom-wide - paz00 - tec Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | rockchip: video: Lower hpd wait timeSjoerd Simons2016-07-05-1/+1
|/ | | | | | | | | | | | | Waiting 30 seconds for the hpd to go high seems a bit much, especially on headless boots. Lowering the timeout to 300ms. Sending as RFC because frankly i don't know what a sensible timeout is here, but 30 seconds is clearly not it :) Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Simon Glass <sjg@chromium.org> Dropped RFC tag: Signed-off-by: Simon Glass <sjg@chromium.org>
* clk: convert API to match reset/mailbox styleStephen Warren2016-06-19-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes are made to the clock API: * The concept of "clocks" and "peripheral clocks" are unified; each clock provider now implements a single set of clocks. This provides a simpler conceptual interface to clients, and better aligns with device tree clock bindings. * Clocks are now identified with a single "struct clk", rather than requiring clients to store the clock provider device and clock identity values separately. For simple clock consumers, this isolates clients from internal details of the clock API. * clk.h is split so it only contains the client/consumer API, whereas clk-uclass.h contains the provider API. This aligns with the recently added reset and mailbox APIs. * clk_ops .of_xlate(), .request(), and .free() are added so providers can customize these operations if needed. This also aligns with the recently added reset and mailbox APIs. * clk_disable() is added. * All users of the current clock APIs are updated. * Sandbox clock tests are updated to exercise clock lookup via DT, and clock enable/disable. * rkclk_get_clk() is removed and replaced with standard APIs. Buildman shows no clock-related errors for any board for which buildman can download a toolchain. test/py passes for sandbox (which invokes the dm clk test amongst others). Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* at91: video: Support driver-model for the LCD driverSimon Glass2016-06-12-0/+91
| | | | | | | | Add driver-model support to this driver. Most features can be controlled from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
* at91: video: Prepare for driver-model conversionSimon Glass2016-06-12-36/+70
| | | | | | | | | Adjust the driver to use struct display_timing for its display timing. This is what is used by driver-model and allows the LCD init code to be common. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
* Merge http://git.denx.de/u-boot-samsungTom Rini2016-06-06-1272/+1353
|\ | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: configs/peach-pi_defconfig configs/peach-pit_defconfig
| * exynos: video: Drop old unused codeSimon Glass2016-05-25-74/+0
| | | | | | | | | | | | | | | | | | Now that we are using driver model, we can drop the weak functions and LCD init in the board file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Convert several boards to driver model for videoSimon Glass2016-05-25-198/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update several boards to use driver model for video. This involves changes to the EDP and FIMD (frame buffer) drivers. Existing PWM, simple-panel and pwm-backlight drivers are used. These work without additional configuration since they use the device tree settings in the same way as Linux. Boards converted are: - snow - spring - peach-pit - peach-pi All have been tested. Not converted: - MIPI display driver - s5pc210_universal - smdk5420 - smdk5250 - trats - trats2 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Rename variables for driver modelSimon Glass2016-05-25-372/+369
| | | | | | | | | | | | | | | | Use 'priv' for a private pointer and 'regs' for a register pointer. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Rename edp_device_info to exynos_dp_privSimon Glass2016-05-25-15/+15
| | | | | | | | | | | | | | | | | | Rename this function to better fit with driver model. It is the private data for the exynos EDP driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: Simplify calling of exynos_dp_phy_ctrl()Simon Glass2016-05-25-7/+2
| | | | | | | | | | | | | | | | This function controls enabling the EDP PHY. Rename it and drop the existing weak functions, which are confusing. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Combine LCD driver into one fileSimon Glass2016-05-25-406/+387
| | | | | | | | | | | | | | | | | | | | At present exynos_fimd.c is the controller and exynos_fb.c is the U-Boot LCD interface. With driver model we want these in one file, so join them in preparation. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Move mipi_lcd_device_dt into a functionSimon Glass2016-05-25-8/+9
| | | | | | | | | | | | | | | | | | In preparation for making this a parameter, move it into the function that sets it up. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Move struct exynos_platform_mipi_dsim into vidinfoSimon Glass2016-05-25-16/+5
| | | | | | | | | | | | | | | | | | Put the pointer to this structure in struct vidinfo so that we can reference it without it being global. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Move dsim_config_dt into a functionSimon Glass2016-05-25-18/+19
| | | | | | | | | | | | | | | | | | In preparation for making this a parameter, move it into the function that sets it up. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Drop static variables in exynos_dp_lowlevel.cSimon Glass2016-05-25-285/+351
| | | | | | | | | | | | | | | | Drop these and use parameters instead. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Drop static variables in exynos_fb.cSimon Glass2016-05-25-6/+2
| | | | | | | | | | | | | | | | Drop these and use the existing variables instead. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Drop static variables in exynos_fimd.cSimon Glass2016-05-25-23/+30
| | | | | | | | | | | | | | | | Drop these and use parameters instead. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Drop the static lcd_base_addr variableSimon Glass2016-05-25-34/+15
| | | | | | | | | | | | | | | | Drop this and use parameters instead. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Remove use of vidinfo_t typedefSimon Glass2016-05-25-11/+11
| | | | | | | | | | | | | | | | | | Use 'struct vidinfo' instead so that we can change this to a struct with a different name in future. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Drop dead codeSimon Glass2016-05-25-26/+0
| | | | | | | | | | | | | | | | | | | | We always use device tree with video, so can drop these #ifdefs. Some of the hardware addresses are not needed either. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: video: Move driver files into their own directorySimon Glass2016-05-25-7/+15
| | | | | | | | | | | | | | | | Move all the exynos video drivers into one place for ease of maintenance. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | rockchip: video: Flush the cache when the display is updatedSimon Glass2016-05-27-0/+1
|/ | | | | | | Enable this option to correct display artifacts when a write-back cache is in use. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-05-17-0/+7
|\
| * video: tegra: refuse to bind to disabled dcsStephen Warren2016-05-17-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the following boot-time message on any board where only the first DC is in use, yet the DC's DT node is enabled: stdio_add_devices: Video device failed (ret=-22) (This happens on at least Harmony, Ventana, and likely any other Tegra20 board with display enabled other than Seaboard). The Tegra DC's DT node represents a display controller. It may itself drive an integrated RGB display output, or be used by some other display controller such as HDMI. For this reason the DC node itself is not enabled/disabled in DT; the DC itself is considered a shared resource, not the final (board-specific) display output. The node should instantiate a display output driver only if the rgb subnode is enabled. Other output drivers are free to use the DC if they are enabled and their DT node references the DC's DT node. Adapt the Tegra display drivers' bind() routine to only bind to the DC's DT node if the RGB subnode is enabled. Now that the display driver does the right thing, remove the workaround for this issue from Seaboard's DT file. Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-bootStefano Babic2016-05-17-7/+23
|\ \ | |/
| * drivers/video/am335x-fb: Properly point framebuffer behind paletteMartin Pietryka2016-04-28-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DMA was outputting the palette on the screen because the base for the DMA was not after the palette. In addition to that, the ceiling was also too high, this led that the output on the screen was shifted. NOTE: According to the TRM, even in 16/24bit mode a palette is required in the first 32 bytes of the framebuffer. See also: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/234967/834483#834483 "In this mode, the LCDC will assume all information is data and thus you need to ensure that the DMA points to the first pixel of data and not the first entry in the frame buffer which is the beginning of the 512 byte palette." Signed-off-by: Martin Pietryka <martin.pietryka@chello.at> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
| * drivers/video/am335x-fb: Add support for 16bpp formatMartin Pietryka2016-04-28-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support 16bpp we just need to change the raster_ctrl register accordingly. Also 32bpp mode should work as well, but was not tested. According to the TRM the uppermost byte will be ignored when LCD_TFT_24BPP_UNPACK is set. The switch logic is based on the Linux kernel tilcdc driver: drivers/gpu/drm/tilcdc/tilcdc_crtc.c: lines 407 through 419 (kernel was checked out at commit: bcc981e9ed8) Signed-off-by: Martin Pietryka <martin.pietryka@chello.at> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
* | video: ipu_common: fix build errorPeng Fan2016-04-28-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | Some toolchains fail to build "clk->rate = (u64)(clk->parent->rate * 16) / div;" And the cast usage is wrong. Use the following code to fix the issue, " do_div(parent_rate, div); clk->rate = parent_rate; " Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Tom Rini <trini@konsulko.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
* drivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definitionMartin Pietryka2016-04-25-1/+1
| | | | | | | According to the TRM you have to set bits [21:20] to 0b10 for RAW mode, so (0x10 << 20) is obviously wrong here. Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
* Revert "pxa_lcd: make driver cache-aware"Tom Rini2016-03-27-16/+0
| | | | | | This reverts commit 59deb7fe8d23c8ec2b659d99323ec4a2ec19148a. Signed-off-by: Tom Rini <trini@konsulko.com>
* Revert "pxa_lcd: invert colors for Zipit Z2 to get white on black palette"Tom Rini2016-03-27-1/+1
| | | | | | This reverts commit 3bc8ffd9cb774feceefc7bdebe9353fcea071343. Signed-off-by: Tom Rini <trini@konsulko.com>
* pxa_lcd: make driver cache-awareVasily Khoruzhick2016-03-27-0/+16
| | | | Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
* pxa_lcd: invert colors for Zipit Z2 to get white on black paletteVasily Khoruzhick2016-03-27-1/+1
| | | | Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
* zipitz2: enable LCD rotationVasily Khoruzhick2016-03-27-0/+1
| | | | | | | z2's screen is rotated by 270 degrees Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
* bcm2835 video: Map fb as cachedAlexander Graf2016-03-27-0/+9
| | | | | | | | | The bcm2835 frame buffer is in RAM, so we can easily map it as cached and gain all the glorious performance boost that brings with it. Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* sunxi: Configure only LVDS pins instead of all LCD pins when LVDS interface ↵Lawrence Yu2016-03-23-0/+4
| | | | | | | | | | | | | | | | | | | selected The behavior before this patch would attempt to configure the mux setting for pins 0 to 27 on PORTD to all be setting 3 for LVDS. The LVDS interface actually only uses pins 18 to 27 and not pins 0 to 27 as in the parallel LCD interface. This patch restricts the configuration to only the relevant pins 18 to 27 on PORTD. This was tested on a sun8i A33 tablet with an LVDS screen. MMC1 has the capability to use pins 2 to 7 on PORTD and the mux on those pins was being inadvertently set to setting 3 for MMC functionality which this patch corrects. Signed-off-by: Lawrence Yu <lyu@micile.com> [hdegoede@redhat.com: Only apply this change to A23 / A33] Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* x86: broadwell: Add video supportSimon Glass2016-03-17-1/+1174
| | | | | | | | | | | | | | Add a video driver for Intel's broadwell integrated graphics controller. This uses a binary blob for most init, with the driver just performing a few basic tasks. This driver supports VESA as the mode-setting mechanism. Since most boards don't support driver model yet with VESA, a special case is added to the Kconfig for broadwell. Eventually all boards will use driver model and this can be removed. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Bin Meng <bmeng.cn@gmail.com>
* video: Allow simple-panel to be used without regulatorsSimon Glass2016-03-17-8/+10
| | | | | | | | | At present simple-panel requires regulator support and will not build without it. But some panels do not have a power supply, or at least not one that can be controlled. Update the implementation to cope with this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* x86: Move asm/arch-coreboot/tables.h to a common placeBin Meng2016-03-17-1/+0
| | | | | | | | Move asm/arch-coreboot/tables.h to asm/coreboot_tables.h so that coreboot table definitions can be used by other x86 builds. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2016-03-15-22/+326
|\
| * video: ipu: avoid overflow issuePeng Fan2016-03-14-19/+54
| | | | | | | | | | | | | | | | | | | | | | Multiplication, as "clk->parent->rate * 16" may overflow. So use do_div to avoid such issue. Signed-off-by: Peng Fan <van.freenix@gmail.com> Signed-off-by: Sandor Yu <sandor.yu@nxp.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com>
| * rockchip: video: Add LVDS support in vop driverJacob Chen2016-03-14-2/+14
| | | | | | | | | | | | | | | | | | | | LVDS have a different display out mode, add code to get right flag. The vop_ip decide display device and the remote_vop_id decide which vop was being used. So we should use the remote_vop_id to set DCLK_VOP. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Acked-by: Simon Glass <sjg@chromium.org>