summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | ARM: OMAP: Fix drivers to depend on omap for internal devicesTony Lindgren2012-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These devices are not available on other architectures, so let's limit them to omap. If the driver subsystem maintainers want to build test system wide changes without building for each target, it's easy to carry a test patch that just strips out the depends entries from Kconfig files. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | Merge tag 'fbdev-for-3.8' of git://gitorious.org/linux-omap-dss2/linuxLinus Torvalds2012-12-1558-3376/+3561
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull fbdev changes from Tomi Valkeinen: "OMAPDSS changes, including: - use dynanic debug prints - OMAP platform dependency removals - Creation of compat-layer, helping us to improve omapdrm - Misc cleanups, aiming to make omadss more in line with the upcoming common display framework Exynos DP changes for the 3.8 merge window: - Device Tree support for Samsung Exynos DP - SW Link training is cleaned up. - HPD interrupt is supported. Samsung Framebuffer changes for the 3.8 merge window: - The bit definitions of header file are updated. - Some minor typos are fixed. - Some minor bugs of s3c_fb_check_var() are fixed. FB related changes for SH Mobile, Freescale DIU Add support for the Solomon SSD1307 OLED Controller" * tag 'fbdev-for-3.8' of git://gitorious.org/linux-omap-dss2/linux: (191 commits) OMAPDSS: fix TV-out issue with DSI PLL Revert "OMAPFB: simplify locking" OMAPFB: remove silly loop in fb2display() OMAPFB: fix error handling in omapfb_find_best_mode() OMAPFB: use devm_kzalloc to allocate omapfb2_device OMAPDSS: DISPC: remove dispc fck uses OMAPDSS: DISPC: get dss clock rate from dss driver drivers/video/console/softcursor.c: remove redundant NULL check before kfree() drivers/video: add support for the Solomon SSD1307 OLED Controller OMAPDSS: use omapdss_compat_init() in other drivers OMAPDSS: export dispc functions OMAPDSS: export dss_feat functions OMAPDSS: export dss_mgr_ops functions OMAPDSS: separate compat files in the Makefile OMAPDSS: move display sysfs init to compat layer OMAPDSS: DPI: use dispc's check_timings OMAPDSS: DISPC: add dispc_ovl_check() OMAPDSS: move irq handling to dispc-compat OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c OMAPDSS: move blocking mgr enable/disable to compat layer ... Conflicts: arch/arm/mach-davinci/devices-da8xx.c arch/arm/plat-omap/common.c drivers/media/platform/omap/omap_vout.c
| * \ \ \ Merge tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux ↵Tomi Valkeinen2012-12-1345-2894/+2587Star
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into for-linus OMAPDSS changes for 3.8, including: - use dynanic debug prints - OMAP platform dependency removals - Creation of compat-layer, helping us to improve omapdrm - Misc cleanups, aiming to make omadss more in line with the upcoming common display framework * tag 'omapdss-for-3.8' of git://gitorious.org/linux-omap-dss2/linux: (140 commits) OMAPDSS: fix TV-out issue with DSI PLL Revert "OMAPFB: simplify locking" OMAPFB: remove silly loop in fb2display() OMAPFB: fix error handling in omapfb_find_best_mode() OMAPFB: use devm_kzalloc to allocate omapfb2_device OMAPDSS: DISPC: remove dispc fck uses OMAPDSS: DISPC: get dss clock rate from dss driver OMAPDSS: use omapdss_compat_init() in other drivers OMAPDSS: export dispc functions OMAPDSS: export dss_feat functions OMAPDSS: export dss_mgr_ops functions OMAPDSS: separate compat files in the Makefile OMAPDSS: move display sysfs init to compat layer OMAPDSS: DPI: use dispc's check_timings OMAPDSS: DISPC: add dispc_ovl_check() OMAPDSS: move irq handling to dispc-compat OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c OMAPDSS: move blocking mgr enable/disable to compat layer OMAPDSS: manage framedone irq with mgr ops OMAPDSS: add manager ops ...
| | * | | | OMAPDSS: fix TV-out issue with DSI PLLTomi Valkeinen2012-12-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0e8276ef75f5c7811b038d1d23b2b42c16efc5ac (OMAPDSS: DPI: always use DSI PLL if available) made dpi.c use DSI PLL for its clock. This works fine, for DPI, but has a nasty side effect on OMAP3: On OMAP3 the same clock is used for DISPC fclk and LCD output. Thus, after the above patch, DSI PLL is used for DISPC and LCD output. If TV-out is used, the TV-out needs DISPC. And if DPI is turned off, the DSI PLL is also turned off, disabling DISPC. For this to work, we'd need proper DSS internal clock handling, with refcounts, which is a non-trivial project. This patch fixes the issue for now by disabling the use of DSI PLL for DPI on OMAP3. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | Revert "OMAPFB: simplify locking"Tomi Valkeinen2012-12-134-79/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b41deecbda70067b26a3a7704fdf967a7940935b. The simpler locking causes huge latencies when two processes use the omapfb, even if they use different framebuffers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: remove silly loop in fb2display()Tomi Valkeinen2012-12-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fb2display() has a for loop which always returns at the first iteration. Replace the loop with a simple if. This removes the smatch warning: drivers/video/omap2/omapfb/omapfb.h:153 fb2display() info: loop could be replaced with if statement. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: fix error handling in omapfb_find_best_mode()Tomi Valkeinen2012-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapfb_find_best_mode() doesn't check for the return value of kmalloc. Fix this. This also removes the smatch warning: drivers/video/omap2/omapfb/omapfb-main.c:2256 omapfb_find_best_mode() error: potential null dereference 'specs'. (kzalloc returns null) Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: use devm_kzalloc to allocate omapfb2_deviceTomi Valkeinen2012-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_kzalloc to allocate omapfb2_device. This fixes possible memory leak: drivers/video/omap2/omapfb/omapfb-main.c:2553 omapfb_probe() warn: possible memory leak of 'fbdev' Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: remove dispc fck usesTomi Valkeinen2012-12-121-14/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous patch changes dispc to get the dispc fck rate from dss core driver. This was the only use of the dispc fck in dispc, and thus we can now remove the clock handling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: get dss clock rate from dss driverTomi Valkeinen2012-12-123-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dispc currently gets dispc's fck with clk_get() and uses clk_get_rate() to get the rate for scaling calculations. This causes a problem with common clock framework, as omapdss uses the dispc functions inside a spinlock, and common clock framework uses a mutex in clk_get_rate(). Looking at the DSS clock tree, the above use of the dispc fck is not quite correct. The DSS_FCLK from PRCM goes to DSS core block, which has a mux to select the clock for DISPC from various options, so the current use of dispc fck bypasses that. Fortunately we never change the dispc clock mux for now. To fix the issue with clk_get_rate(), this patch caches the dss clock rate in dss.c when it is set. Dispc will then ask for the clock rate from dss. While this is not very elegant, it does fix the issue, and it's not totally wrong when considering that the dispc fck actually comes via dss. In the future we should probably look into common clock framework and see if that could be used to represent the DSS clock tree properly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: use omapdss_compat_init() in other driversTomi Valkeinen2012-12-072-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapdss_compat_init() and omapdss_compat_uninit() is called internally by omapdss. This patch moves the calls to omapfb, omap_vout and omapdrm drivers. omapdrm driver can later remove the call after non-compat support has been implemented in omapdrm. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: export dispc functionsTomi Valkeinen2012-12-072-35/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export DISPC functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: export dss_feat functionsTomi Valkeinen2012-12-072-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export dss_features related functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: export dss_mgr_ops functionsTomi Valkeinen2012-12-072-30/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export dss_mgr_ops related functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: separate compat files in the MakefileTomi Valkeinen2012-12-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate the core DSS files and compat layer files in the Makefile for clarity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move display sysfs init to compat layerTomi Valkeinen2012-12-074-32/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move creation of the sysfs files for displays to the compat layer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DPI: use dispc's check_timingsTomi Valkeinen2012-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dpi.c uses dss_mgr_check_timings() to verify video timings, but that function is in the compat layer. Change dpi.c to use the dispc's check instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: add dispc_ovl_check()Tomi Valkeinen2012-12-072-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new function, dispc_ovl_check(), which can be used to verify scaling configuration for an overlay. The function gets both the overlay and overlay manager as parameters, so that the caller does not need to configure the hardware before using this function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move irq handling to dispc-compatTomi Valkeinen2012-12-075-426/+463
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole dispc irq handling system we currently have is only needed for compat layer, and thus can be moved from dispc.c to the compat layer. This is quite straigtforward, but we need to add new dispc functions to request and free the actual hardware irq: dispc_request_irq() and dispc_free_irq(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.cTomi Valkeinen2012-12-073-57/+33Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two functions to wait for a dispc interrupt: int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout); int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, Of these, the former is not used at all, and can be removed. The latter is only used by the compat layer, and can be moved to the compat layer code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move blocking mgr enable/disable to compat layerTomi Valkeinen2012-12-076-178/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dispc_mgr_enable_sync and dispc_mgr_disable_sync are only used with the compat mode. Non-compat will use the simpler enable and disable functions. This patch moves the synchronous enable/disable code to the compat layer. A new file is created, dispc-compat.c, which contains low level dispc compat code (versus apply.c, which contains slightly higher level compat code). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: manage framedone irq with mgr opsTomi Valkeinen2012-12-075-22/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the output drivers need to handle FRAMEDONE interrupt from DISPC. This creates a direct dependency to dispc code, and we need to avoid this to make the compat code to work. Instead of the output drivers registering for dispc interrupts, we create new mgr-ops that are used to register a framedone handler. The code implementing the mgr-ops is responsible for calling the handler when DISPC FRAMEDONE interrupt happens. The compat layer is improved accordingly to do the call to the framedone handler. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add manager opsTomi Valkeinen2012-12-073-6/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output drivers need some operations from the overlay managers, like enable and set_timings. These will affect the dispc registers, and need to be synchronized with the composition-side changes with overlays and overlay managers. We want to handle these calls in the apply.c in the compatibility mode, but when in non-compat mode, the calls need to be handled by some other component (e.g. omapdrm). To make this possible, this patch creates a set of function pointers in a dss_mgr_ops struct, that is used to redirect the calls into the correct destination. The non-compat users can install their mgr ops with dss_install_mgr_ops() function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move ovl function setup to apply.cTomi Valkeinen2012-12-073-37/+29Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the functions that are assigned to the fields in ovl struct are in apply.c. By moving the function pointer setup into apply.c we can make these functions static. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move ovl-mgr function setup to apply.cTomi Valkeinen2012-12-073-55/+52Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the functions that are assigned to the fields in ovl-mgr struct are in apply.c. By moving the function pointer setup into apply.c we can make these functions static. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: move ovl & ovl-mgr init to apply.cTomi Valkeinen2012-12-072-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overlay and overlay_manager structs will only be needed in the compat mode. This patch moves initialization of overlay and overlay_manager structs to apply.c, so that they are handled in omapdss_compat_init(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add omapdss_compat_init()Tomi Valkeinen2012-12-073-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new exported functions, omapdss_compat_init and omapdss_compat_uninit, which are to be used by omapfb, omap_vout to enable compatibility mode for omapdss. The functions are called by omapdss internally for now, and moved to other drivers later. The compatibility mode is implemented fully in the following patches. For now, enabling compat mode only sets up the private data in apply.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: connect ovl managers to all dssdevsTomi Valkeinen2012-12-071-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5d89bcc341771d95e3a2996218e5949a6627f59e (OMAPDSS: remove initial display code from omapdss) moved setting up the initial overlay, overlay manager, output and display connections from omapdss to omapfb. However, currently omapfb only handles the connection related to the default display, which means that no overlay managers are connected to other displays. This patch changes omapfb to go through all dssdevs, and connect an overlay manager to them. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: manage output-dssdev connection in output driversTomi Valkeinen2012-12-079-46/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently attach an output to a dssdev in the initialization code for dssdevices in display.c. This works, but doesn't quite make sense: an output entity represents (surprisingly) an output of DSS, which is managed by an output driver. The output driver also handles adding new dssdev's for that particular output. It makes more sense to make the output-dssdev connection in the output driver. This is also in line with common display framework. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: remove warning when trying to alloc at certain paddressTomi Valkeinen2012-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapfb gives a WARN_ONCE if a predefined physical address is given for allocating the framebuffer memory, as this is not currently supported. However, the same warning happens if omapfb fails to allocate memory during runtime, as when the allocation has failed, omapfb tries to re-allocate the old memory with the physical address of the old memory area. Remove the warning from omapfb_alloc_fbmem, as it serves no purpose on the failure case above, and move it to omapfb_parse_vram_param, so that we only warn if physical address is given via omapfb module parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: simplify lockingTomi Valkeinen2012-12-074-132/+79Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel lock verification code has lately detected possible circular locking in omapfb. The exact problem is unclear, but omapfb's current locking seems to be overly complex. This patch simplifies the locking in the following ways: - Remove explicit omapfb mem region locking. I couldn't figure out the need for this, as long as we take care to take omapfb lock. - Get omapfb lock always, even if the operation is possibly only related to one fb_info. Better safe than sorry, and normally there's only one user for the fb so this shouldn't matter. - Make sure fb_info lock is taken first, then omapfb lock. With this patch the warnings about possible circular locking does not happen anymore. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
| | * | | | OMAPFB: move dssdev->sync call out from omapfb_realloc_fbmemTomi Valkeinen2012-12-073-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently omapfb_realloc_fbmem() calls dssdev->sync to ensure any possible frame update is finished. This patch moves the call to dssdev->sync from omapfb_realloc_fbmem to the callers of omapfb_realloc_fbmem. This keeps dssdev related calls out from omapfb_realloc_fbmem, which makes sense as the function should only deal with fb memory. Also, this seems to avoid a lockdep warning about possible circular locking. However, the exact reason for that warning is still unclear. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: remove exported udpate windowTomi Valkeinen2012-12-072-27/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapfb contains an exported omapfb_update_window function, which, at some point in history, was used by a closed source SGX driver. This was a hack even then, and should not be needed anymore. So remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: Add terminating entry for picodlp_i2c_id tableAxel Lin2012-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: Use only "omapdss_dss" platform device to get context lost countArchit Taneja2012-11-294-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling a hwmod, omap_hwmod refers to the register mentioned in the hwmod struct's member 'prcm.omap4.context_offs' to see whether context was lost or not. It increments the context lost count for the hwmod and then clears the register. All the DSS hwmods have the same register(RM_DSS_DSS_CONTEXT) as context_offs. When DSS is enabled, the first hwmod to be enabled is the "dss_core" hwmod since it's corresponding platform device is the parent platform device("omapdss_dss"). The dss_core hwmod updates it's context lost count correctly and clears the register. When the hwmods corresponding to the children platform devices are enabled, they see that the register is clear, and don't increment their context lost count. Therefore, all the children platform devices never report a loss in context. The DISPC driver currently gets the context lost count for DSS power domain from it's corresponding platform device instance("omapdss_dispc"). The DISPC platform device is one of the child devices, and it's corresponding hwmod("dss_dispc") doesn't report the context lost count correctly. Modify dss_get_ctx_loss_count() such that it always takes the "omapdss_dss" platform device as it's input, move the function to dss.c so that it has access to that platform device. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add dss_get_core_pdev()Tomi Valkeinen2012-11-272-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dss_get_core_pdev() which returns the platform device for dss core device. The following patches use the core pdev to register sysfs files in the compat code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: create display-sysfs.cTomi Valkeinen2012-11-274-279/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move display sysfs related code from display.c to display-sysfs.c, for clarity. The sysfs code will only be used for compat mode. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: pass pclk & lclk to dispc_ovl_calc_scalingTomi Valkeinen2012-11-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make the scaling calculations independent of the current hardware configuration (e.g. which manager is connected to this output), we need to change the calc funcs to get all the variables needed for the calculations via parameters. This patch changes dispc_ovl_calc_scaling to get pclk and lclk as parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: pass pclk & lclk to calc_scalingTomi Valkeinen2012-11-271-9/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make the scaling calculations independent of the current hardware configuration (e.g. which manager is connected to this output), we need to change the calc funcs to get all the variables needed for the calculations via parameters. This patch changes calc_scaling to get pclk and lclk as parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: pass pclk & lclk to check_horiz_timing_omap3Tomi Valkeinen2012-11-271-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make the scaling calculations independent of the current hardware configuration (e.g. which manager is connected to this output), we need to change the calc funcs to get all the variables needed for the calculations via parameters. This patch changes check_horiz_timing_omap3() to get pclk and lclk as parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: pass pclk to calc_core_clk()Tomi Valkeinen2012-11-271-19/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make the scaling calculations independent of the current hardware configuration (e.g. which manager is connected to this output), we need to change the calc funcs to get all the variables needed for the calculations via parameters. This patch changes calc_core_clk() function to get pclk as a parameter. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: pclk & lclk rates for writebackTomi Valkeinen2012-11-271-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the dispc_plane_pclk_rate and dispc_plane_lclk_rate functions to return 0 if the given plane is the writeback plane. The clocks are not valid for WB, but returning 0 from these functions instead of running into BUG() will simplify the code that uses these functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: use WARN_ON() in dispc_mgr_goTomi Valkeinen2012-11-271-14/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dispc_mgr_go() should never be called with manager output disabled or if the GO bit is already set. Change the current silent returns to WARN_ONs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: cleanup WB enable/is_enabled functionsTomi Valkeinen2012-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing direct register reads/writes, dispc_wb_enable() and dispc_wb_is_enabled() functions can use the common overlay functions to set and check the enable bit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: Remove blocking code from dispc_wb_enable()Tomi Valkeinen2012-11-271-33/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WB will not be used with compat-mode, i.e. from omapfb. This means we don't need the current complex dispc_wb_enable function, but can have a simple register write version of the function. This patch removes all the extra code from dispc_wb_enable() Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: use get_framedone_irq in disable_digit_outTomi Valkeinen2012-11-271-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dispc_mgr_disable_digit_out() needs to wait until the DIGIT output is turned off. This is done with either VSYNC irq on OMAP2/3 and FRAMEDONETV on OMAP4+. It currently uses a rather hacky way to decide what irq to use. This patch changes dispc_mgr_disable_digit_out to use dispc_mgr_get_framedone_irq to find out if there's framedone irq on this SoC, and if not, uses VSYNC. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DISPC: add no_framedone_tv featTomi Valkeinen2012-11-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP2/3 do not have FRAMEDONETV irq, but later omaps do. We currently always return 0 from dispc_mgr_get_framedone_irq() for TV output to be compatible with OMAP2/3. This patch implements "no_framedone_tv" dispc-feature that is used in dispc_mgr_get_framedone_irq to return either 0 for OMAP2/3, or the correct IRQ number for FRAMEDONETV on OMAP4+. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: don't WARN if there's no DSI deviceTomi Valkeinen2012-11-271-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dsi_get_dsidev_from_id() gives a WARN if DSI support is not compiled in. This warning is not right, as it's valid to call dsi_get_dsidev_from_id() to see if there is DSI support or not. Remove the WARN(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DPI: fix crash with dpi_verify_dsi_pll()Tomi Valkeinen2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the DSI support has not been compiled in or the SoC doesn't have DSI hardware, dpi_get_dsidev() returns NULL. This NULL is passed to dpi_verify_dsi_pll() causing a crash. The bug was added with commit 0e8276ef75f5c7811b038d1d23b2b42c16efc5ac (OMAPDSS: DPI: always use DSI PLL if available). Fix this by checking if dsidev is NULL before calling dpi_verify_dsi_pll(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: remove declarations for non-existing functionsTomi Valkeinen2012-11-271-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dispc_mgr_is_channel_enabled() and dss_mgr_get_timings() declarations, as the function doesn't exist. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>