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: OMAPFB : Add support for default display scaling.

Currently it is assumed that frame buffer size
is same as default panel size. With this assumption
GFX pipeline is always presented to default display FBDev.
GFX pipeline cannot scale so we cannot have a frame
buffer which is not equal to panel size (LCD | HDMI).
Updated the current logic of omapfb to pick video pipelines
in case scaling is required for FB to be presented to default
panel.

To provide FB size option is provided via command line.
e.g
omapfb.fb_opt=0,720,1280,1,640,480
each element is [fb_ix,width,height]

Change-Id: I9e2d40bed34c5fbf2bac31668d210e0bc586bb40
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAP4: HDMI : Support default display configuration for HDMI
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>
OMAP4: OMAPFB: Dont error if display is already ON

Dont error if display state is already ON.

Change-Id: Ibad859847f2edd19cf6cd0d285461c66ed43c9a2
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
gcx: fixed suspend issue.

Clipping was only set during init. When GC320 was shut down
in full system suspend, clipping was reset to the hardware
default (0,0)-(0,0), which caused all primitived to be clipped
after resume.

Change-Id: Ib06b2ced9460816e6d610ef329b6d9ea7a58353a
Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
Revert "OMAP4470 LPDDR interface configuration update for 466MHz"
OMAP4470 LPDDR interface configuration update for 466MHz
gcx: fixed suspend synchronization.

It's possible for suspend to be called while the gcgpu is busy.
Switching to power off in this state doesn't shutdown cleanly
and the device can't sleep.  Have suspend wait for gpu activity
to complete.

Change-Id: I280bda56a2017491aa5e812cbeed2bd3a625056a
Signed-off-by: Craig Stout <craig.stout@ti.com>
gcx: fixed thread lockup.

Added a missing unlock.
Also minor refactoring of the suspend flag.

Change-Id: Ic1bbeab28aa15ca01c1dae2954cf62e4b6271823
Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
USB HOST: TLL: HACK: EHCI Port disabled after resume on ES2.2 OMAP4430

Errata i640 WA function has critical timing between writes to USBTLL
register and to PRCM register. Errata WA needs write to PRCM register
be completed in 500-600ns after a write to the USB register.
While only one CPU is online and utilize ARM MPCore this timing is kept.
If two CPUs are online it is possible situation when activity of another
CPU could significantly affect WA execution timing.

In order to keep i640 WA timings another CPU is calmed while i640 WA
is executed. Using smp_call_function_single() it is forced to run
simple function what doesn't mess caches and write buffers.

There is a restriction for this WA:
i640 is effective for OMAP4430 up to ES2.2. These processors have
two A9 cores. So choosing CPU to calm down is done with one xor
operation. If such workaround needs to be generic it should be
reimplemented with more complex selecting of "other" CPUs.

Change-Id: I8df7d7276e8bcbcd57fbba4087278421f52c47d1
Signed-off-by: Andrii Anisov <x0163225@ti.com>
OMAPDSS: DISPC: more precise scale limits checking

Use division with rounding-up when checking if maximum downscale ratio
was reached. This allows to avoid SYNC_LOST errors in case when small
amount of extra pixels or lines (usually 1-3) not taken into account

Change-Id: Id8f88c64671146a64738cfd820378bb7a28c1455
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
OMAP: I2C: Wait till functional part of the I2C controller completely becomes valid