History log of /hardware/ti/omap4-aah/hwc/hwc.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4cbe2121847943d113daea40023148a78e55184 26-Mar-2013 Dake Gu <dake@google.com> bump hwc to allow 4 big layers

Wolfie search + home + wallpaper need 3 layers.
Tested on Wolfie and Q. On Q, it's still falling back and
does not hurt.

Change-Id: I75f5e94aa23b7f8823d48a57a135934bfdadcb6b
/hardware/ti/omap4-aah/hwc/hwc.c
25df2c673b1cdecd6d97f5c46905f58a834c9bdd 26-Oct-2012 Jason Simmons <jsimmons@google.com> Increase the limit of large DSS-composited layers to 2

TI says that the limit of 1 large layer may be obsolete in the current kernel

Change-Id: I6949079ccff6d8be03b055188c90e33f550746f6
/hardware/ti/omap4-aah/hwc/hwc.c
c4e8e253c404231b74eb318bdb21d7898766f1af 23-Oct-2012 Jason Simmons <jsimmons@google.com> Use SGX composition if there is more than one large (>720p) RGB32 layer

A previous change (fc13c9292160e3eb83fe5b4f191d1ccee2fd67d9) updated the
HWC to skip any large layer other than the first. However, the logic
in can_dss_render_all did not know about this rule. If there is
more than one large layer, can_dss_render_all would select DSS-only
composition, but some of the large layers would not be rendered.

Change-Id: I03718fcf25f6bc57b43f6d39546e50e8a9d6fde9
/hardware/ti/omap4-aah/hwc/hwc.c
284005c3a0e0b21f28febca5ad1dd647f912d9fe 23-Oct-2012 Jason Simmons <jsimmons@google.com> Fix warnings due to updated definitions of hwc_* types in the HWC HAL interface

Change-Id: I8954125e75c1f0ee469ec035ebe0376139aef1e9
/hardware/ti/omap4-aah/hwc/hwc.c
2d7bd1ee60dd7a35573728c17fcae49999f8edd9 03-Oct-2012 Gustavo Diaz Prado <a0273371@ti.com> hwc: Fix for losing first blit buffer handle

There are certain situations where the regionizer decides it can handle
all layers passed to it and no blits are generated as a result. This is
caused by receiving more than two times the same geometry in the
prepare, which makes the regionizer to not generate dirty regions
(hence no blits). When this situation happens we are losing the first
blit handle by assigning it to NULL incorrectly.

This patch fixes the issue by checking if the sgx will be used for
composition instead of checking if we have no blits.

Change-Id: I68e87c386c98a8ca5047e1723c6c43db7c143447
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
(cherry picked from commit ac81898f605ba0a6b5359de4d6565c61fcc3a36a)
/hardware/ti/omap4-aah/hwc/hwc.c
b78f671651e83c2cd7b77cd67a8ba3abdb519388 11-Sep-2012 Tony Lofthouse <a0741364@ti.com> hwc: Check for >1 overlay used in idle timeout

It was observed during ADTF runs than we get repeated redraws when
there are no layers to render.

This is because the check in prepare() will reset force_sgx to 0
when there are 1 or less layers. The side effect of this is to
cause a redraw every idle period.

Instead of doing this, account for the number of overlays used
for the primary display before calling the invalidate() api. This
logic should be satisfactory most current usecases.

Change-Id: I4b9cb44ebe250a6a46a6da27a1db94e88d6f26f3
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit c044e832219dd2aa81ae11e4ec883d09bf2fb885)
/hardware/ti/omap4-aah/hwc/hwc.c
8594f3edb1632ad900d7a5f06e2819e65114924b 31-Aug-2012 Gustavo Diaz Prado <a0273371@ti.com> hwc: Fix incorrect tiler memory available check

When the buffers composed with DSS pipes use exactly the tiler1d
memory available (like 4 fullscreen layers on Tablet 2), the
prepare operation fails to assign a DSS pipe to the last buffer
(even if it was possible) making it to be rendered by the GPU
but without a pipe to show it. This patch fixes the incorrect
memory check that caused this problem.

Change-Id: Ibb147a468aa2e1622600a56f581013dc1e517777
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
Signed-off-by: Jonas Larsson <jonas.larsson@ti.com>
(cherry picked from commit a9606e762f54eb433880561548d0cb4498a3951e)
/hardware/ti/omap4-aah/hwc/hwc.c
b05c5715bd7f2321c9783a2943a8b98c719944c8 24-Aug-2012 Dandawate Saket <dsaket@ti.com> hwc: Stop queuing compositions to disabled default display

When HDMI is the default screen it may not be attached even
though the UI is active. UI compositions will keep coming but
the DSS manager will have problems if being programmed with
content incompatible with the intermediate display mode.

The last_mode variable is reset to "0" when hdmi panel is
not present. The on_tv variable indicates hdmi is default
panel. So if both are set then we need to make the overlay
number in composition to be "0".

OMAPLFB will skip posting the composition to dss driver when
overlay as "0".

There are still possibly compositions in the DSSCOMP queue
or in flight from PVR services to OMAPLFB so this behavior
doesn't cover all cases - so this should be considered a
work-around.

kernel dependency:
http://review.omapzoom.org/#/c/26982/

Change-Id: Idb6864aa57ebf6c403b91ea5b0e0865467008934
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com>
(cherry picked from commit a4a35a6efdf146cad32d76e6e07327a983cec6a1)
/hardware/ti/omap4-aah/hwc/hwc.c
b29f69b6b65a33ec0052036e8b6bf0c219cc157e 24-Aug-2012 Tony Lofthouse <a0741364@ti.com> hwc: HACK: wuxga panels will generate unscalable layers

During the transition from the recents panel to a selected application
during the transition a layer which requires a scale down from 1920x1200
to 594x361 is generated. This satisfies the normal limits but with buffers
of this size and also blending another 1920x1200 framebuffer. A VID1
underflow occurs.

This work-around avoids scaling when layers are wider than 720p and
are 4 byte RGB.

These conditions have been reproduced in isolation with ADTF.

Change-Id: If8fbc8f639abb89a0d736a3beabd2c12312ac3ac
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 9e71cf37889ee95d03a1ad200741752b5efa4b43)
/hardware/ti/omap4-aah/hwc/hwc.c
a41d64f2cc51096c1110f518b948c316bf15943b 24-Aug-2012 Tony Lofthouse <a0741364@ti.com> hwc: Add a bits per pixel function for RGB color space

Change-Id: I12d286ffe12c18bc9159a9bd1df65db43b63ac05
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit d98182ec972e6083daec80f2271d2678abcc7b28)
/hardware/ti/omap4-aah/hwc/hwc.c
4a3fef97a616e47d9b26a8cffa2833f230aba19b 24-Aug-2012 Tony Lofthouse <a0741364@ti.com> hwc: Add a handle to the can_scale function for future use

A scaling decision may need to account for the size of
a pixel as dss based scaling capability has a relationship
with memory bandwidth

Change-Id: Idd68e11317fb0bb9e5d19f0a0d5818744968a5ab
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit c53e458106e6c4346c092bf34d623ac11848f6bd)
/hardware/ti/omap4-aah/hwc/hwc.c
2acde915b4868129963ef7dc7afe1f3b35ffeeac 30-Jul-2012 Jon Pry <jonpry@gmail.com> Fix electron beam crash

Under certain circumstances the ICS SurfaceFlinger attempts to disable
the hwc module by calling prepare with the list set to NULL. This code
path is specifically used by the Electron Beam screen off animation.

Since blit_reset() is just checking for a geometry change, this patch
handles the list pointer null case.

Reproducible with:
service call SurfaceFlinger 8 i32 1

(Thanks Jon & Michael!)

Change-Id: I27114b173446729511115bc73e780e7fdca8722b
Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com>
(cherry picked from commit dfe13a6b856b8443e001f9d8ce51bb05aaf03499)
/hardware/ti/omap4-aah/hwc/hwc.c
83f80658d865b741a024515c523e373df50c091e 14-May-2012 Sunita Nadampalli <sunitan@ti.com> hwc: added support for ext display back buffer allocation

