summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2016-05-27rockchip: video: Flush the cache when the display is updatedSimon Glass
Enable this option to correct display artifacts when a write-back cache is in use. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-25exynos: video: Drop old unused codeSimon Glass
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>
2016-05-25exynos: video: Convert several boards to driver model for videoSimon Glass
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>
2016-05-25exynos: video: Rename variables for driver modelSimon Glass
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>
2016-05-25exynos: video: Rename edp_device_info to exynos_dp_privSimon Glass
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>
2016-05-25exynos: Simplify calling of exynos_dp_phy_ctrl()Simon Glass
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>
2016-05-25exynos: video: Combine LCD driver into one fileSimon Glass
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>
2016-05-25exynos: video: Move mipi_lcd_device_dt into a functionSimon Glass
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>
2016-05-25exynos: video: Move struct exynos_platform_mipi_dsim into vidinfoSimon Glass
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>
2016-05-25exynos: video: Move dsim_config_dt into a functionSimon Glass
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>
2016-05-25exynos: video: Drop static variables in exynos_dp_lowlevel.cSimon Glass
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>
2016-05-25exynos: video: Drop static variables in exynos_fb.cSimon Glass
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>
2016-05-25exynos: video: Drop static variables in exynos_fimd.cSimon Glass
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>
2016-05-25exynos: video: Drop the static lcd_base_addr variableSimon Glass
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>
2016-05-25exynos: video: Remove use of vidinfo_t typedefSimon Glass
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>
2016-05-25exynos: video: Drop dead codeSimon Glass
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>
2016-05-25exynos: video: Move driver files into their own directorySimon Glass
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>
2016-05-17Merge git://git.denx.de/u-boot-dmTom Rini
2016-05-17video: tegra: refuse to bind to disabled dcsStephen Warren
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>
2016-05-17Merge branch 'master' of git://git.denx.de/u-bootStefano Babic
2016-04-28drivers/video/am335x-fb: Properly point framebuffer behind paletteMartin Pietryka
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>
2016-04-28drivers/video/am335x-fb: Add support for 16bpp formatMartin Pietryka
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>
2016-04-28video: ipu_common: fix build errorPeng Fan
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>
2016-04-25drivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definitionMartin Pietryka
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>
2016-03-27Revert "pxa_lcd: make driver cache-aware"Tom Rini
This reverts commit 59deb7fe8d23c8ec2b659d99323ec4a2ec19148a. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-27Revert "pxa_lcd: invert colors for Zipit Z2 to get white on black palette"Tom Rini
This reverts commit 3bc8ffd9cb774feceefc7bdebe9353fcea071343. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-27pxa_lcd: make driver cache-awareVasily Khoruzhick
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2016-03-27pxa_lcd: invert colors for Zipit Z2 to get white on black paletteVasily Khoruzhick
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2016-03-27zipitz2: enable LCD rotationVasily Khoruzhick
z2's screen is rotated by 270 degrees Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
2016-03-27bcm2835 video: Map fb as cachedAlexander Graf
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>
2016-03-23sunxi: Configure only LVDS pins instead of all LCD pins when LVDS interface ↵Lawrence Yu
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>
2016-03-17x86: broadwell: Add video supportSimon Glass
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>
2016-03-17video: Allow simple-panel to be used without regulatorsSimon Glass
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>
2016-03-17x86: Move asm/arch-coreboot/tables.h to a common placeBin Meng
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>
2016-03-15Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2016-03-14video: ipu: avoid overflow issuePeng Fan
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>
2016-03-14dm: Use uclass_first_device_err() where it is usefulSimon Glass
Use this new function in places where it simplifies the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14rockchip: video: Add LVDS support in vop driverJacob Chen
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>
2016-03-14rockchip: video: Add a display driver for rockchip LVDSJacob Chen
Some Rockchip SoCs support LVDS output. Add a display driver for this so that these displays can be used on supported boards. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-03-14dm: video: Add a operation to display uclassJacob Chen
The current display class only allow to get timing from edid. So add a operation to get timing directly from driver. In driver, I will use fdtdec_decode_display_timing to get timing. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-02-22video: Add S3C24xx framebuffer supportMarek Vasut
Add basic framebuffer driver for the S3C24xx family of CPUs. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Vladimir Zapolskiy <vz@mleia.com> V2: Keep the Makefile sorted. Acked-by: Anatolij Gustschin <agust@denx.de>
2016-02-22video: freetype: Fix a memory leak with a bad parameterSimon Glass
Make sure to free memory used when the scale facture is incorrect. Reported-by: Coverity (CID: 24068) Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-22video: truetype: Fix a memory leak on errorSimon Glass
When the resolution is not supported we should free the memory we don't plan to use. Reported-by: Coverity (CID: 135127) Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-16tegra: video: Move LCD driver to use the DM PWM driverSimon Glass
Use the driver-model PWM driver in preference to the old code. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Move all fdt-decoding into a single functionSimon Glass
Join the two functions which decode the device tree and put them in the ofdata_to_platdata() method. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Move LCD enums into the driverSimon Glass
There is no need to have these in a separate file as they are not referenced from anywhere else. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Remove the static variablesSimon Glass
We can move the static variables into the driver-private data. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Convert tegra20 LCD driver to driver modelSimon Glass
Move this driver over to use driver model. This involves rearranging the code somewhat. The effect is that everything is run from the probe() method. Boards which use this are fixed up, but only seaboard is tested. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Merge the two config structures togetherSimon Glass
We have a structure for the display panel and another for the controller. There is some overlap between them. Merge them to simplify the driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16tegra: video: Move the check for CONFIG_OF_CONTROL to KconfigSimon Glass
We can check this in Kconfig now. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>