OMAP: TILER: Add bounds checking on format inputs

Added bounds checking to validate incoming tiler format.

Change-Id: Icd791cc294ecb1838afb3f91451626debd59c29e
Signed-off-by: Andy Gross <andy.gross@ti.com>
OMAP: TILER: Make character driver creation configurable

The TILER code that creates the character driver code and
interacts with the userspace has been placed under the
kernel configuration option that controls the userspace,
so that the cdev creation is bypassed when userspace is
disabled.

Change-Id: I3d5d372433fc89e676e54088dc8af8bdb74b8007
Signed-off-by: Shivananda Hebbar <x0hebbar@ti.com>
Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Suman Anna <s-anna@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>
OMAP4: TILER: Add offset parameter for allocation

Add offset parameter for use in tiler_alloc_block_area_aligned.
This allows a user to get a tiler allocation with a specific
alignment and offset.

Change-Id: I8b1b9dd17bc9def124ea92cbbede2f3c56823387
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>
OMAP: TILER: validate input width and height

Add validation of input width and height to ensure that it does
not exceed maximum pixel width and height for the specific format.

Validate maximum length for 1D allocations.

Change-Id: I64b00f93a312ae715a040da28a0b0fe663afa9d8
Signed-off-by: Andy Gross <andy.gross@ti.com>
rpmsg: omx: fix copy_to_user in register/unregister ioctls

The ION fd registration and deregistration ioctls has the
arguments reversed in the copy_to_user() calls. The same
has been fixed.

Also included a minor additional case for returning a NULL
ION handle back to user-space.

Change-Id: I9d45957f9b913fa1775e70618f0da82e914a41d6
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: omx: send disconnect only if omx state is connected

The rpmsg_omx driver sends a disconnect message automatically when the
driver's .release is called. This should be done only if a connection
has been established, otherwise just destroy the local end point.

Change-Id: I21b84aa6d91ae0d456f49cbe958f8e64caf691d5
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
rpmsg: omx: initialize completion event in rpmsg_omx_open

An omx object is created when opening the rpmsg-omx device. However
the "reply_arrived" completion event is not initialized until the
connection message is sent across.

When the rpmsg_omx driver is removed (like in recovery), all pending
threads waiting on the "reply_arrived" are unblocked by a complete_all
call, however, if the rpmsg-omx device was only opened, such event is
not initialized yet, so the complete_all call will dereference a null
object causing a panic.

This patch moves the initialization of the "reply_arrived" completion
event to the open call, after the allocation of the omx object.

Change-Id: I92cf9cf5ac748456cb43bedc88fe1a8d80addd6c
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
OMAP: PM: Fixed potential overflow in throughput calculation.

Helper functions add_req_tput()/remove_req_tput() operate using 64bit,
instead of 32bit. It is possible to get target_value overflowed by
having few users requesting high throughput or invalid value.
The frequency calculation result is verified on overflow, so result is
not causing switching to lower frequency.

Change-Id: I26472aa87454d1dd471fd4c69bda8d93323b8879
Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>

Patch Set 5
Switch to linaro gcc 4.7 from 12.06
fix build errors using gcc-4.7

Error: selected processor does not support ARM mode `smc #0'
error: DIV usage mismatch between arch/arm/boot/compressed/head.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/decompress.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/ashldi3.o and output

Change-Id: I1251b843bb9b4c74ba8039fd194e3aed2183cf5b

Conflicts:

	arch/arm/boot/compressed/Makefile

Conflicts:

	arch/arm/boot/compressed/Makefile
	security/smc/Makefile
fsync() disabled
Revert "fsync() disabled"

This reverts commit 270d466ae0ff6f041fa07138c54a990884c930b2.
Fix for gcc 4.7
a6 config update