When the ext display transform is different from the FB,
the mirroring/cloning is achived with the help of back-buffers,
which are allocated in TILER2D space to get the required
transformation. This patch adds support in HWC to detect
the ext display transform and allocate back buffers from
TILER2D space and program dsscomp accordingly.

Signed-off-by: Sunita Nadampalli <sunitan@ti.com>

hwc: make file fix for local include path

the local include path for ion is changed from base level
to local. this is required to allow compiling at hwc level.

Change-Id: Ie1e9e6688652fdc8aa496dfc367d385aca362a27
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
(cherry picked from commit 5d7b83b7ee03be090076d9aefd40dac294377aac)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
a9bec459a62ebc71f9e74832047c2d9da8a84ff0 03-Jul-2012 Dima Svetlov <svetlov@ti.com> hwc: fix and simplify the idle timeout logic

Fixes the following issue : when non-blended layers are composited
via overlays and blended layers are composited via FB, the idle timeout
does not yield invalidation and re-composition of the layers via SGX
resulting in the increased power consumption when the UI is idle.

The change simplifies the idle timeout logic as follows : SGX only
composition is forced after the idle timeout.

Rebased from p-ics-mr1:
4573812 hwc: fix and simplify the idle timeout logic

Change-Id: I37216892536a6900b5fb58c0e6ac616ef3f3ef72
Signed-off-by: Dima Svetlov <svetlov@ti.com>
(cherry picked from commit d62680abaf25e807070c2ba236cdc2d0cc935408)
/hardware/ti/omap4-aah/hwc/hwc.c
5a87355f6a7ed393d5d8f71bf7aac5f65b87c640 11-Apr-2012 Muralidhar Dixit <murali.dixit@ti.com> hwc: fix can_dss_render_all decision logic for docking mode

Currently can_dss_render_all() doesn't consider docking mode for
decision making. In case of rotation on HDMI, current logic expects all
layers to be NV12 which is not true if in docking mode.

Adding logic to consider NV12 to be the dockable layer.

Rebased from p-ics-mr1:
6a5358f hwc: fix can_dss_render_all decision logic for docking mode

Change-Id: Ib56c88ef45293eb87e4db9bc1faa956ea96a533e
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
Signed-off-by: Varadarajan, Charulatha <charu@ti.com>
(cherry picked from commit c739886ef430dbb231357038410fbde6990bb19f)
/hardware/ti/omap4-aah/hwc/hwc.c
620a972bf780aff56d3a3c76e8f53ca8b0a3c17d 05-Mar-2012 Sunita Nadampalli <sunitan@ti.com> hwc: added interlaced modes to HDMI best mode selection logic

Modified HWC hdmi best mode selection policy to consider Interlaced
modes as well.

DRT#OMAPS00262232 - HWC hal doesnt have support for interlaced timings for HDMI

Rebased from p-ics-mr1:
a11e07b hwc: Added Interlaced modes to the HDMI best mode selection logic

Change-Id: Ie7bbe55c5694c53cc669c39ec125a72f723c3920
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
(cherry picked from commit 3e8c057eac76d6a28abfb2cda9698b022b7328cc)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
a718b61ddb61e613cef6f0053624b20d151da6ea 06-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: use triple buffer hint for overlay layers for debug

This is a cheat to discriminate between blit layers and real overlay engine
layers in dumpsys SurfaceFlinger.

This patch is benign for an OVERLAY type layer the hints field should have bit 1
set when using dss overlays, and clear when it was blitted.

Ported from p-ics-mr1:
1f4cf8b hwc: use triple buffer for overlay layers

Change-Id: I7a9afed74c0b2e44bf08d3611775be28530378a1
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 407ca87c9557dfd381f7ce765f080503722e7fd7)
/hardware/ti/omap4-aah/hwc/hwc.c
dfc644c88eeac97a2dd0feb5967e746fa64dd1c6 06-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: Add HAL_PIXEL_FORMAT_TI_NV12_1D

Ported from p-ics-mr1:
93f38c6 hwc: Add HAL_PIXEL_FORMAT_TI_NV12_1D

Change-Id: I6ec62cec7590b90fb58cddfbfb5d253b8a7b469e
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 7819b77e1a264805195cfa84c6da22de97b8bfe7)
/hardware/ti/omap4-aah/hwc/hwc.c
3d32f43362ff52bdac5a83855c63e8a8274da55a 13-Mar-2012 Tony Lofthouse <a0741364@ti.com> hwc: save some dumpsys log real-estate

With the SurfaceFlinger/GraphicBufferAllocator and gralloc HAL state following
the HWC overlay, HWC state often scrolls off the screen. Make the layer dump use
fewer lines.

Ported from p-ics-mr1:
037dac8 hwc: save some dumpsys log real-estate

Change-Id: I15d5e411056c57721105ca47b5deddfb496392d4
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 8e1337a74223aef92748843b80d0886f4c4f3a29)
/hardware/ti/omap4-aah/hwc/hwc.c
d5de2f43e7464783fd3168408a904c3ab646d652 06-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: move platform specific pixel formats to header

Change-Id: I7033d847621f748d0263d9004cb32f4426c115ef
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 1726714f2c75a37bf1c904e32d6c45eb68246ec5)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
b58eaa53ec93b4381c661adbaf90833f04b93c11 06-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: remove unused padded nv12 format

The padded NV12 format was never used.

Change-Id: I4796c71518edb3cd1c1a5daeed2a0045a45ca539
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit e3fe422bac3fba2f72c96b422c5d5a5e9fe04e8d)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
1fd204fb13367eb8279a1e2d1ee245ff0f441571 07-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: FPS property to show compositor performance

Use setprop debug.hwc.showfps 1 to show the average frames per second
displayed over the last 8 compositions.

debug.hwc.showfps can be set dynamically, the overhead of accessing Android
properties should be minor i.e. an access to an mmap'd() file, so this
should not be a significant overhead to composition when disabled.

Reworked from p-ics-mr1:
9ea53ce HWC: debug.hwc.showfps Android property shows current FPS
66a531d hwc: enable debug.hwc.showfps to be set dynamically

Change-Id: Ie2303e6ae9e73f38cf563d6ed6079928054e4c16
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 69400d18d6cfc7b2b55b5a563b1fd4387887ded4)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
f11c7bb8c6e7d0254eeaa4aadb8eae412580ac0e 29-Feb-2012 Lajos Molnar <lajos@ti.com> hwc: don't force upscaled NV12 layer to SGX when force_sgx is used

Let NV12 layer be rendered with overlay even when force_sgx is used,
if it is upscaled by more than a configurable limit (default 2x).
This will limit video twitching because of SGX limitations
when scaling NV12 layer.

Rebased from p-ics-mr1:
3eb31b9 hwc: Don't force upscaled NV12 layer to SGX when force_sgx is used.

Change-Id: I114633447c2d54677dce45e047c5a121e200185f
Signed-Off-By: Rajesh Vandanapu<rajeshv@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 2b826707289cd0052357187311d8d7bc1d5572a5)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
58aa32dc9d23875627e39f16831ffb471baf7890 07-Jul-2012 Tony Lofthouse <a0741364@ti.com> hwc: fix max_hw_overlay calculation in mirroring mode

When the protected content is present, we need to have minimum two
external overlays to achieve mirroring.

Rebase from p-ics-mr1
76f23bf HWC: Fix for max_hw_overlay calcualtion during mirroring mode

Change-Id: Ibf95232e5f5d3b11eb05b4b4506fceb118dbfdd9
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit cb9e6c8c4a37e5e1835cec8a10c774bbcc156637)

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
f1eab7b129ea2cf4bbbbfbec717a07b4419313c6 10-Jan-2012 Oleksandr Lugovyk <x0158320@ti.com> hwc: corrected calculation of lcd_xpy

On hwc open xpy for lcd is calculated. In case values in mm are not
provided (=0) the result of xpy is NaN. That influences further
selection of external display resolution and calculation of video
dimensions for external tv.

Rebased from p-ics-mr1:
8d481bf HWC: corrected calculation of lcd_xpy

Change-Id: I3494bd9c7bd797a27e985b474d6390606bb4106d
Signed-off-by: Oleksandr Lugovyk <x0158320@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit 94970d78bf886d766ef37ec29b935c1edb34090d)
/hardware/ti/omap4-aah/hwc/hwc.c
b319783cc9e00318eb67b554029bef5932d5436d 20-Dec-2011 Sunita Nadampalli <sunitan@ti.com> hwc: fix checking HW scaling limits for manual panels

