Commit Graph

8 Commits

Author SHA1 Message Date
Naseer Ahmed
d6ffef4cef gralloc: Add locking to alloc and free in ION
Change-Id: I16e24e3d366b15a458b19983827233a7bd27d9f7
(cherry picked from commit edad58e17deb0cb1d9ff4754fbac511eea8e4ecf)
2012-05-22 17:03:46 -05:00
Naseer Ahmed
694752d90d display: Add flag to avoid mapping memory in userspace
For secure content the MM heap should never be
mapped in userspace. Add a flag to avoid
doing this for rotator which does not need
userspace mapping.

(cherry picked from commit 8d9f2fa336564d5a021dd932f5619b5f389d5fad)

Change-Id: I17d1faa40859e261518d928089f2ce86084d31fd
CRs-fixed: 332402
2012-03-16 23:15:06 -05:00
Jeremy Gebben
093c26a745 libgralloc: don't IonAlloc::close_device() on error
It is possible to use this object from multiple threads
and there could be a race between a failure in one thread
and another method call from a different thread which would
result in system calls being called with an invalid fd.

(cherry picked from commit 560ca6e8feb4f52c9aade34fa7cfcfed55288083)

Change-Id: Iefb94ba1ee7177ab20600bee4374daf8e818bdb9
2012-03-16 20:43:04 -05:00
Jeremy Gebben
115d446fcb libgralloc: fix libgralloc error codes
Several ioctl calls were returning -1 instead of -errno,
which may confuse upper layers, especially when the error
is -ENOMEM.  Also move some existing "err = -errno" calls
to the top of if statements so that errno cannot change
by libc calls in the error handling code.

(cherry picked from commit a8eda532452651eb1fbae419319455de2a078ef0)

Change-Id: I181f98d5a261e8e3e1b3f6ecd3ba288e7b4b5607
2012-03-16 20:42:36 -05:00
Naseer Ahmed
719d854bfd display: Standardize debug logging for all memory types
CRs-fixed: 331956
(cherry picked from commit fa7601fb06b265b4cb7c9aaaabea77e2a8d8c6e9)

Change-Id: I1cc99760186aa4a70ebe2464f44b19e1fa91acdf
2012-03-16 20:42:12 -05:00
Naseer Ahmed
71e0e80dbd display: Add support for protected heaps
(cherry picked from commit c932690c5a9d0aedfd2580e5c5e9f79e32f54261)

Change-Id: Ibddab4252ecefa1c410430b89f94aba4d3ae1c96
2012-03-16 20:34:50 -05:00
Naseer Ahmed
e5a9508bad display: gralloc: zero out the alloc'd ion buffer
Change-Id: Ib92863cf03f284eb24729bbad449795e7bd47d44
2011-12-01 23:26:28 -08:00
Naseer Ahmed
9c050e95ec gralloc: Refactor, ion support
- Add ION support
- Refactor the design

Change-Id: I5b067b0aca1235ee8c01c256e025f416bb56f560
2011-11-16 13:43:12 -08:00