omap-ion: Interface to export ION handles from PVR fd

PVRSRVExportFDToIONHandles was called directly by drivers.
Exporting this interface through ion. This also helps when PVR
is built as a module as the abstraction then uses an exported
function pointer.

Since this change also changes the interface between kernel and
a module, LOCALVERSION change is required.
Kernel version = 3.0.21-00001-OMAP-Android

Change-Id: Ic8b5c7efd50db008e8837ebc08f4a9e087de9274
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>

Conflicts:
	arch/arm/configs/blaze_defconfig
gcbv: Assign Bltsville function pointers only if GC core is present

If the SoC doesn't contain a GC core, don't assign the function
pointers in the BV entry.

Change-Id: I1e1bea46199b71bce84537021c63a7ce3d7a79e2
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
omap-ion: Fix build issue when CONFIG_PVR_SGX is defined

This was caused by wrong path to pvr header.

Change-Id: Id32ee97ecb6ac4dc0b3662781a28b9eb38208370
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
OMAP4+: HSI: hsi_char: fix write poll timeout issue

hsi_char driver may fail to return (POLLOUT | POLLWRNORM) after a write() has
occured. Instead it returns 0, causing the poll() to timeout.

This is due to a race condition between hsi_char_write() and if_hsi_notify().
Write callback can occur very fast in response to hsi_write() and may cause the
poll_event flag to be first set by if_hsi_notify() but then cleared by
hsi_char_write(), remaining to 0 forever and causing poll() timeout.

Fix is to clear the flag ahead of hsi_write to avoid this.

Change-Id: Iacd18f0448c1933a16b0a54db2204cd74fc259b2
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
Reported-by: Christian Auby <christian.auby@stericsson.com>
omap_ion: Revert ion_share and ion_import for PVR fds

This patch removes uneeded ion_share and ion_import for
PVR file descriptors. These changes were introduced during
the migration to PVR kernel modules. The call to ion_import
was also adding an extra ref count to ion buffers which
prevented them from being freed from tiler when SGX was
finished with them.

Change-Id: If3bdab42e31db3d7ddbb619a37aa4c8afef1aa74
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>
gcbv: Remove union in gcbatch structure

Change-Id: I50eab8a20ff82016b1d54c96167236a15d63233c
Signed-off-by: Jack Yen <jyen@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
gccore: reduce number of mutexes and extra functions.

pull in lock/unlock and attach/detach logic to caller. Generally,
we should not nest and wrap the actual kernel calls. this also
addresses a race condition seen using static mapping with hwc-2D.

Change-Id: Id47f6a1946c466344991630c290e167d82c57560
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: fixed format translation for BGRA.

Change-Id: I94bd87eda8121a647518418b8a92f4f6ff937759
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: disable blending for fill

Change-Id: Ic7601070e2aea291a0ae21fff95372cffeff5c75
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: fixed blending config selection.

Change-Id: I7230ed92dc6005f7406348da2b9cd872e86065e0
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: fixed batching logic.

Change-Id: Ie10f93c47b6f2e0a6b236312e7437fdf24356387
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: offset issue fixed.

Change-Id: I7781a6572c85bbff09bc43931103134f46c3810b
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
gccore: enable suspend/resume functionality.

cut the gccore clocks when the system goes into suspend
and enable the clocks upon resume.  If early
suspend and late resume functions are available, cut/enable
the clocks at this time.

Change-Id: If145c127a94c89862d0acc4cf8a38400a91de4ef
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: cleaned up gcbv_blt function, more dumping.

Change-Id: I6eb6d5959998a7c520584a6046df6c1304d59e23
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: Fix multi-source blend batching issue

This patch fixes a visual corruption and random hangs when
batching multi-source blend blits.

Change-Id: I6608a70f363a5f411b97a856d1236bb028cdf7b2
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: add software based clipping

Change-Id: Ie9e248e2a8f8b20bbff98cddef40d85764c1edde
Signed-off-by: Bo Najdrovsky <bo@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
gcbv: check desc and geom instead of virtaddr

Change-Id: I3e17201cc9a674c0f69c75d1a80102269ff2cd12
Signed-off-by: Jack Yen <jyen@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
gccore: set min data throughput on omap pm framework

before and after issuing a BLT to the hardware, set
the minimum data throughput value on the omap pm
framework so that the appropriate opp will be set.

Change-Id: I2c615acb772a568f66b727942f70583ade65abf5
Signed-off-by: David Sin <davidsin@ti.com>
OMAP4470: HWMOD: Add support for 2d bit blitter

Add hwmod data needed for 2d bit blitter driver.

Change-Id: I436f76f737bdfea4b9c5950b13182b71e39f9c0d
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
OMAP4: TILER: Add variable alignment allocation API

Added tiler_alloc_block_area_aligned API to allow
for variable alignment when allocating when using the kernel
APIs.

Change-Id: I2f3c44675a3fa1b2c6dfef21ccdd9bcac2f1d0e5
Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Tony Zlatinski <x0146664@ti.com>
Signed-off-by: Atanas (Tony) Zlatinski <zlatinski@gmail.com>