This patch fixes the bug in the logic to check the DSS downscale
limits for width. The code should return false incase the downscale limit
is greater than the HW supported limit and the decimation limit.

It was returning true earlier, because of coding error.

Rebased from p-ics-mr1:
1d9d4dc HWC: Fix while checking for HW scaling limits for manual panels

Change-Id: Id62494feaaf778f62ed29e170dece647d48fd28a
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
(cherry picked from commit 0b72db0376f805b48574e0192d2d3a020550a957)
/hardware/ti/omap4-aah/hwc/hwc.c
876331fc77f6763c8c390d1289ead00f89f8d9fe 17-Oct-2012 Mike J. Chen <mjchen@google.com> Merged hwc with TI mainline version

Change-Id: I8390a3422c6ff8fa4bc4c0e6a11c51a884aba3cb
Signed-off-by: Mike J. Chen <mjchen@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
ef2e2467d7c5487cf3be888956adcdc686b03412 16-Oct-2012 Mike J. Chen <mjchen@google.com> Add ability to force a preferred mode via a property.

Useful for testing.

Change-Id: I3c6b05a75c360a7dac73270e4059312ba2ef8e88
Signed-off-by: Mike J. Chen <mjchen@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
751880491cd2d46a6bb0ff1070a0dc05557aa041 16-Oct-2012 Mike J. Chen <mjchen@google.com> Fake VSYNC events if needed.

If HWC clients (aka, surface flinger) want to be receiving vsync
events, and HDMI is unplugged, fake the events instead. This is
particularly important at startup on JB; the system thinks that it has
turned the display on and enabled VSYNC events, failure to deliver
them results in Bad Things. We cannot rely on HDMI hardware to
delvier the events if the HDMI link is not established, so we just
fake them instead.

(cherry-picked from 25ab304446afba89283c1a7c7225a69cc3cf4385)

Change-Id: Id4806f96d37cf8ad5b6a05d9077b3d88fd24f4d5
Signed-off-by: John Grossman <johngro@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
5142031872205241cfc707a7ac9bd77d095ff0f8 22-May-2012 Mike J. Chen <mjchen@google.com> hwc: Stash hdmi mode resolution in a property

The property can be read by apps like YouTube to choose
lower resolution videos if the hdmi mode is < 1080p.
Saves bandwidth, latency, and time wasted scaling.

(cherry picked from commit ce768b26571c66e176fa6d10c64ded578da937d9)

Change-Id: Ia44cc0263f3c77444221c96d73cda0979be3ee28
Signed-off-by: Mike J. Chen <mjchen@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
6d94b7785c5318b6de36193a7f5488a88b6178eb 25-Apr-2012 Dandawate Saket <dsaket@ti.com> OMAP4: HWC : Fix overlay assignement issue

It was found that when there are more than
4 layers overlay 3 was gettig multiple assignements.
This was causing the mouse pointer layer not to show
on the screen.

(cherry picked from commit fc8f4796e2893e4e0d6b9051fa7a37ecf522f0b8)

Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Muralidhar Dixit <murali@ti.com>

Conflicts:

hwc/hwc.c

Change-Id: Id91ecb1dc9f1a0ee7c20c1bf804f5440b0c21034
/hardware/ti/omap4-aah/hwc/hwc.c
27843d0acbb3d17ec4458900b6cd5e281a464611 20-Apr-2012 Travis Geiselbrecht <travisg@google.com> HWC: OMAP4: disable the first frame display reset

A hack to reset the display on the first frame was put in previously
to allow for a seamless transition between the boot logo from
the bootloader to the boot animation.

In our case, the kernel/hwc has already scanned and set the proper
hdmi mode, so we dont want to bounce the panel.

(cherry picked from commit eafa266c88c496aa539f46407fbdab137b86d2c7)

Change-Id: I858185c8a8416bff84ee77f67100c25f754c16b9
/hardware/ti/omap4-aah/hwc/hwc.c
ab9d83c73ae44ed9a8479d17ab4ab6b11354e8c4 12-Apr-2012 Travis Geiselbrecht <travisg@google.com> HDMI: update mode selection logic

The kernel now passes all of the modes to user space with flags
to specify whether or not it is preferred or not and if the
hardware actually supports the mode. With this, we can try to
pick modes that match the 'preferred' mode as specified in the EDID
from the panel.

If the preferred mode is masked due to the driver, the logic will
try to favor available modes that match the resolution of the preferred
mode. If none of these options are available, fall back to the
older logic of trying to find the best mode to match what the
current framebuffer is set to.

(cherry picked from commit c63364590d5df4837438ba69b4ba7dad66af3321)

Conflicts:

hwc/hwc.c

Change-Id: Ic796819b60665ec34f4c9967f31f0cc1f2cb7a28
/hardware/ti/omap4-aah/hwc/hwc.c
102a8fb9163ada1f891758f5c5b36d5e2c8ecefb 12-Apr-2012 Travis Geiselbrecht <travisg@google.com> Squelch a particular log message about assigning a z-layer to the fb:

"**** should have assigned z-layer for fb"

Should find the real reason behind it, but for now it's filling up
the system logs.

(cherry picked from commit e22bec1a7e61fd1d0355587305c3233e5a44508b)

Conflicts:

hwc/hwc.c

Change-Id: Id1d296d1afde25d7b71a70e1a5d4f40dfbe098f6
/hardware/ti/omap4-aah/hwc/hwc.c
fc13c9292160e3eb83fe5b4f191d1ccee2fd67d9 19-Mar-2012 Travis Geiselbrecht <travisg@google.com> hwc: disable using DSS for more than one hw RGB32 layer > 1280x720

Current dss hardware seems to be able to handle 2 layers of 1080p RGB32
content before buffer underrunning. One layer (OVL3) is always consumed
by the framebuffer, so we're left with at most one 1080p layer from
surfaceflinger.

Add code to punt the 2nd and above 1080p RGB32 layer to the SGX.

This works great for games and video content, since they seem to
generally be RGB16 and NV12 layers, which DSS can deal with.

(cherry picked from commit 299fdc0df5540a56df0796ff82d153f637c26fa1)

Conflicts:

hwc/hwc.c

Change-Id: I095180dedaf16955996804f795a474c08e47a349
/hardware/ti/omap4-aah/hwc/hwc.c
5db21d521ed41e2e2cc110b698981e841e027287 09-Mar-2012 Dandawate Saket <dsaket@ti.com> hwc: Add support for FB scaling and cloning

Patch contains following features
1)Large frame buffer support:
Transformation matrix for LCD and HDMI added
to ensure correct composition and renderring
of all UI layers
Added support for overlay distrubution based
on FB size and target display
2)Default HDMI display support
Support for default HDMI display selection.
Added HDMI best mode selection on HPD

(cherry picked from commit 8e8bf69d94423df082460c43d818e58046b2d1de)

Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>

Conflicts:

hwc/hwc.c

Change-Id: I591577b973405197d3254f3c83138036e67e9789
/hardware/ti/omap4-aah/hwc/hwc.c
3d6b69f0a0fb325443ef8c2987c16af1f8618d3e 07-Sep-2012 Jesse Hall <jessehall@google.com> HWC field was renamed

Change-Id: If08258776db427c45d9ba70cfa79f4d290398ca6
/hardware/ti/omap4-aah/hwc/hwc.c
3a96e09f206327fb5fd64d3fdc7ba3a315421082 21-Aug-2012 Jesse Hall <jessehall@google.com> Update for cleanups in hwc interface

Change-Id: I7851cd5ca7cd826b3b4b35e6df90ce1e2a9f4327
/hardware/ti/omap4-aah/hwc/hwc.c
6ce89d3c3ec5d07a21bd1fc33f6ff61d67acbe95 17-Aug-2012 Andy McFadden <fadden@android.com> Update the omap4xxx HWC to use the 1.0 interfaces

Switch to HWC_DEVICE_API_VERSION_1_0 and the corresponding
structures.

This change removes special-case handling for Panda, which was
using v0.2. This will likely break the Panda display.

