summaryrefslogtreecommitdiff
path: root/drivers/video
Commit message (Collapse)AuthorAgeLines
* sunxi: video: Add support for tl059wv5c0 lcd panelsHans de Goede2015-02-20-0/+7
| | | | | | | | Add support for the 6" 480x800 tl059wv5c0 panel used on e.g. Utoo P66 and Aigo M60/M608/M606 tablets. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: video: Add support for LCD reset pinHans de Goede2015-02-20-1/+10
| | | | | | | On some boards there is a gpio to reset the LCD panel, add support for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: video: Dynamically reserve framebuffer memoryHans de Goede2015-02-16-5/+13
| | | | | | | | | | Only use CONFIG_SUNXI_MAX_FB_SIZE to reserve memory at the top when relocating u-boot, and calculate the actual amount of memory necessary when setting up the video-mode and use only that, freeing up some additional memory for use by the kernel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: video: Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebufferHans de Goede2015-02-16-1/+21
| | | | | | | | | | | | | | | | | | Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebuffer, instead override board_get_usable_ram_top to make sure that u-boot is not relocated into the area where we want to use the framebuffer, and patch the devicetree from sunxi_simplefb_setup() to tell the kernel to not touch the framebuffer. This makes u-boot properly see the framebuffer as dram, and initalize the level 2 cache for it, fixing the very slow cfb scrolling problem. As an added bonus this stops us from reserving the framebuffer when simplefb is not used because an older kernel is booted, or hdp is used and no hdmi cable was plugged in, freeing up the memory for kernel use in these cases. Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini2015-02-10-3/+6
|\
| * x86: bootstage: Add time measurement for vesa start-upSimon Glass2015-02-05-0/+2
| | | | | | | | | | | | | | | | Since we must run a PCI BIOS ROM, and this can take a calamitous amount of time, measure it using bootstage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: video: Allow video ROM execution to fall back to the other methodSimon Glass2015-02-05-3/+3
| | | | | | | | | | | | | | | | If the BIOS emulator is not available, allow use of native execution if available, and vice versa. This can be controlled by the caller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: video: Enable video for Minnowboard MaxSimon Glass2015-02-05-0/+1
| | | | | | | | | | | | | | This board uses a new PCI ID. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-atmelTom Rini2015-02-10-1/+1
|\ \
| * | ARM: atmel: cleanup: remove at91cap9 related codeBo Shen2015-02-07-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | As the at91cap9adk board is removed by commit: b5508344 (ARM: remove broken "at91cap9adk" board), so the at91cap9 code is not used anymore, and also the document for at91cap9 can not be found on www.atmel.com, so remove the at91cap9 related code. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
* | lcd: introduce lcd_set_cmapNikita Kiryanov2015-02-10-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the lcd_display_bitmap #ifdef complexity by extracting Atmel-specific code for setting cmap for bitmap images into a new function lcd_set_cmap(). A default version is implemented with the remainder of the code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* | lcd: mpc823: move mpc823-specific lcd_logo_set_cmap code to mpc8xx_lcd.cNikita Kiryanov2015-02-10-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the bitmap_plot #ifdef complexity by extracting MPC823-specific code for setting cmap into its own implementation of lcd_logo_set_cmap(), implemented in mpc8xx_lcd.c. In the MPC823 implementation, ARRAY_SIZE(bmp_logo_palette) is switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which would cause a compilation error because the logo data and palette arrays would be defined twice. This is a step towards cleaning bitmap_plot() of platform-specific code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* | lcd: atmel: introduce lcd_logo_set_cmapNikita Kiryanov2015-02-10-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the bitmap_plot #ifdef complexity by extracting Atmel-specific code for setting cmap into a new function lcd_logo_set_cmap(), which is implemented in atmel_lcdfb driver and defined as part of common/lcd.c api with a weak dummy version. In the Atmel implementation, ARRAY_SIZE(bmp_logo_palette) is switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which would cause a compilation error because the logo data and palette arrays would be defined twice. This is a step towards cleaning bitmap_plot() of platform-specific code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* | lcd: mpc8xx: move mpc823-specific fb_put_byte to mpc8xx_lcd.cNikita Kiryanov2015-02-10-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the amount of platform-specific code in common/lcd.c by moving MPC823 implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a default implementation for everybody else, make the remainder of the code into a weak function. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* | lcd: atmel: move atmel-specific fb_put_word to atmel_lcdfbNikita Kiryanov2015-02-10-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the amount of platform-specific code in common/lcd.c by moving Atmel implementation of fb_put_word() to atmel_lcdfb.c. Since we must also have a default implementation for everybody else, make the remainder of the code into a weak function. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Bo Shen <voice.shen@atmel.com> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* | lcd: split configuration_get_cmapNikita Kiryanov2015-02-10-0/+40
|/ | | | | | | | | | | | | | configuration_get_cmap() is multiple platform-specific functions stuffed into one function. Split it into multiple versions, and move each version to the appropriate driver to reduce the #ifdef complexity. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bo Shen <voice.shen@atmel.com> Tested-by: Josh Wu <josh.wu@atmel.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2015-02-02-3/+9
|\
| * sunxi: video: Force h/vsync active high when using ext. vga dac on some boardsHans de Goede2015-02-02-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On both my A13-OLinuxIno and my A13-OLinuxIno-Micro, the vga output gives an unstable image when active low v or hsync is used. The problem seems to be specific to the OLinuxIno A13 (normal & micro) boards. I've just looked up the schematics and they use an opendrain driver for the vga sync lines, and with sync pulses it is the logical high->low edge of the pulse which counts for the timing, which with an active low sync is being driven by the pull-up, and that simply seems to not drive it hard enough to get a stable image. So force v and hsync active high on these boards. independent of what the modeline says. This fixes the unstable image. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | dm: tegra: video: Remove use of fdtdec GPIO supportSimon Glass2015-01-29-34/+20
|/ | | | | | These functions are going away, so use the new uclass support instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINESSimon Glass2015-01-23-9/+17
| | | | | | | | | | | | | Some machines are very slow to scroll their displays. To cope with this, support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows the display to operate at an acceptable speed by scrolling 5 lines at a time. This same option is available for LCDs so when these systems are unified this code can be unified also. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* x86: Drop the x86_fb driverSimon Glass2015-01-23-48/+0
| | | | | | | | Now that we have a full VESA driver we may as well use that. We need to support the VESA layer being set up by early start-up code or by running a VGA ROM. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add a VESA video driverSimon Glass2015-01-23-0/+75
| | | | | | | | | Add a driver intended to cope with any VESA-compatible x86 graphics adapter. It will not support ROMs which use OpenFirmware (Forth) since there is no support for that in U-Boot. This means that MAC OS cards will not work. Signed-off-by: Simon Glass <sjg@chromium.org>
* powerpc: mpc5xxx: remove Total5200 board supportMasahiro Yamada2015-01-23-8/+0
| | | | | | This board is still a non-generic board. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* sunxi: video: Make pwm polarity configurableHans de Goede2015-01-23-6/+11
| | | | | | | | It turns out that there are some panels where the pwm input is not active low, so make it configurable. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: video: Add support for Hitachi tx18d42vm LVDS LCD panelsHans de Goede2015-01-23-0/+5
| | | | | | | | | | Add support for Hitachi tx18d42vm LVDS LCD panels, these panels have a lcd controller which needs to be initialized over SPI, once that is done they work like a regular LVDS panel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* video: Add support for Hitachi tx18d42vm LVDS LCD panelsHans de Goede2015-01-22-3/+103
| | | | | | | | | Add support for Hitachi tx18d42vm LVDS LCD panels, these panels have a lcd controller which needs to be initialized over SPI, once that is done they work like a regular LVDS panel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
* sunxi: video: Use frontend for dma on sun4i to fix memory bandwidth problemsHans de Goede2015-01-22-4/+130
| | | | | | | | | | | | | | | | | | | | Testing has shown that on sun4i the display backend engine does not have deep enough fifo-s causing flickering / tearing in full-hd mode due to fifo underruns. On sun4i use the display frontend engine to do the dma from memory, as the frontend does have deep enough fifo-s. As added advantage of this is that it results in much better memory bandwidth as it reduces the amount of dram bank switches, for more details see: http://ssvb.github.io/2014/11/11/revisiting-fullhd-x11-desktop-performance-of-the-allwinner-a10.html Note that this changes the pipeline searched for in the simplefb node, we can get away with doing this now, since no kernel has yet shipped with simplefb dtb nodes, and I will make sure to get a simplefb node with the new pipeline into 3.19 before it ships. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* video: ssd2828: Allow using 'pclk' as the PLL clock sourceSiarhei Siamashka2015-01-22-7/+28
| | | | | | | | | | | | | | | | | | | Instead of using the internal 'tx_clk' clock source, it is also possible to use the pixel clock signal from the parallel LCD interface ('pclk') as the reference clock for PLL. The 'tx_clk' clock speed may be different on different boards/devices (the allowed range is 8MHz - 30MHz). Which is not very convenient, especially considering the need to know the exact 'tx_clk' clock speed. This clock speed may be difficult to identify without having device schematics and/or accurate documentation/sources every time. Using 'pclk' is free from all these problems. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Anatolij Gustschin <agust@denx.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* video: sunxi: Hook up SSD2828 with the sunxi video driverSiarhei Siamashka2015-01-22-0/+38
| | | | | | | | | | Convert GPIO names from Kconfig strings into pin numbers for the 'ssd2828_config' struct. Add SSD2828 initialization between enabling the parallel LCD interface and turning on the backlight. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* video: Add support for SSD2828 (parallel LCD to MIPI bridge)Siarhei Siamashka2015-01-22-0/+616
| | | | | | | | | | | | | | | | | | | SSD2828 can take pixel data coming from a parallel LCD interface and translate it on the fly into MIPI DSI interface for driving a MIPI compatible TFT display. SSD2828 is configured over SPI interface, which may or may not have MISO pin wired up on some hardware. So a write-only SPI mode also has to be supported. The SSD2828 support code is implemented as a utility function and needs to be called from real display drivers, which are responsible for driving parallel LCD hardware in front of the video pipeline. The usage instructions are provided as comments in the header file. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Anatolij Gustschin <agust@denx.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* sunxi: display: Make lcd display clk phase configurableHans de Goede2015-01-22-6/+1
| | | | | | | | | | | | | | | | | | | | While running some tests with an Olinuxino-A13-Micro + a 7" Olimex LCD module I noticed that the screen flickered. This is caused by the lcd display clk phase reg value being set to 0, where it should be 1 in this setup. This commit adds a Kconfig option for the lcd display clk phase, so that we can set it per board. This defaults to 1, because looking at all the fex files in sunxi-boards, that is by far the most used value. This commit updated the Ippo and MSI Primo73 tablet defconfigs to override the default of 1 with 0, as that is the correct value for those tablets, this keeps the register settings the same as before this commit. The Olinuxino-A13 defconfigs are not updated, changing the register setting for these boards from 0 to 1, this is intentional. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* ppc4xx: remove dead codeMasahiro Yamada2015-01-16-10/+0
| | | | | | | | | | | | Since commit 843125daebd7 (ppc4xx: remove HH405 board), CONFIG_HH405 is not defined. Since commit d52633047913 (ppc4xx: remove PMC405), CONFIG_PMC405 is not defined. Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
* Merge branch 'next' of git://git.denx.de/u-boot-videoTom Rini2015-01-14-63/+1
|\
| * lcd: remove LCD_MONOCHROMENikita Kiryanov2015-01-10-32/+0
| | | | | | | | | | | | | | | | | | No one is using LCD_MONOCHROME; remove related code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| * mpc8xx_lcd: get rid of CONFIG_EDT32F10Nikita Kiryanov2015-01-10-28/+0
| | | | | | | | | | | | | | | | | | No one is using CONFIG_EDT32F10; remove related code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| * lcd: remove CONFIG_SYS_INVERT_COLORSNikita Kiryanov2015-01-10-3/+1
| | | | | | | | | | | | | | | | | | No one is using CONFIG_SYS_INVERT_COLORS; remove related code. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
* | sunxi: video: Add support for external DAC enable pinChen-Yu Tsai2015-01-14-0/+14
| | | | | | | | | | | | | | | | | | | | The external DAC for VGA output might have either a power or reset control pin that needs to be pulled up, as is the case on the Hummingbird A31. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | sunxi: video: Add lvds supportHans de Goede2015-01-14-2/+35
| | | | | | | | | | | | | | Add support for lvds lcd panels Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
* | sunxi: video: Add a hpd_delay parameter to configure hpd delayHans de Goede2015-01-14-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | In some extreme cases it may be necessary to wait 1.5 seconds or more for a hpd signal to show up (and be able to read edid info), but we do not want to penalize all headless boots with an extra second boot delay, so add a hpd_delay parameter which can be set through the video-mode env. variable. While at it raise the default from 300ms to 500ms as 300 may very well be too low in many cases. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Add VGA output supportHans de Goede2015-01-14-8/+52
| | | | | | | | | | | | | | Add support for VGA directly from the sunxi SoC / display engine. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Fallback from HDMI to VGA on boards with VGAHans de Goede2015-01-14-22/+29
| | | | | | | | | | | | | | | | If a board has no LCD, but does have VGA fallback to VGA when no HDMI cable is connected (unless hpd=0). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Add support for using PORTD hsync/vsync pins with tcon1Hans de Goede2015-01-14-3/+19
| | | | | | | | | | | | | | | | Add support for using PORTD hsync/vsync pins with tcon1, this is a preparation patch for adding native VGA support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Use sunxi_lcdc_get_clk_delay to calculate tcon1 delayHans de Goede2015-01-14-3/+3
| | | | | | | | | | | | | | | | | | Use sunxi_lcdc_get_clk_delay to calculate tcon1 delay instead of hardcoding it to 30. We will still end up using 30 for most modes, but for e.g. 800x600 this makes a (small) difference. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Remove sunxi_display.enabled variableHans de Goede2015-01-14-6/+6
| | | | | | | | | | | | | | | | | | Having both a sunxi_display.enabled variable and sunxi_display.monitor == sunxi_monitor_none duplicates state, use sunxi_display.monitor = sunxi_monitor_none when ever we do not have a display. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Add support for VGA via external DACs connected to the LCD pinsHans de Goede2015-01-14-0/+14
| | | | | | | | | | | | | | | | Add support for external DACs connected to the parallel LCD interface driving a VGA connector, such as found on the Olimex A13 boards. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Enable video on sun8i, which supports LCD but not HDMIHans de Goede2015-01-14-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The A23 (sun8i) only has lcd output support, so allow building the video code without HDMI support for use with the A23. Also the A23 has the same reset bits (and necessity to enable the DRC block) as the sun6i, so enable those bits for sun8i too. Note building without HDMI support is useful for the A13 (sun5i variant) too, as that one does not have HDMI either. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Add lcd output supportHans de Goede2015-01-14-9/+171
| | | | | | | | | | | | | | | | Add lcd output support, see the new Kconfig entries and doc/README.video for how to enable / configure this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Move sunxi_drc_initHans de Goede2015-01-14-14/+12
| | | | | | | | | | | | | | | | Move sunxi_drc_init to directly above sunxi_engines_init, to avoid unnecessary #ifdef-ery in later patches. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Modify sunxi_lcdc_pll_set to work with both tcon0 and tcon1Hans de Goede2015-01-14-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Modify sunxi_lcdc_pll_set to work with both tcon0 and tcon1, this is a preparation patch for adding lcd support. While at it also swap the divider search order, searching from low to high, as the comment above the code says we should do. In cases where there are multiple solutions this will result in picking a lower pll clock and divider, which is more stable and saves power. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | sunxi: video: Prepare for lcd supportHans de Goede2015-01-14-32/+70
| | | | | | | | | | | | | | | | | | | | | | | | Refactor sunxi_mode_set into a bunch of helpers, and make it do a switch case on sunxi_display.monitor to decide what to do. Also rename sunxi_lcdc_mode_set to sunxi_lcdc_tcon1_mode_set, as it sets the timings for tcon1, and for lcd support we need a similar function operating on tcon0. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>