Map the gralloc buffer during the register_buffer phase. This allows
the clients to obtain the virtual address without the need to call an
additional mmap.
Change-Id: I9377584ee564ad5113fd353b727793f16d7b9b94
Add support in the gralloc to:
- Create a lock during buffer allocation.
- Release a lock when the buffer is freed or unregistered.
- Attach a lock when the buffer is registered.
Change-Id: I788e411f43d5fcf88d7dcf39c530559a12d6361c