Change-Id: Id9ba6910ae2285d116f697bfa5af2c1f6b022ce0
/hardware/ti/omap4-aah/hwc/hwc.c
d64ff502731a2e42df31ec24f287bac5b77e1312 02-Aug-2012 Dan Murphy <dmurphy@ti.com> OMAP4:Panda: Use old hwcomposer API version for panda

The hwcomposer for OMAP4 is generic to the all OMAP4
processors.

Panda does not support Vsync protocal which is expected
when the HAL declares an API support level of 0.3.

Therefore indicate to the upper layers that if the product is
panda then only API level 0.2 is supported which then forces
upper layers to fake the vsync signal

Change-Id: I22a39f55ea017ced25424556ffc95b099d0a2781
Signed-off-by: Dan Murphy <dmurphy@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
16b7f6c4b06ac7350c30309d0559a466097d8ae7 07-May-2012 Lajos Molnar <lajos@ti.com> hwc: Fix truncation errors in scaling decision

When checking if we are downscaling beyond what the hardware
supports, we were dividing by the factors rather than multiplying
the other side with them. The truncation of the divisions had
hwc allowing downscaling by a factor slightly larger than what
was supported.

Change-Id: I6ae4d897f4afe68ae26f0d7385e4003d6f2a4253
Signed-off-by: Lajos Molnar <lajos@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
1a45d7e2f85f1e3f3eeef590aa52316376055440 19-Apr-2012 Mathias Agopian <mathias@google.com> WORKAROUND for Bug:5965421

looks like certain scaling factor cause the overlay engine to go all black.
Limit the vertical downsampling to 4x instead of 8x

Change-Id: I9034fb99b64c6936059970553b24eba5c941ebdd
/hardware/ti/omap4-aah/hwc/hwc.c
bc85c3e357438aca809270bc8e85f5479bbe6a40 11-Apr-2012 Erik Gilling <konkers@android.com> hwc: add handling for new style vsync events

Change-Id: Ia435c57e0938826206010a3bdb58bcefe4201405
/hardware/ti/omap4-aah/hwc/hwc.c
e914b7e0a972af85845268ecf962773b8e4da977 25-Mar-2012 Mathias Agopian <mathias@google.com> add API 0.3 support to HWC HAL.

this includes support for VSYNC

Change-Id: I14b8b133b29b0b6c825d67d18d5262843ca6bd96
/hardware/ti/omap4-aah/hwc/hwc.c
bd6a9f2c001ca2e9e33bf72c196709192d7d5045 03-Apr-2012 Mike Lockwood <lockwood@google.com> Merge commit '04512dd'

Conflicts:
hwc/hwc.c

Change-Id: I8e55acb05f4f01aa404296fd200286b4a435e3f9
a35209b2e26289458670e04d6e62dee3d085ea63 24-Mar-2012 Mathias Agopian <mathias@google.com> update to new versioning scheme

Change-Id: I53feed711d7c347da116a91e10228cb6555a1e77
/hardware/ti/omap4-aah/hwc/hwc.c
04512dd8a3fd2830139e3f352a295841c7eed190 15-Mar-2012 Travis Geiselbrecht <travisg@google.com> hwc: pull down 32 modes instead of 16, some panels have a lot

Change-Id: I8707839bdf49278a7f62376a9bb5a8cb36f2a4de
/hardware/ti/omap4-aah/hwc/hwc.c
8e8bf69d94423df082460c43d818e58046b2d1de 09-Mar-2012 Dandawate Saket <dsaket@ti.com> DO NOT MERGE

hwc: Add support for FB scaling and cloning

Patch contains following features
1)Large frame buffer support:
Transformation matrix for LCD and HDMI added
to ensure correct composition and renderring
of all UI layers
Added support for overlay distrubution based
on FB size and target display
2)Default HDMI display support
Support for default HDMI display selection.
Added HDMI best mode selection on HPD

Change-Id: I1123607d07830921fbb28336b40fa4e0c78c3097
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
03e11edd578940e72095b1366591a461f74452f8 07-Jan-2012 Mathias Agopian <mathias@google.com> don't vsync after swap since SF now is vsync'ed

Change-Id: I2e0636c3a386203e0aaee8c97b1affa4ee96f699
/hardware/ti/omap4-aah/hwc/hwc.c
46de639b23db99d7b99ff1c676ac98b84b6336c6 08-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I7d131473964d92c62a495d082a1207867f435885
/hardware/ti/omap4-aah/hwc/hwc.c
a4e4aeab47b17a82524ac56f2d69daa3e47c1ce7 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I71aea6795e3ed22beacb9a8f5774499e96c69a4d
/hardware/ti/omap4-aah/hwc/hwc.c
bb0a9edbe9d4072ed227550d898f0c2d0149e0ba 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib3b6ce6a89755e29aa9f830e9185064c25dd138e
/hardware/ti/omap4-aah/hwc/hwc.c
3a7df2c042eb8c7289e24e77dd316f73bd0c456f 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I551e5a040249a8908251cd8c8d7131287f1f53de
/hardware/ti/omap4-aah/hwc/hwc.c
ba56cfd0de81c590a026fa32061b2a9f53ca8550 14-Dec-2011 Lajos Molnar <lajos@ti.com> am 40e6beac: am 449e98a9: hwc: set FB z-order when there are no hwc layers

* commit '40e6beac1e9977ff2ca763e6e8abcc2463fa76cf':
hwc: set FB z-order when there are no hwc layers
a50e8216fafe5343bece7617f5f9dc101210a775 14-Dec-2011 Lajos Molnar <lajos@ti.com> am c7bdd444: am 0aead355: hwc: added static image support

* commit 'c7bdd44463cd9b32a3d6a5647beaff541a5e29f7':
hwc: added static image support
a7e1cf223e23a08ed1483ff87abc48e583b1e4e2 14-Dec-2011 Erik Gilling <konkers@android.com> am 252f905d: am 12c821db: hwc: update to new addressing mode handling

* commit '252f905d197c5f385d21686a4368ab1114b84e39':
hwc: update to new addressing mode handling
449e98a958753e6ae8f16b923596af0c6783ff8a 13-Dec-2011 Lajos Molnar <lajos@ti.com> hwc: set FB z-order when there are no hwc layers

When there are no layers passed to hwc, FB is still used, and
z-order must be set.

Change-Id: I7e45f56468b47712f7686b78ba0650943037c64a
Signed-off-by: Lajos Molnar <lajos@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
0aead355133c2a087cb369c5eb62a07cbd4a13be 09-Dec-2011 Lajos Molnar <lajos@ti.com> hwc: added static image support

Display static image if connected to portrait dock and there are no
dockable layers.

Change-Id: I572cf9ef5bf66ac194c3a83920a8de3be1e6d4e4
Signed-off-by: Lajos Molnar <lajos@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
12c821dbf70ee94bd9702e7cb60c66c8156c83d6 13-Dec-2011 Erik Gilling <konkers@android.com> hwc: update to new addressing mode handling

Specify Post2 and cloned layers.
Fix potential overflow in zorder of cloned (dock) layer.

Change-Id: I534fe30e6b90415070824ceb7abff65e9b93c9ec
Signed-off-by: Lajos Molnar <lajos@ti.com>

Conflicts:

hwc/hwc.c
/hardware/ti/omap4-aah/hwc/hwc.c
03c4fb35d1129c3c3dd9fec4d6fda907056f9d13 12-Dec-2011 Lajos Molnar <lajos@ti.com> am 04a0e38d: am 2b86fd0c: hwc: add support for forced docking (in the dock)

* commit '04a0e38d7c4d8a94fbc84eac36cb6d06412cd7b7':
hwc: add support for forced docking (in the dock)
4794ce6c02fcb195611d24745dc4df39a19e5417 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 5119962c: am e14d5293: hwc: extract HDMI mode scoring function

* commit '5119962cd2520a3e4d3f2a2a15d6596c28fba04f':
hwc: extract HDMI mode scoring function
d807a3cc21661b7b21e99c2049b350464344c846 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 20e79c05: am 3837de4f: hwc: refactor prepare: extract out hdmi cloning methods

