summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* OMAPDSS: connector-analog-tv: Add DT supportTomi Valkeinen2014-03-191-2/+41
| | | | | | | Add DT support for connector-analog-tv. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: hdmi-connector: Add DT supportTomi Valkeinen2014-03-191-0/+30
| | | | | | | Add DT support for hdmi-connector. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: encoder-tpd12s015: Add DT supportTomi Valkeinen2014-03-191-0/+56
| | | | | | | Add DT support for encoder-tpd12s015. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: connector-dvi: Add DT supportTomi Valkeinen2014-03-191-0/+43
| | | | | | | Add DT support for connector-dvi. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: encoder-tfp410: Add DT supportTomi Valkeinen2014-03-191-1/+42
| | | | | | | Add DT support for encoder-tfp410. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: panel-dsi-cm: Add DT supportTomi Valkeinen2014-03-191-4/+56
| | | | | | | Add DT support for panel-dsi-cm. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Add DT support to DSITomi Valkeinen2014-03-191-1/+138
| | | | | | | | | | | | | | Add the code to make the DSI driver work with device tree on OMAP3 and OMAP4. A minor hack is needed at the moment in the DSI driver: the DSS driver needs to know the ID number of a DSI device, as clocks are routed in different ways to the DSI devices. At the moment we don't have any proper way to manage this, so this patchs adds a simple lookup table that is used to deduce the ID from the DSI device's base address. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Add DT support to VENCTomi Valkeinen2014-03-191-0/+61
| | | | | | | | | | Add DT support to VENC. In contrast to non-DT version, the DT version gets the invert-polarity and connector type via venc's endpoint, not from the connector. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Add DT support to HDMITomi Valkeinen2014-03-191-0/+6
| | | | | | | | Add DT support to HDMI driver. The only thing needed for DT support here is the of_match_table. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Add DT support to DISPCTomi Valkeinen2014-03-191-0/+8
| | | | | | | Add DT support to DISPC. Only thing needed here is the of_match_table. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Add DT support to DSSTomi Valkeinen2014-03-194-0/+164
| | | | | | | | | | | | | | Add DT support for DSS. Contrary to the non-DT version, the DSS in DT mode contains DPI and SDI outputs, which better reflects the hardware. The non-DT code will be removed after all boards have been converted to DT, so there's no need to change the non-DT code to act the same way. The code for DPI and SDI needs to be refined later to make it possible to add multiple DPI ports. For now, handling just a single DPI port is enough for all the boards. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: Improve regulator names for DTTomi Valkeinen2014-03-193-3/+12
| | | | | | | | | | | | | | | | | | | The regulator names used for DSS components are somewhat ugly for DT use. As we're just adding DT support, it's simple to change the regulator names. This patch makes the DSS driver get the regulators with somewhat cleaner names when bootin with DT. For example, this allows us to define HDMI's VDDA regulator in the DT data as: vdda-supply = <...>; instead of vdda_hdmi_dac-supply = <...>; Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: add of helpersTomi Valkeinen2014-03-192-1/+160
| | | | | | | | | | | | | Add helpers to get ports and endpoints from DT data. These helpers parse v4l2 style ports and endpoints, but compared to the v4l2 helpers, these allow iterating ports and endpoints separately. This is a temporary solution until we get generic code to parse the ports and endpoints. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPFB: search for default display with DT aliasTomi Valkeinen2014-03-191-1/+22
| | | | | | | | | Improve the search for the default display in two ways: * compare the given display name to the display's alias * if no display name is given, look for "display0" DT alias Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPFB: clean up default display searchTomi Valkeinen2014-03-191-17/+29
| | | | | | | | Separate the code for finding the default display into a function for clarity and to make it easier to extend it in the future. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: get dssdev->alias from DT aliasTomi Valkeinen2014-03-191-2/+17
| | | | | | | | | | | | | | | | | | We currently create a "displayX" style alias name for all displays, using a number that is incremented for each registered display. With the new DSS device model there is no clear order in which the displays are registered, and thus the numbering is somewhat random. This patch improves the behavior for DT case so that if the displays have been assigned DT aliases, those aliases will be used as DSS aliases. This means that "display0" is always the one specified in the DT alias, and thus display0 can be used as default display in case the user didn't specify a default display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: add 'label' support for DTTomi Valkeinen2014-03-191-0/+9
| | | | | | | | | Add support to get the label (i.e. a "nickname") for a display from the DT data. If there is no label defined, use the display's alias (e.g. 'display0') as a name. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* video: Kconfig: Allow more broad selection of the imxfb framebuffer driver.Denis Carikli2014-02-141-1/+1
| | | | | | | | | | | | | | | | | | Without that patch, a user can't select the imxfb driver when the i.MX25 and/or the i.MX27 device tree board are selected and that no boards that selects IMX_HAVE_PLATFORM_IMX_FB are compiled in. Cc: Eric Bénard <eric@eukrea.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Denis Carikli <denis@eukrea.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: exynos: Fix S6E8AX0 LCD driver build errorSachin Kamat2014-02-141-1/+2
| | | | | | | | | | | Enable S6E8AX0 LCD driver only if LCD_CLASS_DEVICE is a built-in driver. Else we get the following errors due to missing symbols: drivers/built-in.o: In function `s6e8ax0_probe': :(.text+0x51aec): undefined reference to `lcd_device_register' :(.text+0x51c44): undefined reference to `lcd_device_unregister' Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: fix fck field typesTomi Valkeinen2014-02-112-2/+2
| | | | | | | | | | 'fck' field in dpi and sdi clock calculation struct is 'unsigned long long', even though it should be 'unsigned long'. This hasn't caused any issues so far. Fix the field's type. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: decimation rounding fixTomi Valkeinen2014-02-111-8/+8
| | | | | | | | | | | | | | | | | | | | | The driver uses DIV_ROUND_UP when calculating decimated width & height. For example, when decimating with 3, the width is calculated as: width = DIV_ROUND_UP(width, decim_x); This yields bad results for some values. For example, 800/3=266.666..., which is rounded to 267. When the input width is set to 267, and pixel increment is set to 3, this causes the dispc to read a line of 801 pixels, i.e. it reads a wrong pixel at the end of the line. Even more pressing, the above rounding causes a BUG() in pixinc(), as the value of 801 is used to calculate row increment, leading to a bad value being passed to pixinc(). This patch fixes the decimation by removing the DIV_ROUND_UP()s when calculating width and height for decimation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* parisc/sti_console: prefer Linux fonts over built-in ROM fontsHelge Deller2014-02-021-1/+1
| | | | | | | | | | The built-in ROM fonts lack many necessary ASCII characters, which is why it makes sens to prefer the Linux fonts instead if they are available. This makes consoles on STI graphics cards which are not supported by the stifb driver (e.g. Visualize FXe) looks much nicer. Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v3.13
* drivers/video/backlight/lcd.c: call put_device if device_register failsLevente Kurusa2014-01-311-1/+1
| | | | | | | | | | | | | Currently we kfree the container of the device which failed to register. This is wrong as the last reference is not given up with a put_device call. Also, now that we have put_device() callen, we no longer need the kfree as the new_ld->dev.release function will take care of kfreeing the associated memory. Signed-off-by: Levente Kurusa <levex@linux.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2014-01-302-11/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm updates from Dave Airlie: "Been a bit busy, first week of kids school, and waiting on other trees to go in before I could send this, so its a bit later than I'd normally like. Highlights: - core: timestamp fixes, lots of misc cleanups - new drivers: bochs virtual vga - vmwgfx: major overhaul for their nextgen virt gpu. - i915: runtime D3 on HSW, watermark fixes, power well work, fbc fixes, bdw is no longer prelim. - nouveau: gk110/208 acceleration, more pm groundwork, old overlay support - radeon: dpm rework and clockgating for CIK, pci config reset, big endian fixes - tegra: panel support and DSI support, build as module, prime. - armada, omap, gma500, rcar, exynos, mgag200, cirrus, ast: fixes - msm: hdmi support for mdp5" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (595 commits) drm/nouveau: resume display if any later suspend bits fail drm/nouveau: fix lock unbalance in nouveau_crtc_page_flip drm/nouveau: implement hooks for needed for drm vblank timestamping support drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping drm/nv50: fill in crtc mode struct members from crtc_mode_fixup drm/radeon/dce8: workaround for atom BlankCrtc table drm/radeon/DCE4+: clear bios scratch dpms bit (v2) drm/radeon: set si_notify_smc_display_change properly drm/radeon: fix DAC interrupt handling on DCE5+ drm/radeon: clean up active vram sizing drm/radeon: skip async dma init on r6xx drm/radeon/runpm: don't runtime suspend non-PX cards drm/radeon: add ring to fence trace functions drm/radeon: add missing trace point drm/radeon: fix VMID use tracking drm: ast,cirrus,mgag200: use drm_can_sleep drm/gma500: Lock struct_mutex around cursor updates drm/i915: Fix the offset issue for the stolen GEM objects DRM: armada: fix missing DRM_KMS_FB_HELPER select drm/i915: Decouple GPU error reporting from ring initialisation ...
| * Merge tag 'omapdrm-3.14' of ↵Dave Airlie2014-01-291-1/+0Star
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm patches for 3.14 * tag 'omapdrm-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: drm/omap: Enable DT support for DMM drm/omap: fix: change dev_unload order drm/omap: fix: disable encoder before destroying it drm/omap: fix: disconnect devices when omapdrm module is removed drm/omap: fix: Defer probe if an omapdss device requests for it at connect drm/omap: fix (un)registering irqs inside an irq handler Conflicts: drivers/gpu/drm/omapdrm/omap_drv.c
| | * drm/omap: fix (un)registering irqs inside an irq handlerTomi Valkeinen2014-01-091-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapdrm (un)registers irqs inside an irq handler. The problem is that the (un)register function uses dispc_runtime_get/put() to enable the clocks, and those functions are not irq safe by default. This was kind of fixed in 48664b21aeeffb40c5fa06843f18052e2c4ec9ef (OMAPDSS: DISPC: set irq_safe for runtime PM), which makes dispc's runtime calls irq-safe. However, using pm_runtime_irq_safe in dispc makes the parent of dispc, dss, always enabled, effectively preventing PM for the whole DSS module. This patch makes omapdrm behave better by adding new irq (un)register functions that do not use dispc_runtime_get/put, and using those functions in interrupt context. Thus we can make dispc again non-irq-safe, allowing proper PM. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Rob Clark <robdclark@gmail.com>
| * | video/fb: Propagate error code from failing to unregister conflicting fbChris Wilson2013-12-181-10/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | If we fail to remove a conflicting fb driver, we need to abort the loading of the second driver to avoid likely kernel panics. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge tag 'pwm/for-3.14-rc1' of ↵Linus Torvalds2014-01-271-1/+0Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm changes from Thierry Reding: "The patches for this release cycle include various enhancements (device tree support, better compile coverage, ...) for existing drivers. There is a new driver for Atmel SoCs. Various drivers as well as the sysfs support received minor fixes and cleanups" * tag 'pwm/for-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: tiecap: Remove duplicate put_sync call pwm: tiehrpwm: use dev_err() instead of pr_err() pwm: pxa: remove unnecessary space before tabs pwm: ep93xx: split module author names pwm: use seq_puts() instead of seq_printf() pwm: atmel-pwm: Do not unprepare clock after successful registration of: Add Atmel PWM controller device tree binding pwm: atmel-pwm: Add Atmel PWM controller driver backlight: pwm_bl: Remove error message upon devm_kzalloc() failure pwm: pca9685: depends on I2C rather than REGMAP_I2C pwm: renesas-tpu: Enable driver compilation with COMPILE_TEST pwm: jz4740: Use devm_clk_get() pwm: jz4740: Pass device to clk_get() pwm: sysfs: Convert to use ATTRIBUTE_GROUPS macro pwm: pxa: Add device tree support
| * | backlight: pwm_bl: Remove error message upon devm_kzalloc() failureFabio Estevam2013-12-171-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | No need to have a specific OOM message, since there is generic MM out of memory message in place. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* | | Merge tag 'fbdev-3.14' of ↵Linus Torvalds2014-01-2539-400/+945
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev changes from Tomi Valkeinen: "This is a rather boring pull request. There is one new fb driver, OpenCores VGA/LCD, but other than that it's just minor cleanups and fixes" * tag 'fbdev-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (51 commits) i810: delete useless variable video: add OpenCores VGA/LCD framebuffer driver video/logo: Remove MIPS-specific include section tgafb: potential NULL dereference in init video: mmp: Using plain integer as NULL pointer video: mmp: delete a stray mutex_unlock() video: amba-clcd: Make CLCD driver available on more platforms video: Replace local macro with PCI standard macro fbmem: really support wildcard video=options for all fbdev drivers video: vgacon: Don't build on arm64 video: mx3fb: Allow blocking during framebuffer allocation fbcon: Fix memory leak in fbcon_exit(). fbcon: trivial optimization for fbcon_exit video: pxa168fb: Cleanup pxa168fb.h file video: pxa: Cleanup video-pxafb.h header video: msm: Cleanup video-msm_fb.h header video: ep93xx: Cleanup video-ep93xx.h header video: mxsfb: fix broken videomode selection video: mxsfb: convert pr_debug()/dev_dbg() to pr_err()/dev_err() for error messages video: vmlfb: remove unnecessary pci_set_drvdata() ...
| | \ \
| | \ \
| *-. \ \ Merge branches '3.14/fbdev', '3.14/dss-misc' and '3.14/dss-fclk' into for-nextTomi Valkeinen2014-01-2022-290/+412
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Merge fbdev topic branches
| | | * | | OMAPDSS: add dedicated fck PLL supportTomi Valkeinen2013-11-181-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for SoCs that have a dedicated DSS PLL used for DSS function clock. If there is no dss parent clock defined, it is presumed that the functionl clock rate can be set (almost) freely. The code calculates the highest allowed fck rate, which when divided with some integer gives the required pck. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: pass pck to dss fck clock calcTomi Valkeinen2013-11-184-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need the required pixel clock rate when calculating the dss fclk on SoCs that have a dedicated DSS PLL. This patch changes the code to pass the pck to the calc functions. The pck rate is taken into use in the next patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: cleanup fck parent handlingTomi Valkeinen2013-11-182-28/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dss parent_clk_name currently points to a clock node which we use to change the fclk rate. Now that we have CLK_SET_RATE_PARENT properly set, we can set the rate directly to the fclk node. However, we still need to calculate the possible clock rates. For this, we need the rate of the parent of the current parent_clk. To simplify the code, this patch changes the parent_clk_name to point to the above mentioned parent, so that we can get the rate directly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: rename parent clk variablesTomi Valkeinen2013-11-181-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the variables related to DSS fclk's parent: "clk_name" and "dpll4_m4_ck", to "parent_clk_name" and "parent_clk", which much better tell what they mean. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: simplify dss clk dumpTomi Valkeinen2013-11-181-17/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify dss_dump_clocks() so that it doesn't make any presumptions about the DSS fclks nature. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: remove struct dss_clock_infoTomi Valkeinen2013-11-184-74/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove struct dss_clock_info, as it is not usable in a case where DSS fclk comes from a dedicated PLL. Instead, just use the fclk rate in place of dss_clock_info, as that is all that's needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | | * | | OMAPDSS: fix omap2 dss fck handlingTomi Valkeinen2013-11-181-7/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver considers OMAP2 DSS's functional clock as a fixed clock. However, it can be changed, but the possible dividers are not continuous which is why it was just handled as a fixed clock. As a partial fix, this patch changes the code to handle the continous part of the dividers, from 1 to 6. This let's us handle the OMAP2 fck the same way as fcks on other OMAPs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: Fix 34xx overlay scaling calculationIvaylo Dimitrov2014-01-141-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 7faa92339bbb1e6b9a80983b206642517327eb75 OMAPDSS: DISPC: Handle synclost errors in OMAP3 introduces limits check to prevent SYNCLOST errors on OMAP3. However, it misses the logic found in Nokia kernels that is needed to correctly calculate whether 3 tap or 5 tap rescaler to be used as well as the logic to fallback to 3 taps if 5 taps clock results in too tight horizontal timings. Without that patch "horizontal timing too tight" errors are seen when a video with resolution above 640x350 is tried to be played. The patch is a forward-ported logic found in Nokia N900 and N9/50 kernels. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: panel-acx565akm: clean-up lockingTomi Valkeinen2014-01-131-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The locking in the acx565akm panel driver was getting too complex. Clean it up by making new functions, acx565akm_bl_get_intensity_locked and acx565akm_bl_update_status_locked, which are called by the backlight subsystem. This way the non-locked versions can be called by the panel's other funcs, simplifying the lock management. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: Preload more data in pipeline DMAs for OMAP4+ SoCsArchit Taneja2014-01-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DISPC pipeline DMAs preload some bytes of pixel data in the vertical blanking region before the start of each frame. The preload ensures the pipeline doesn't underflow when the active region of the display starts. DISPC_GFX/VIDp_PRELOAD registers allow us to program how many bytes of data should be preloaded for each pipeline. Calculating a precise preload value would be a complex function of the pixel clock of the connected display, the vertical blanking duration and the interconnect traffic at that instance. If the register is left untouched, a default value is preloaded. We observe underflows for OMAP4+ SoCs for certain bandwidth intensive use cases with many other initiators active, and in situations where memory access isn't very efficient(like accessing Tiler mapped buffers and EMIF configured in non-interleaved more). The cause of the underflow is because the default preload value isn't sufficient for the DMA to reach a steady state. We configure the PRELOAD register such that the pipelines preload data up to the high threshold of the FIFO. Preloading lot of data for older SoCs can have a negative impact. Due to slower interconnects, it's possible that the DISPC DMA cannot preload up to the high threshold within the vertical blanking region of the panel. We leave the PRELOAD registers to their reset values since we haven't faced underflows with these SoCs because of low value of PRELOAD. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: disable overlays on driver removalTomi Valkeinen2014-01-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When omapfb module is removed, the driver will turn off all the displays it manages. However, it leaves the overlays enabled. While the overlays are obviously disabled as the displays are disabled, it causes issues when the driver module is loaded again, as at that point the overlays are still enabled on the hardware level. The result is that even if the SW thinks overlays are disabled, they are actually enabled. Fix this by making sure the overlays are disabled at module removal. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: don't print errors on -EPROBE_DEFERTomi Valkeinen2014-01-135-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nowadays it's normal to get -EPROBE_DEFER from, e.g., regulator_get. As -EPROBE_DEFER is not really an error, and the driver will be probed fine a bit later, printing an error message will just confuse the user. This patch changes omapdss to print an error for regulator_gets only if the error code is something else than -EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: give informative print when probe succeedsTomi Valkeinen2014-01-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is quite common to have omapfb probe deferred because of a missing resource, and to get omapfb probed succesfully a bit later. This works fine. However, omapfb does not give any print on a successful probe, so if the omapfb is actually never probed again after deferral, this is not shown in the log. To help debugging, add a simple print from omapfb at the end of its probe, saying which display it is using and in which resolution. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: rename resource namesTomi Valkeinen2014-01-134-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HDMI driver tries to get the needed memory resources by name and by ID. Resources by name are not currently defined, and will be used with DT boot. The resource names used in the driver are not quite perfect, and as they are not used yet, we can change them. This patch removes the unneeded "hdmi_" prefix from the names, and simplifies the names (e.g. hdmi_txphy -> phy). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DSI: split DSI memory map to smaller blocksTomi Valkeinen2014-01-131-59/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DSI contains three separate blocks: protocol engine, PHY and PLL. At the moment, all these are memory mapped in one big chunk. We need to split that memory map into smaller pieces so that we can add proper 'reg' properties into the DT data for each block. This patch changes the driver to map the blocks separately. It first tries to get the memory resource using name, used when booting with DT, and if that fails, it gets the memory resource by ID, in which case the driver gets the big chunk from platform data. That big chunk is then split into the smaller blocks manually. After DSS DT code has been merged and the old platform code removed, we can clean up the memory resource management. Instead of changing the driver in all the places where a register is read or written, this patch takes a shortcut: it adds an additional number to the struct which represents the register index. This number is used to decide which base address to use. In the future we should consider other approaches. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: add missing core irqTomi Valkeinen2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI_IRQ_CORE was not defined in the hdmi.h. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: fix HDMI_WP_CLK nameTomi Valkeinen2014-01-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI_WP_CLK was wrongly defined as HDMI_WP_WP_CLK. Fix that. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: fix hdmi_wait_for_bit_changeTomi Valkeinen2014-01-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hdmi_wait_for_bit_change() has two issues: The register index was passed as u16, even if the register index may be u32. Fix the index to u32. The function was copied from wait_for_bit_change() which waits for a single bit to change, but the hdmi version was changed to wait for a bit field. This change was not done correctly. The function is supposed to return the (last) value of the bit field, but it returned !val in case of timeout. This was correct for the single bit version, but not for the hdmi version. Fix the function to return the actual value in the register. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: fix context restoreTomi Valkeinen2014-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DISPC_MSTANDBY_CTRL register is used in the driver, but it's not restored in dispc_restore_context(), causing problems after resume. Instead of adding DISPC_MSTANDBY_CTRL to dispc_restore_context(), let's call _omap_dispc_initial_config() as the first thing in dispc_runtime_resume(). This will initialize the DISPC core registers properly, and will avoid similar issues in the future. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>