OMAP4: HDMI: Enable HDMI_VREF for HDMI

Enable the HDMI_VREF 3.3v on power_on which is turned off
by default.  Disable it on power_off.  This is needed for
reading EDID.

Co-authored-by: Saket Dandawate <dsaket@ti.com>

Change-Id: I63b691d503a9ab2452536a0b369befc921d0365e
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Lajos Molnar <molnar@ti.com>
OMAP4:DSS2:HDMI: Clean-up set_timings logic

omapdss_hdmi_display_disable and enable should happen inside the set_timings
method.

Change-Id: I611a46865f5b8148ccb834b6b5b1439d8366cb02
Signed-off-by: Lajos Molnar <molnar@ti.com>
OMAP: HDMI: Enable HPD for Android

Use gpio_63 to detect hpd events, and propagate them to user space
listeners via an Android switch device.  Debounce hpd events using
delayed work queue.

HPD detection sequence is as follows:

On HPD HI:
1. power on HDMI
2. read EDID (retry for 300ms)
3. set hdmi switch to 1

On HPD LOW:
1. set hdmi switch to 0
2. power down HDMI

Change-Id: I61db22fbc5e0a98979aa677fa4df50f41c65e4ba
Signed-off-by: Lajos Molnar <molnar@ti.com>
OMAP: OMAPFB: Enable disabled displays on FB_UNBLANK

Correspondingly, disable displays if suspend is not implemented on
FB_BLANK.

Change-Id: I9e4ca3dc46ed96fc813037928b451e2599342177
Signed-off-by: Lajos Molnar <molnar@ti.com>
Merge branch 'linux-omap-3.0' into android-omap-3.0
misc: omap_temp_sensor: fix context loss API

drivers should use the API: omap_pm_get_dev_context_loss_count()

For now this API just returns an up-counting static counter.
In future this API will be fixed to do the right thing.

Change-Id: I76798abb199c26d98d8f77d88938f0a44c6659bf
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
OMAP4: TEMP Sensor: Update T_hot and T_cold threshold

Change the threshold T_hot to 95C and T_cold to 85C. As per TI h/w team
this is the recommended safest range system can be operated
at.

Change-Id: I8bf964bec5ae06371b0d553cf5c5596e1c594f86
Signed-off-by: Girish S G <girishsg@ti.com>
OMAP4: PM: Throttle CPU with delay of 10 sec

Once the system reaches T_hot CPU is throttled. The next throttle of
the CPU should be delayed by 10 secs, this is the time taken to cool
down from 95C to ~80C. The idea is not to throttle aggressively as this
will have impact on system performance. When CPU is loaded heavily the
thermal level is maintained below 95C which is the safest operating range
and at the same time keeps CPU running at max available frequency.

Change-Id: I0b8dca25c2efbc2bbb6f7096ddce7ddca7a19d89
Signed-off-by: Girish S G <girishsg@ti.com>
Merge branch 'linux-omap-3.0' into android-omap-3.0
Merge branch 'android-3.0' into android-omap-3.0
OMAP:DSSCOMP: Use 1 giant tiler slot instead of 4 small ones

To better manage the efficiency of mapping SGX layers to TILER 1D
for display, use 1 16MB tiler slot and manage each layer's mapping
into this slot.  This allows having some layers be bigger than 4MB
as long the total size fits into 16MB.

Change-Id: Ie8df0d9b6782d7fc681a426e0d73b198381d7ad5
Signed-off-by: Lajos Molnar <molnar@ti.com>
Merge branch 'linux-omap-3.0' into android-omap-3.0
tty: serial: omap-serial: fix irq handling

There are a few problems in serial_omap_irq:

The interrupt type from IIR register is read incorrectly.  UART
interrupts are an integer value masked out of the IIR register,
not a bitmask like any sensible hardware would use.  Convert
the mask operations to mask-and-compare.  Masking iir with
UART_IIR_RLSI was previously matching RDI, RLSI, RX timeout,
and (incorrectly) TX interrupts.  Expand the original mask test
to testing for each of the 3 RX interrupts.

If the interrupt type is UART_IIR_THRI, but the LSR THRE bit
is not set, the interrupt handler doesn't do anything to clear
the THRI interrupt.  Return IRQ_NONE in this case, so the irq
core can detect an interrupt storm and disable the interrupt
if necessary.

Change-Id: Ic2810e2178fb7e1e7b7786ccbc500da8d4feba97
Signed-off-by: Colin Cross <ccross@android.com>
Merge branch 'linux-omap-3.0' into android-omap-3.0
gpu: pvr: Update to DDK 1.8@277528

This is a version number change only, which is required for
compatibility with the user-mode driver.
gpu: pvr: Update to DDK 1.8@278427
gpu: pvr: Update to DDK 1.8@279068

This is a version number change only, which is required for
compatibility with the user-mode driver.
Merge branch 'linux-omap-3.0' into android-omap-3.0
rpmsg: serialize transmissions and add proper barriers

The rpmsg_send_offchannel_raw delivers messages to the remote
processor by getting a vring buffer, copying the necessary
payload and making it available to the remote processor. These
three steps need to be atomic to ensure serialized delivery of
messages to the remote processor.

Memory barriers have also been added to the virtio_rpmsg_bus
driver, since this driver uses the virtio framework across
different processor sub-systems and the internal barriers in
virtio driver are better suited to work within a SMP
environment.

TODO:
The wait logic when no buffer is available needs to be moved
out from this function. This code path currently is never
reached.

Change-Id: I91685ffbccc6769f60e77a2a7106c3a9daa55b69
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Merge branch 'android-3.0' into android-omap-3.0