* commit '20e79c05615092da8f48d8ca41745d0c9c5479ce':
hwc: refactor prepare: extract out hdmi cloning methods
45b2e9ae6450f25d9805d6e8fc8907bd93076be0 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 25487b34: am 44a0023d: hwc: refactor prepare: separate gathering layer statistics and cloning decision

* commit '25487b340cdb1cf93882d874858615872c2035de':
hwc: refactor prepare: separate gathering layer statistics and cloning decision
b33830855ed0193329199586d2c488e98a9b0510 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 53d3c74d: am 3797fa98: hwc: use LCD\'s pixel aspect ratio

* commit '53d3c74d3113a666167062afa15be6d447ae7361':
hwc: use LCD's pixel aspect ratio
a281714fd6b08b891c0ee933eafe5b3d224cd0b4 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 226ff52b: am 00d8485d: hwc: minor code cleanup

* commit '226ff52b58437487ac65c8fa853fe6c646d3d468':
hwc: minor code cleanup
2bb4b2916471bf8b2ff5693a52c52e223a92edc6 12-Dec-2011 Lajos Molnar <molnar@ti.com> am e10ef2cd: am b81fb68c: hwc: simplify layer hint setting

* commit 'e10ef2cd8f619915d9638b5b5178ceae23520290':
hwc: simplify layer hint setting
42e67cd12c61239ec153888b77c9c1eb2398f914 12-Dec-2011 Lajos Molnar <molnar@ti.com> am c8124479: am 5706ba0d: hwc: simplify color format handling

* commit 'c8124479e9a96661bc6394456c5a8b7e8e869e94':
hwc: simplify color format handling
dd8e2c0ed2bbb934baead002dcd5e84604027e14 12-Dec-2011 Lajos Molnar <molnar@ti.com> am d4d10c5f: am b79b42d1: hwc: cleanup: fix spacing, removed dead code

* commit 'd4d10c5f5080ca01469ebf8429bb3c164a6f9856':
hwc: cleanup: fix spacing, removed dead code
9029d6821b9d03cc0c828345bf8265bd8366e93d 12-Dec-2011 Lajos Molnar <molnar@ti.com> am bda528cf: am 734de7a7: hwc: cleanup: cleaned up debug messages

* commit 'bda528cf43b2d7ca91fd9da3ebb08e5166fa7cfc':
hwc: cleanup: cleaned up debug messages
5dac7347354b29e20be6731b07c46b0fdca1594d 12-Dec-2011 Lajos Molnar <molnar@ti.com> am 8fc542ad: am e055e4bf: hwc: cleanup: resolve compiler warnings

* commit '8fc542adafd4ac4e94d24b75e5e1bf4b3f64f1ba':
hwc: cleanup: resolve compiler warnings
4b4312f833d4680c8020d638d35c0d2e47e907b4 12-Dec-2011 Lajos Molnar <molnar@ti.com> am cc230bb4: am cb64c2be: hwc: remove name collision for DISPLAY_SETUP_DISPLAY

* commit 'cc230bb412aa0bba51d0ca32cc82d1555538e392':
hwc: remove name collision for DISPLAY_SETUP_DISPLAY
1612a86ae99c996db464778f405e00e448627440 12-Dec-2011 Lajos Molnar <lajos@ti.com> am 085c0e54: am a752a6ad: hwc: Fix calculation of on_tv

* commit '085c0e5468f3ba46f42749f84828cfd3ec6a7b78':
hwc: Fix calculation of on_tv
3ef73757e76e5109d78ad67b244a4f0706cc62f6 12-Dec-2011 Lajos Molnar <lajos@ti.com> am 4b9a8e20: am 4b267e18: hwc: fix issues handling force_sgx

* commit '4b9a8e20618eab9b5a581a97586c5808f8571d28':
hwc: fix issues handling force_sgx
2b86fd0cbeb42123fc20b1f646ee81299e831d16 08-Dec-2011 Lajos Molnar <lajos@ti.com> hwc: add support for forced docking (in the dock)

If the dock switch is set high, mirroring is disabled and docking
transformation is set to 0.

Change-Id: Ief0f14874459f3ff435e6b43088f524af322524f
Signed-off-by: Lajos Molnar <lajos@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
e14d52936107e390e2464df1e6653efde5409096 11-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: extract HDMI mode scoring function

Separate HDMI mode scoring function so that it is easier to
modify.

Also changed scoring function to be cumulative instead of
absolute, so that priorities of the sub-scores can be easily
changed.

Change-Id: I3f803c13c1482653b8a3fb26a47a8fefecc51b4b
/hardware/ti/omap4-aah/hwc/hwc.c
3837de4ff6b7562965758dd2a7af5550af1bd869 11-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: refactor prepare: extract out hdmi cloning methods

Extract setting up mirroring into setup_mirroring().

Extract cloning an overlay into clone_layer().

Extract cloning an external layer into clone_external_layer(). This
also sets up the transformation for that layer.

Remove omap4_hwc_create_ext_matrix as it was nearly the same
as setup_mirroring(). Move missing functionality (VGA default) into
omap4_hwc_set_best_hdmi_mode().

Removed forced "common" cloning loop for mirroring and docking
support. Instead implement them using the extracted functions.

Change-Id: I3d53397f6f5c98d1f1c512b7098f5a1c495dd93f
/hardware/ti/omap4-aah/hwc/hwc.c
44a0023db5b752a81fb0bd3badd4cca1a1c4edc0 11-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: refactor prepare: separate gathering layer statistics and cloning decision

Extract logic that gathers layer statistics into gather_layer_statistics().

Extract logic that decides supported cloning configuration into
decide_supported_cloning().

Move prepare log to end of function.

Change-Id: I9bf3a5a1072b9d548da039e25739009dfb5ba06e
/hardware/ti/omap4-aah/hwc/hwc.c
3797fa989f5fee97caea2bbadf433a5a9ac03d8d 07-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: use LCD's pixel aspect ratio

Now that LCD provides its dimension, use it instead of assuming 1:1
pixel ratio.

Change-Id: I92e90132986aed66d43165d181789efaa2369bbd
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
00d8485d3d319633f410e52cab1562fe165af1e3 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: minor code cleanup

Change-Id: I51434effcb688fa065bdd422a721282b05a192f4
/hardware/ti/omap4-aah/hwc/hwc.c
b81fb68ce4c70170ebc9e41f9fe4540cc05685d5 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: simplify layer hint setting

Set HWC_CLEAR_FB hints in the main loop.

Change-Id: I9fb0e4241b9d3975422070daeef0706d954947b2
/hardware/ti/omap4-aah/hwc/hwc.c
5706ba0da054830e63b82b195ec32a97c390bd2c 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: simplify color format handling

use handle instead of handle->format for most format checker methods
incorporate blending handling check into omap4_hwc_setup_layer_base

Change-Id: I336b3063c162733151f403b5c3de06699fcc3404
/hardware/ti/omap4-aah/hwc/hwc.c
b79b42d125e488c0bcf101edfd3b1f30bafae53e 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: cleanup: fix spacing, removed dead code

Change-Id: Ie36e79f80bc610b75361f592c6ed7a028e877cd5
/hardware/ti/omap4-aah/hwc/hwc.c
734de7a7631e5f115ee89c5b2f35c7c484098779 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: cleanup: cleaned up debug messages

Change-Id: Idf7a0623dd5559cc1273389a5a673b28a8be39f6
/hardware/ti/omap4-aah/hwc/hwc.c
e055e4bf77e6c429d7a159e8e853974d9dfc57ad 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: cleanup: resolve compiler warnings

Removed compiler warnings

Change-Id: I5b6da58e48e526ccceada1cbe89291275b62c60f
/hardware/ti/omap4-aah/hwc/hwc.c
cb64c2be21ad9550b1f5d2b4a8361e997b9be757 27-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: remove name collision for DISPLAY_SETUP_DISPLAY

This was defined both as an enum (flag) and as a define. It is
now separated in dsscomp.h

Change-Id: I1626842b9c3b22588d0d5a48e4509e1bc353eaab
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
a752a6adca3e4aebbd2876cc5f4d8e17ebf719dc 05-Nov-2011 Lajos Molnar <lajos@ti.com> hwc: Fix calculation of on_tv

We are only on TV if we are actually cloning to external display.

