Commit Graph

36 Commits

Author SHA1 Message Date
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
Neti Ravi Kumar
8ac7719437 Dump PMEM usage in out of memory cases for debugging
(cherry picked from commit 87e533f5a605e5fa99f84aeb8869d5f084369c6d)

Change-Id: I0f4b99c115b36144587cc770cb3722b89d7cffbd
2012-03-16 20:41:44 -05:00
Jeff Boody
1077e7cce3 add GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED for explicit synchronization.
Change-Id: I3d78f0517f7eeafc58ec5b0edfc6a04901ad48b2
(cherry picked from commit 35229ceb772a4a3c0a9dbfcb42fdb45344a91b4e)
2012-03-16 20:35:18 -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
Kevin Matlage
d6b1474f2d Make SurfaceFlinger respect swapinterval property
A Google modification to eglCreateWindowSurface was
causing SurfaceFlinger to set its swap interval
value back to 1, regardless of the value set in the
debug.gr.swapinterval property.

This patch modifies the fb_setSwapInterval function
in gralloc to check the debug.gr.swapinterval
property and not change the swap interval if a value
is set there.

CRs-fixed: 329524
Change-Id: I80463c1209addbff227db7832dd0023e94eb06ac
2012-03-16 20:30:54 -05:00
Naseer Ahmed
a469182e24 gralloc: Clean kernel allocated pmem buffers after memset
Change-Id: I1a13c38c38a9f321e3f163545d0331529d2f7e6f
2012-02-27 00:06:21 -06:00
Naomi Luis
6493734d01 libgralloc: Check if w and h are odd only for the YV12 format.
The mandate for the width and height to be even is only for the YV12
format. Add this check only for the YV12 format.

Change-Id: I1e8d2de174ecf2e62cd33cc40dfd8e97d70a3a59
2012-02-27 00:06:02 -06:00
Naomi Luis
31e5714e87 libgralloc: Store the correct fd when mapping the framebuffer.
Store the actual and not the dup'd fd when mapping the framebuffer.

Change-Id: Ibca65a8f4c4db374dc23e8fee216ec5c36a9c01c
2012-02-27 00:05:43 -06:00
Naseer Ahmed
0322ae55d3 gralloc: Make all pmem buffers cacheable by default
If an uncached buffer is needed from gralloc, the
client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED

Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed
2012-02-06 23:19:37 -06:00
Naseer Ahmed
ea94363fde Display: Use new ION heaps
Use new ION heaps in gralloc
and use them in rotator

Change-Id: I4ff903fd48a90e19655a64c5a0abaeec35aa34c8
2012-02-06 23:19:37 -06:00
toastcfh
0cba1f7659 libgralloc: libqcomui: add QCOM_HARDWARE CFLAG
Change-Id: Idff9fb871f418c590da46aac7b00706946d2cf9b
2012-01-01 17:57:26 -05:00
toastcfh
eae32cda02 display: use some cm specific build flags and fix up cflags for qcom hardware
Change-Id: I3e39bbb522313d4bafd97cd205411f32a992a697
2011-12-22 22:04:28 -05:00
Naomi Luis
996254486f libgralloc: Check for genlock success on all genlock calls
Change-Id: I5bb9d209f80c6b9499197cda697d1a0293b409ba
2011-12-22 21:44:34 -05:00
toastcfh
b67994677f Merge git://codeaurora.org/platform/hardware/qcom/display.git ics into ics and resolve conflicts
Change-Id: I3acb5e963763821d2b547cf3c9390754dc42c12f
2011-12-18 19:45:23 -05:00
Naomi Luis
8287f5bbcb libhwcomposer: Validate the previous overlay and bypass handles.
Validate the previous overlay and bypass handles before unlocking
the buffers. The reason for doing this, is that in certain use cases,
after the previous handles are stored, the buffer gets destroyed and the
handle is now invalid. The HWC however doesn't know that the handle is
invalid and tries to unlock the handle, resulting in a failure.

CRs-fixed: 323614
Change-Id: I0f0c8506e7e22f9fc01eb28af0270f9c4587c787
2011-12-15 04:35:31 -07:00
Naseer Ahmed
c2e6b1f62e display: Use bypass only for contiguous memory
Since composition bypass uses MDP overlays, which
need physically contiguous memory, we cannot use
bypass in cases where the buffers are using ashmem
or other virtual memory. Hence, avoid bypass in
such cases.

Change-Id: I5c6d20e68e15719295373a1b0f3b930536336c43
2011-12-09 14:47:10 -07:00
Linux Build Service Account
3ace14e571 Merge "display: gralloc: zero out the alloc'd ion buffer" into ics 2011-12-08 05:59:07 -08:00
Naseer Ahmed
c421c6ac19 gralloc: Limit fallback case for SMI
For pmem, do not fall back to the ADSP heap if
SMI was requested explicitly

