OMAPDSS:DSSCOMP: Add mem2mem write back support.

Added mem2mem wb mode. Patch supports capturing from pipes.

Change-Id: Ia4f30e3e163023832b3b9e91d5d67ffe8ffd7365
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS:DSSCOMP: Ignore display resolution for WB source overlay

When WB captures from an overlay in MEM2MEM mode, the captured
image may be up-scaled beyond the size of the display.

Change-Id: If5a8faf3206923a5f218d711527cc3ff2b54a7f7
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS: DSS: Wait for wb interrupt

This patch prevents skipping of frames in case we setup
a new composition until WB finishes the previous one.

Change-Id: I5793dec7f0856ce94674f326383de59f935a2f07
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS: DSSCOMP: Add MEM2MEM with manager mode

This change adds code for maintain MEM2MEM with manager mode
at DSSCOMP level.

Change-Id: Id14bc0c4884310250b6709436d815c9102a9d72e
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
OMAPDSS: DSSCOMP: Added platform_info and getter

Get platform information from dss2 driver and android_display,
instead of it being hardcoded in dsscomp clients.

Change-Id: Icc23245ec93d93dd0d9b9fcd791e546720699dcc
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
OMAPDSS: DSSCOMP: Added support for back bufer copy for ext displays

In order to decouple the LCD FB and the ext display buffers, sDMA copy
based solution is implemented in dsscomp.
This patch adds the support for parsing ION handles for buffer addresses and
copying FB into user provide buffers (for ext display cloning).

Change-Id: I84cfa249e86b863aef9fd9685e1854649f25afc8
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
OMAP4 : DSSCOMP : Avoid pushing content if no panel is active

Currently we push content on a blanked manager in case it is
default display. This causes a lot of logging in dsscomp call
back when we apply blank to manager.

Check added to see if any dss device is active and then only
push data to panel.

Change-Id: Idffd022e293949bfea260a01b96b8f6eff8327d3
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPDSS: DSSCOMP:remove compilation warnings

SR requires there should be no compilation warnings

Change-Id: I47b38f7ed134bd0e8f063d2276c31d1946dfcda2
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>
OMAPDSS: DSSCOMP: support of MEM2MEM mode with blanked pannel

This change implements MEM2MEM mode for pannels blanked case.

Change-Id: Ia1e0034c73f196d877283e5ecc974f277988265e
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
Remove this hack
OMAPDSS: DSSCOMP: extended platform info query for fbmem type

DSSCOMP query platform ioctl returns the platform specific
configuration, platform_info. The platform_info strcuture
is extended to hold fbmem type information as well.
fbmem type is populated by querying sgx omaplfb
platform config data.

Change-Id: I09727c4654d09e83e66ca174f71a00136518c164
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
OMAPDSS: DSS: Add MEM2MEM manager mode

This change adds memory-to-memory (M2M) mode with using of the
manager. The main idea is to connect write back (WB) pipeline to
the manager (overlay, in terms of technical reference manual)
which is not in use (physical interface is turned-off) for using
advantages of hardware manager in M2M mode. In this case several
pipelines can be connected to the manager.

Change-Id: Ifa649bd5b18f54f3ce583fdee802c799b2c30711
Co-author: Sergiy Kibrik <sergiikibrik@ti.com>
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
OMAPDSS: DSS: Handle configure_dispc error in dss_setup_partial_planes for manual mode

Description: Upon errors returned from configure_dispc for manually
updated panels in dss_setup_partial_planes, previous compositions
needs to be cleared to ensure SGX won't block on commandcomplete
function indefinitely.

This patch depends on http://review.omapzoom.org/#/c/20659/
Can not be merged without it.

Change-Id: Id125a7a7d83e317af868472ba62297b7673ccb47
Signed-off-by: Kostiantyn Luzan <x0166170@ti.com>
OMAPDSS:DSS: Writeback channelout switching WA.

This is a workaround. According to TRM we should disable the manager
but it will cause blinking of panel. WA is to disable pipe which was
used as source of WB and do dummy enable and disable of WB.

Change-Id: Ie1834fcef10b1cee98522c4251e771447760b9f3
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS:DSS: Add mem2mem write back support.

Support for Memory-to-Memory writeback mode for capturing from pipes.

Change-Id: I8bc3b62f12aaafbfd0771ee6fe3d3ce84421a19e
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS: DSS: workaround for errata i642

This change adds workaround for errata i642.

Description of Errata i642:
VID /GFX Pipeline Underflow Interrupt Generated When In WB
Memory-to-memory Operation. Errata ID: i642.

Recommended workaround:
Software should disable the VID/GFX pipeline underflow interrupt
by writing 0x0 in DISPC_IRQENABLE[20-12-10-6] bit if it is
connected to the WB pipeline in memory-to-memory mode.
Software should not consider the underflow interrupt generated in
DISPC_IRQSTATUS[20-12-10-6] bit when in memory-to-memory mode.

This change do not disable interrupt, but ignores its handler in
case if pipeline connected to the manager, which is used in MEM2MEM
mode.

Silicon Versions Impacted:
OMAP4430 ES1.0, ES2.0, ES2.1, ES2.2, ES2.3
OMAP4460 ES1.0, ES1.1
OMAP4470 ES1.0

Change-Id: If7532b1b7454d92a648673b6da29cc31448519ab
Author: Rohit Choraria <rohitkc@ti.com>
Co-author: Mykhailo Denysiuk <x0172934@ti.com>
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
OMAPDSS:DSS: Ignore display resolution for WB source overlay

When WB captures from an overlay in MEM2MEM mode, the captured
image may be up-scaled beyond the size of the display.

Change-Id: Idac2c5082fb60d68d996c15daf8a13080b1f068e
Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
OMAPDSS: implementation of MEM2MEM mode with blanked pannel.

This change implements MEM2MEM mode for pannels blanked case.

Change-Id: Ic030682e7aaa33dd596d5150da23ab9dc1fc20f7
Signed-off-by: Artem Rudenko <artemrudenko@ti.com>
OMAPDSS: DSS: SyncLost WA for wb m2m-manager mode.

This is a workaround that prevents SYNC_LOST on changing pipe
channelout from manager which was used as a source of wb to
another manager. Manager could free pipes after wb will
send SYNC message but that will start wb capture. To prevent
that we reconnect the pipe from the manager to wb and do a
dummy enabling and disabling of wb - the pipe will be freed
and capture won't start because source pipe is switched off.

Change-Id: Ib4cfbb1854c92a2e507589fbe8cf00e5cb6831ca
Signed-off-by: Artem Rudenko <x0150883@ti.com>
OMAPDSS: DSS: fix for black frames in mem2mem mode

This change fixes black frames issue in MEM2MEM mode.
The root of the problem is in apply_irq_handler function, which
time-to-time is called between calls to omap_dss_wb_apply() and
omap_dss_mgr_apply() functions. So, apply_irq_handler sometimes
is called when WB cache was updated, but managr cache and others
caches were not updated yet.

Change-Id: I308f5ef7d7b6e790382c22c40b8cddedaf91308e
Signed-off-by: Rohit Choraria <rohitkc@ti.com>
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>