Change-Id: I4a6cb7a58f5a00b71cf18c0cd3927bbec0fe74a1
/hardware/ti/omap4-aah/hwc/hwc.c
4b267e18b9e98b788d2b1bf2f1268ed25e5b726d 05-Nov-2011 Lajos Molnar <lajos@ti.com> hwc: fix issues handling force_sgx

There were a couple of incorrect fixes to force_sgx handling that
are fixed by this patch.

1. no need to disable force_sgx if there are protected layers.
We only need to route protected layer to DSS.

2. dockable layer must be rendered via DSS (or force_sgx must be
disabled, although that reduces power savings) if we are in
docking mode. Prior fix of cloning an arbitrary layer as the
docking layer was incorrect (as it was doing UI mirroring),
and was calculating the layer index incorrectly.

3. forcing sgx rendering actually increases power if there is only
one layer.

Change-Id: I121747ed06834f870e0f0793d38bf4e77f969858
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
88e70acadf39fb905ba0159c194af7222ac5a7b4 11-Nov-2011 Jamie Gennis <jgennis@google.com> am 2f9d236b: am b1c5d8ef: HWC: Only invalidate on idle when blending

* commit '2f9d236b408d1209bc97f1b45951b9e21adef542':
HWC: Only invalidate on idle when blending
b1c5d8ef7fc96ef49a1eaef0d81ff35dc4d2e4e7 09-Nov-2011 Jamie Gennis <jgennis@google.com> HWC: Only invalidate on idle when blending

Change-Id: I6e07129502f59f26768895c30dcdb50b01011738
/hardware/ti/omap4-aah/hwc/hwc.c
276f589a430f7084dd2a903a1aa6eaabe1e5bf50 19-Oct-2011 Sunita Nadampalli <sunitan@ti.com> HWC: Fix for dock mode setup

The dock plane index is set correctly, in the scenario
where there is no HW accelerated overlays.
Earlier in this scenario, where all the layers were composed
by SGX (no layer for HW acceleration), and the external display
was setup for DOCK mode, the dock_layer index was left undefined (-1)
and hence the behavior was unpredictable.

Change-Id: I69ff7795080f3257db70b5a6a143afca53924524
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
ac837f2654f5a7a7fbecf05e4b085b87a7701714 20-Oct-2011 Steve Block <steveblock@google.com> Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: Ic854588fa661ebcc63395c388bf98af268b709c7
/hardware/ti/omap4-aah/hwc/hwc.c
6a3b9aa7679bb28f4cabb5c2d8c501ceea394c6a 19-Oct-2011 Sunita Nadampalli <sunitan@ti.com> HWC: Fix for dock mode setup

The dock plane index is set correctly, in the scenario
where there is no HW accelerated overlays.
Earlier in this scenario, where all the layers were composed
by SGX (no layer for HW acceleration), and the external display
was setup for DOCK mode, the dock_layer index was left undefined (-1)
and hence the behavior was unpredictable.

Change-Id: I69ff7795080f3257db70b5a6a143afca53924524
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
4ce532200f33ca2c77cd66de924c83decaf7fa30 19-Oct-2011 Sunita Nadampalli <sunitan@ti.com> HWC: Disable SGX force usage if protected layer is detected.

Fixes b/5475085

In secure playback mode, SGX does not have access to protected buffers and a
forced SGX usage results in an invalid frame to be rendered and displayed. This
patch disables SGX force usage if any of the layers is protected.

Change-Id: I188cf1639050687a96df42b310c12875fec383f7
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
4e635e537afaa9f1416fa5bdbfd1b03afd8b7e6a 13-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: avoid changing HDMI modes

Prefer to use the same mode for docking as used for mirroring.
This avoids changing modes when playing low resolution videos, but
may produce worse quality on some TVs.

Added persist.hwc.avoid_mode_change property (default 1) so that
this behavior can be disabled.

Also, reworked mode scoring so that each term can be easily reordered.

Change-Id: Ie25aa4dba11d3922e510257e7a8e88d2379bb6d7
/hardware/ti/omap4-aah/hwc/hwc.c
4cb51e55fa79a592d50d94c0700660e42c988a0b 11-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: only set HDMI mode if it changed

Reduce delays while reconfiguring HDMI mode if the mode doesn't
actually change.

Change-Id: I72f30074f09a6440e12c9eff33bd5f71b8f37e85
/hardware/ti/omap4-aah/hwc/hwc.c
e9858ecc1d41ff5bd81651e6b405c1ad9b3de4ba 14-Oct-2011 Lajos Molnar <lajos@ti.com> hwc: add tolerance to video aspect ratio changes

Slight changes in the aspect ratio of the external layer occur
when the layer is resized on screen due to rounding errors.
Add tolerance, so we do not reconfigure HDMI due to these slight
changes.

Change-Id: I4b1b4c5dfb80ebbd83e26eb78dd86269b756307c
/hardware/ti/omap4-aah/hwc/hwc.c
02150d77cba303ea6c532fa740910fbab5e3e1cc 18-Oct-2011 Mathias Agopian <mathias@google.com> Revert "Revert "hwc: fallback on GL after idle for power savings""

This reverts commit fe265d600bd8d8f17df5f0f0b387dbd4608562e8.
/hardware/ti/omap4-aah/hwc/hwc.c
fe265d600bd8d8f17df5f0f0b387dbd4608562e8 16-Oct-2011 Mathias Agopian <mathias@google.com> Revert "hwc: fallback on GL after idle for power savings"

This reverts commit c56ae9077b825d952a6498bd25afdfc4b344f929.
We believe this change is triggering another bug causing hangs.

Change-Id: I91cae91fbbfdde195a98ea7e14562cfc5894d466
/hardware/ti/omap4-aah/hwc/hwc.c
c56ae9077b825d952a6498bd25afdfc4b344f929 12-Oct-2011 Erik Gilling <konkers@android.com> hwc: fallback on GL after idle for power savings

If no frame has been posted for 250ms, rerender using GL to take load off
the overlay engine.

Change-Id: I1790f7b7b43fd0d60b7392b9aec01339234aa915
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
1b24d08333d1f847e6211aaa1b81f5792aca2704 06-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: fix docking mode orientation and cropping

We cannot reset orientation to 0 when docking, as video layer may
be encoded in non-0 orientation.

hwc.hdmi.docking.transform is now applied (as an add-on) to the UI
orientation, but only if mirroring is not enabled. Otherwise,
mirroring transform is used. This is because UI is already
oriented into "mirroring/landscape mode".

To simplify the pixel ratio preservation, introduced a float xpy
instead of integer xratio/yratio. xpy should be same as
xratio / yratio, and is the x:y pixel ratio.

Also docked layers do not need to be cropped to the mirroring
region.

Change-Id: If01d2ae698f4fb896db65417c0bc218b294f966f
/hardware/ti/omap4-aah/hwc/hwc.c
dd922b9387f70e24b3462afe1bdc86ceb7541d4b 12-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: make clone region property persistent

Change-Id: Ibf36295966522f03104a77cd6842559f6607fc5d
/hardware/ti/omap4-aah/hwc/hwc.c
8d546610cba3698c62af537d97e38a7368362f1a 29-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: allow specifying clone region

Added android property ro.display.clone.region to set the clone
region in case we do not want to clone the full framebuffer to
HDMI. (E.g. status bar may not need to be cloned.)

Change-Id: I35f2207c49b3a56ff61309efebe61b9dee6cfb8c
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
ffa0d75e7fa7142eb289ccc9c7dc04e4cedb7c46 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: cleanup: consolidate cloning state and configuration variables

consolidate variables used to select cloning configuration and
state.

Signed-off-by: Erik Gilling <konkers@android.com>
Change-Id: I49af8efdefef6dcb784bfed1da58f704cdb76dba
/hardware/ti/omap4-aah/hwc/hwc.c
2704d381ccfba0fe96e61cd368507506c3adfaca 29-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: simplify: use macros for getting width and height of hwc_rect

Change-Id: I5fbccdb3b9504d1fe3480da59578909e1c233d83
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
d4599029522592f46eccf9d57add7ebd7d23fdd1 29-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: simplify: use swap() macro