Change-Id: I31d85aa7bef3db53ca9ba108170df7ef4841843b
2011-12-07 10:56:11 +05:30
freexperia
7fab09c1b3 msm: idef TARGET_USES_ION for targets that dont have ION (msm7x30)
Change-Id: I048b5ad12d1f050c8d07ccbc279dde8a56d8c043
2011-12-05 21:35:11 -08:00
freexperia
b151a85950 msm: cleanup to compile msm7x30
Change-Id: Ie1ca24c4f08de56a07c8e299ffbb00fc4af85a8a
2011-12-06 07:03:30 +02:00
Sushil Chauhan
f2dbabe786 Bypass: Turn off only after FB content is displayed.
Synchronize turning off of composition bypass with display,
so that close happens only after FB content is displayed.
This fixes blinks observed when bypass needs to be turned off,
for reasons other than video content.

Change-Id: Id98bddd0cb2a89ea8729a188934ae1cd947cf305
2011-12-05 16:52:39 -08:00
Naseer Ahmed
ba64a65af2 libgralloc: Add gralloc perform to create handle from a buffer
Change-Id: I11fb9add49f32cc5d518baf47cb61507474f6809
2011-12-05 02:42:14 -07:00
Naomi Luis
8994068ce6 libgralloc: Add HAL_PIXEL_FORMAT_NV12_ENCODEABLE format.
Add HAL_PIXEL_FORMAT_NV12_ENCODEABLE which is the encoder specific
format.
Remove unused OEM formats from the gralloc.

Change-Id: I787203cd96b597c881f0acc10b60ea2ab2ffe1ab
2011-12-04 15:23:50 -08:00
Naseer Ahmed
e5a9508bad display: gralloc: zero out the alloc'd ion buffer
Change-Id: Ib92863cf03f284eb24729bbad449795e7bd47d44
2011-12-01 23:26:28 -08:00
Linux Build Service Account
1698fbaa95 Merge changes I5283613c,I9377584e,I788e411f,I5172a825 into ics
* changes:
  libgralloc: Invoke genlock during gralloc_lock/gralloc_unlock
  libgralloc: Map buffers during registration
  libgralloc: Create, attach and release genlock locks
  Add a generic buffer locking API.
2011-11-25 05:20:31 -08:00
Naseer Ahmed
dce3b38f58 display: Ashmem: use MAP_POPULATE when mapping
If the flag is not used, it causes errors with
mapping the page tables in the kgsl driver

Change-Id: Iaa29eb764aff8a9af4b14fff9fdab60b50759e45
2011-11-23 17:33:02 -08:00
Naomi Luis
1e74639826 libgralloc: Invoke genlock during gralloc_lock/gralloc_unlock
gralloc_lock and gralloc_unlock invokes genlock to perform the buffer
locking operation.
Remove unused gralloc handle variables.

Change-Id: I5283613c5f67f708123916653af1b2d1ec155577
2011-11-23 15:06:47 -08:00
Naomi Luis
09367ef6e8 libgralloc: Map buffers during registration
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
2011-11-23 15:04:40 -08:00
Naomi Luis
1b5f80522b libgralloc: Create, attach and release genlock locks
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
2011-11-23 14:58:23 -08:00
Naomi Luis
aa4994d543 Add a generic buffer locking API.
Add libgenlock which is a cross-process buffer locking API. libgenlock
provides the ability to create, attach, release locks. It also provides
a mechanism to lock and unlock buffers for read/write purposes.

Change-Id: I5172a82539b83bcb1226e3fd4f7b80a5c7f31016
2011-11-23 14:39:28 -08:00
Naseer Ahmed
d047ca874d Display: Use flush instead of clean for ashmem
Change-Id: I9a4b8f4685620a8c650e03dd8c1a0203fa3b91e1
2011-11-22 11:44:58 -08:00
Naseer Ahmed
a6bda75e59 display: Enable triple FrameBuffering
Change-Id: Iab7ea670a940438f83dd7130933cceafd15b29a6
2011-11-20 21:44:03 -08:00
Naseer Ahmed
d92f2df0ea Display: Enable HDMI in gralloc
Change-Id: Ifff15f3ff1eb2bb40ffe5c8a743ec5852652f45f
2011-11-20 21:43:08 -08:00
Naseer Ahmed
78ec9e4e53 display: Add support for pmem in the new gralloc
Change-Id: Ice6f436a01c3344a6d859ee0afc77673f151dbe4
2011-11-20 21:42:37 -08:00
Naseer Ahmed
96311b0091 Display: Compile gralloc for ICS
This disables certain features for compilation

Change-Id: I7e7533fa7db940a106b3520bef48c9fc2860707c
2011-11-19 21:16:20 -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