Change-Id: I3c4a83a64bee10d8810fd292bb53dfff7be8d664
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
f4524c063d4cc4afeb19b08966f51b42257d3acd 30-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: assume possible TILER2D layers when deciding HDMI mode

TILER2D layers have stricter scaling limitations, so assume
possibility of TILER2D layers when deciding if they will be able
to be cloned for the HDMI mode.

Change-Id: I7b6c89cb4216ae27a793ea3b1b4f8e8e40b654cc
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
aa9be8a14744cae50a8f99e6cbb44be0d0c2c938 07-Oct-2011 Erik Gilling <konkers@android.com> hwc: shorten persist property names DO NOT MERGE

The old ones were too long and could not be set.

Change-Id: Ic0519025dcb0df223e4f87b4af67c12e94f5f486
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
3ce041c37296bf7aabef099f49980277eb00b7a3 07-Oct-2011 Erik Gilling <konkers@android.com> hwc: make docking/mirroring properties persistant

Change-Id: I343b2c8ff7adbe56ce16ac80aa3c001e20eba56b
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
41bb71e35280943ebe07ecfe1cf9e015918164e8 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: finetune hdmi cloning support

Use properties to enable/disable hdmi mirroring/docking, and to
set transformation for mirroring/docking:

hwc.hdmi.mirroring.enabled
hwc.hdmi.docking.enabled
hwc.hdmi.mirroring.transform
hwc.hdmi.docking.transform

The following use-cases are supported:

1) mirroring-only (external layers are ignored) - for testing only
2) docking-only
3) mirroring and docking (default)

transform values are bitfields:

bits 0-1: number of clockwise 90-degree rotations
bit 2: horizontal mirroring (applied after rotation)

mirroring transform is performed in addition to LCD transformations.
docking transform is performed on the actual layers.

Change-Id: I9822355afba79f4e7f1f7615e7e1e713daab4dd7
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
e5e76dcdc7a22aff59c931354ee3cfc7529ace3e 05-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: refine HDMI best mode selection: favor less scaling over aspect ratio

Pick a size that scales less over a size with a better aspect ratio fit,
because the aspect ratio of the display is constant anyways. This will
avoid selecting e.g. a 4:3 aspect ratio 480p format when displaying a 4:3
high-resolution video.

Change-Id: If5e378208809625c34c1d53ec8018cf0b653be3e
/hardware/ti/omap4-aah/hwc/hwc.c
bd0fe036293115c9f9b182ed2a911bdd557ea491 29-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: invalidate only when we have to when switching to hdmi

This moves forcing of invalidate only if all overlays are used
on LCD. Then the layers will be first rendered with one less
overlay/half of the overlays on LCD, freeing up overlays. On
the second invalidate the cloning will start.

This patch also resolves a potential race conditino when setting
ext_requested.

Change-Id: I0b9cf81091c9f66e37d3dab5f9f9648147c7295c
/hardware/ti/omap4-aah/hwc/hwc.c
0f28098bbd8976f5a182604226da293747ac824b 29-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: do not pick interlaced hdmi mode as it is not yet supported

Change-Id: Icc68bc26d7acc939d512dfaaf0bad12c97f9d701
/hardware/ti/omap4-aah/hwc/hwc.c
4ceb627d195b2efb8cfa3612f38cee211436a7a2 27-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: decide scaling support based on correct display's pixel clock

Fixes the following issues:
- external display scaling check should use mode's pixel clock
- pixel clock is not relevant for manual displays (where pixel
clock is 0); however, 0 pixel clock for external display means
that display is off.

Change-Id: Ief404811ed0f5152784490e97ac965f0e44fb4de
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
24a18d2f746877f2abd63e95b4be9c54dac4472e 04-Oct-2011 Lajos Molnar <molnar@ti.com> hwc: reset screen before first set

Move resetting of screen (blank/unblank) to just before first
set. Also turn off bootloader image, as blank/unblank does not
change the composition.

Change-Id: Ia1d25887dcc566ba2c20f8d390199d815d374d7a
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
f1e357b2cf26fa5a50789061e068e4f0bd4ea772 30-Sep-2011 Mathias Agopian <mathias@google.com> improve logging in hwc.

we now print the handle of overlay buffers.

Change-Id: I6df51fec1f0227afce2d7e5bb85b994167ca1e01
/hardware/ti/omap4-aah/hwc/hwc.c
4af5978e0677b13118611721f265e2dbaba849ff 27-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: fix overlay assignment if all layers are scaled

Fix a bug that assigned the same overlay for multiple layers if
all layers were scaled or NV12.

Also, the number of NV12 layers displayable by DSS is limited.

Change-Id: I4db33d7fc8563930a1e4214a704af2728fb9cec0
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
04c7041e0dc1e9c7d2c4e1be1e78a092de993c27 16-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: keep video pixel ratio in docking mode

Use the displayFrame size to determine pixel ratio for layer to
be externally displayed

Change-Id: I5eff81b2d91c4b1e5cd76a623eb73dd37e8684db
/hardware/ti/omap4-aah/hwc/hwc.c
6c12df17d9a51d20ca799ca22ffee6818d438c94 16-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: fix issue if external display dimensions are zero

Assume 1:1 pixel ratio if any of the physical dimensions of the
external display is 0.

This fixes a division by zero error.

Change-Id: I54d257e7fdcdd2daf49212b358d3ff2cf5d76ffc
/hardware/ti/omap4-aah/hwc/hwc.c
bd43f27d21c976df59645759598e530ba1a8e01e 15-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: set hdmi resolution in docking mode based on layer dimensions

This allows e.g. playing 1080p video in 1080p mode.

Change-Id: Ie0063baeb5d09325ab36a10b73050d9eb3fbbbe0
/hardware/ti/omap4-aah/hwc/hwc.c
834b8ba01376239a2f286a3766c14bdeeb166498 15-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: unify HDMI docking and cloning

If we have a surface with external display usage marked, switch
to docking (clone only that surface to HDMI). Once the surface
goes away, switch back to cloning.

Also change docking mode support:

Select dockable surface based on the usage bit instead of the
color format. For multiple such surfaces, pick the one with the
largest display area.

Change meaning of hwc_dev->ext transform bits for docking mode.
These are applied purely to the surface buffer, instead of as an
additional transform on the surface displayed on LCD. In other
words, the surface displayed on HDMI is independent of the UI
orientation.

Change-Id: Ic6895ba0ff275ca374eb72d0fa7d93a634111d1a
/hardware/ti/omap4-aah/hwc/hwc.c
db1cf523ed35a44e6721570c8a7e11c63d092686 19-Sep-2011 Erik Gilling <konkers@android.com> hwc: blank and unblank screen on open

Change-Id: Ib6c1ce8183a2dcd4aef3bf03e075766efafd1435
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
a89b33044588b57aef9efe25eca784b6d6023f91 14-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: remove log spam on unhandled formats

Fixes b/5290568

Change-Id: Ie02c4bc1f06d251e057d2a17adfa8e4f04ace667
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c
7f2cbf97908a26e0b463d4fa20040b129216f86e 13-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: call wait-for-vsync in set if eglSwapBuffers is not called.

This adds a rate-limiting similar to when eglSwapBuffer is called,
so that DSS-only compositions do not complete instantly.

Change-Id: I5b6ea7f5b258d6b0c35068ba1bdc91f342227e4a
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
ae5ccc208800debb41acfc45096d318847e8db50 09-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: support CEA standard aspect ratios and finetune HDMI mode selection

Using the screen's aspect ratio does not work for CEA modes, where the
mode's aspect ratio takes precedence.

Select HDMI mode based on the following precedence:
1. pick CEA mode over VESA mode (for audio support)
2. pick a mode where we are upscaling (for scaling support)
3. pick a mode where the framebuffer fits most of the
screen (minimize black bar area). This in effect picks a
mode with the closest aspect ratio to the frame buffer
4. pick a resolution closest to framebuffer's resolution
5. pick the highest refresh rate

Also only select an HDMI mode where we will be able to
scale the UI to the screen.

Change-Id: Ic8985436b88577cfa59f284eecbda6cdd340de6f
/hardware/ti/omap4-aah/hwc/hwc.c
d98920b36b52ca1784742cbd053c631ae62ca1c4 09-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: actually check if DSS can support scaling

This is needed so we do not commit surfaces to be rendered by
HWC if DSS will not be able to ultimately display it.

Checks include:
- scaling limits
- NV12 format support

Change-Id: Ib53d0a60494f9d55ffedc48aa32181d04691e182
/hardware/ti/omap4-aah/hwc/hwc.c
a02dce1ac438e0538fbcef1c663092035c5f4348 13-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: call wait-for-vsync in set if eglSwapBuffers is not called.

This adds a rate-limiting similar to when eglSwapBuffer is called,
so that DSS-only compositions do not complete instantly.

Also include FBIO_WAITFORVSYNC until it is defined in bionic's
linux/fb.h

Change-Id: I858da95b18cc2bca107b5ece616db42da38719f1
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
ee0725d529a6adced20dd0182f9fd470607ce495 09-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: do not call Post2 if there is no display/surface.

This is in line with prior commit to not call eglSwapBuffer.

Change-Id: If19abfee407a5bdbeac97a66e8da4b1cb95d0e63
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
a1be32cc5c3978f9bac62c3b40a257bba2315861 09-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: process all layers

remove optimization that stopped processing layers after we filled
all overlays, since these layers will need to be rendered via
framebuffer, which will affect framebuffer z-order.

Change-Id: I84ac97442432eb11ccb92baed250d7e3ee5bb179
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
a51ba32b3ed323a74235d28a6cb0f31e51d8e514 09-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: remove unused fb_zmax

Change-Id: I3ae9ccb75ee64367dfac9b778fda6753fd3100b8
/hardware/ti/omap4-aah/hwc/hwc.c
48efa60e4b8091a306db9d78461e6cc56d0324e5 09-Sep-2011 Mathias Agopian <mathias@google.com> never set the CLEAR_FB flag on OVERLAY layers (it makes no sense)

Change-Id: I4f8c38645c8317fc0ac073324a1b477b9a28db07
/hardware/ti/omap4-aah/hwc/hwc.c
9e7fbe0d40a3b033b66ca469d40b21fd4339016e 26-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: set hdmi mode (resolution) through new dsscomp API

Read supported monitor resolutions on hpd.
Try to pick one that is the same size as the main screen.
If that is not supported, pick the default (TV preferred) resolution.

Change-Id: I49732b292d4651aeac504b7053fad928c0de2251
/hardware/ti/omap4-aah/hwc/hwc.c
e0edfd5c677dd606d19ac7b838ce365db131fc8a 07-Sep-2011 Mathias Agopian <mathias@google.com> configure the overlays with an opaque format when the layer is opaque

previously if a layer was configured as RGBA but was not blended,
hwc would blend the layer anyways (based on the format).

Change-Id: I174d39e9c16f5bf1cc989d94823cb9e4656a61b4
/hardware/ti/omap4-aah/hwc/hwc.c
e37a11c21bcac1fbcac995cd34884eac37492b95 02-Sep-2011 Mathias Agopian <mathias@google.com> do not call eglSwapBuffers() when EGLDisplay or EGLSurface are NULL

this happens when turning the screen off, where we call set with
all parameters set to NULL

Change-Id: Ia5f913fbbee70e310508894800c220488ed8a061
/hardware/ti/omap4-aah/hwc/hwc.c
a3a76c576a0a1706c102570697b4fc0017eb46fb 02-Sep-2011 Mathias Agopian <mathias@google.com> fix more drawing artifacts caused by hw composer

hwc used the pixelformat to determine if a layer was opaque
instead of using the blending field.

Change-Id: I0e3dba7234639cb75156c6e941bf5e6aa0ecaf8d
/hardware/ti/omap4-aah/hwc/hwc.c
263503952fda88ce3a03219adb55fe207b9ab4c4 31-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: clear FB above all opaque layers if using SGX

To take advantage of some SGX optimizations, it would be useful to
always set the HWC_HINT_CLEAR_FB on opaque layers unless there are no
HWC_FRAMEBUFFER layers.

In other words, if at least one layer is composited (HWC_FRAMEBUFFER),
we want to tell SF to clear the framebuffer for all opaque layers that
are handled by h/w composer (HWC_HINT_CLEAR_FB). If all layers are
going into the overlays, then we do not want to do this.

This will prevent SGX to needlessly preserve the backbuffer under
those opaque layers and improve performance a bit in those cases.

Change-Id: If3d969fa8ee3ce3ff6c49cde7d19de456b8aa321
/hardware/ti/omap4-aah/hwc/hwc.c
0b62b7ca3c6430caaebb2d3815642b2ff80f527a 31-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: handle NULL for prepare() and set()

Go through normal SGX Post2 cycle if layer_list is NULL. Set up
framebuffer if prepare is called with NULL list, and call Post2 interface
as usual if set is called with NULL list.

Change-Id: I2d9d52a6ae6f55c8776361d1733f29de53183154
/hardware/ti/omap4-aah/hwc/hwc.c
c35f8ef2dc4bf1606f2b27f750057b12e51cb99a 02-Sep-2011 Erik Gilling <konkers@android.com> hwc: mark framebuffer as pre-multiplied

Change-Id: I1e5c92c4e598c3c98b2680da4281481d90d41bf7
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
422ac9d4fadfd462e81ec0ff1172ab2d6fba0b06 01-Sep-2011 Lajos Molnar <molnar@ti.com> hwc: fix z-order settings for fb

If a hardware layer was sandwiched between framebuffer layers, the
z-order of the framebuffer layer was not adjusted. This is now
fixed.

Change-Id: Ib9eff3e3f1cd14b7c2a1d00ce2b451b04667e09a
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
38934f125a600817dded7aeba9639c6a75afe358 25-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: account for 1 16MB tiler slot instead of 4 4MB one

This requires corresponding kernel change that manages TILER1D
mappings into 1 large tiler slot.

Change-Id: I868e2c252378ef74c343876eb94c15fe549cd2ed
Signed-off-by: Lajos Molnar <molnar@ti.com>
/hardware/ti/omap4-aah/hwc/hwc.c
2952fd7510718abf21a5fc6d683fd1b4a6025171 11-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: scale cloned UI/video to full screen with correct aspect ratio

Added support to scale the cloned UI to full screen. Screen aspect
ratio is detected using EDID information, and UI aspect ratio is
preserved on the external display. For now we are hardcoding square
pixels on the internal display.

In docking mode, the first NV12 layer is scaled to full screen on
the external display.

In mirroring mode, the whole UI and any video layers are scaled
to full screen.

Change-Id: Ib4887fb341c22758de7a9c2fc89a9ff660d4fbd3
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
2125fa148686edfa389121f946377aedaa3d9483 11-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: add uevent listener to handle switching to HDMI cloning

Added uevent listener that listens to the hdmi switch.
Cloning is now enabled by hwc after it receives hpd event.
On startup, hpd state is detected to start cloning immediately.

Only the DOCK flag will be read from debug.hwc.ext property to
determine whether to do full mirroring, or only docking to
external display.

Change-Id: I7ea888d9048ad642ce1cdc7b71b75c62faafc227
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
78fce72baff38f488a0117591d4241d278a48b1b 03-Aug-2011 Lajos Molnar <molnar@ti.com> hwc: added support for mirroring on external display

Rotation/mirroring has to be specified using the debug.hwc.ext
property for now, which is read every 32 frame compositions:

bits 0-1: clockwise 90-degree rotations
bit 2: left to right mirroring (applied after rotation)
bit 3: clone enable
bit 4: docking mode
bit 5: cloning to TV/HDMI (vs. LCD2) (cloning always happens to display1)

Rotation and mirroring is not yet applied.

In docking mode, the first NV12 layer is cloned to the external display.

In mirroring mode, the whole UI and any video layers are cloned to
the external display.

NOTE: needs matching kernel update

Change-Id: Ia8332e5892cd0855dd0fb510662da660ab8ee6d5
Signed-off-by: Erik Gilling <konkers@android.com>
/hardware/ti/omap4-aah/hwc/hwc.c
c322989ae6ff6769490828de1b5eda12b749cce9 08-Aug-2011 Iliyan Malchev <malchev@google.com> initial commit

Change-Id: I8f7a7eeece0e516efa486b77e9d97805c0e65d3e
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/ti/omap4-aah/hwc/hwc.c