Commit Graph

1188 Commits

Author SHA1 Message Date
toastcfh
c8f578b1c9 libgenlock: clean up kernel includes and make USE_GENLOCK a BoardConfig option.
this fixes issues with devices not yet supporting the genlock API in in kernel space.

Change-Id: I734d8db95f7030c1492122283d76e81ca5fb8aa2
2011-12-18 19:51:58 -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
Mathew Karimpanal
d120c0dfac libhwcomposer: Mark layers below skip-layers for GPU composition
If module composition type is MDP or C2D and we have a skipped layer
(usually layers without backing buffers, layers with "invalid"
orientations or debug layers), mark every HWC layer below this layer
for GPU composition.
This logic is needed because ICS SF composes a bunch of z-ordered
HWC_FRAMEBUFFER (GPU) layers first and then the remaining bunch of
z-ordered HWC_OVERLAY layers last which breaks the overall z-ordered
layer rendering requirement. This logic also holds valid for 2-layer
bypass in ICS.

Change-Id: I5082affac8affd6b19d78be827d149901945a163
2011-12-15 14:23:41 -07: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
75e2a92af4 hwc: Initialize padding for copybit
Change-Id: I053431caa114fdc9a09584933b10b4d27d34ec74
CRs-fixed: 324785
2011-12-14 16:55:42 +05:30
Naomi Luis
0afa0e42a6 libhwcomposer: Use the HWC private flags from libQcomUI.
Qcom specific private flags have been moved to libQcomUI. Use these
flags flags in the hwcomposer.

Change-Id: I9898dd11a7fff72678fa1f744454fcf310507a63
2011-12-13 11:23:32 -08:00
Linux Build Service Account
ccad64f20c Merge changes I5f7759a6,I3fdb4f6a,I370b94a9,Ie47b7669 into ics
* changes:
  libQcomUI: Add support for qcom specific layer flags.
  libQcomUI: Add support for updating the buffer geometry
  Display: Add libQcomUI
  liboverlay: Add support for interlaced content in updateOverlaySource.
2011-12-13 01:18:06 -08:00
Naomi Luis
b6ca342fac libcopybit: Add support for converting to non 32pixel aligned formats.
Android YUV formats are aligned to 16pixels, while C2D requires 32pixel
aligned. Use a temp buffer to do the conversion.

Change-Id: Iff93b56e152460255d480dc703dabbcdb3697995
2011-12-12 16:41:07 -08:00
Naomi Luis
8d7ff87f5c libQcomUI: Add support for qcom specific layer flags.
Add support for updating the qcom specific layer flags. Add support for
getting the per frame HWC flags based on the layer flags.

Change-Id: I5f7759a6a7fae6d4f70dd26f380a9b08e48e9475
2011-12-11 16:19:48 -08:00
Naomi Luis
be32078a40 libQcomUI: Add support for updating the buffer geometry
Add support for updating the buffer geometry without any reallocation
of memory. The buffer geometry is updated in the GraphicBuffer as well
as in the buffer handle.

Change-Id: I3fdb4f6a737277ab63fcbdb42e9c955ea7471760
2011-12-10 21:52:41 -08:00
Naomi Luis
18e73bc5c7 Display: Add libQcomUI
Add libQComUI which is used to perform operations specified by
SurfaceTextures.
The operation currently supported by this library is SET_BUFFER_SIZE
which deallocates and reallocates memory if the size allocated for the
buffer does not match the size requested by the client.

Change-Id: I370b94a91f5acf373f7040742aad7c2e7bb586fe
2011-12-10 21:52:29 -08:00
Naomi Luis
27774b1a66 libhwcomposer: Set the Framebuffer info for copybit composition.
Invoke copybit's set parameter call to set the framebuffer width and
height.

Change-Id: I735772e21b9fead48686fac3371b6b93156ece8a
2011-12-10 16:44:33 -07:00
Naomi Luis
2987491ac8 liboverlay: Add support for interlaced content in updateOverlaySource.
UpdateOverlay source didn't have any support for interlaced content.
Add the required support. Create a new function to check if the content
is interlaced.

Change-Id: Ie47b7669461f773b55c71cad6978fc1c8cf4e91b
2011-12-09 13:59:03 -08: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
9cc133f454 Merge changes Ica0f7622,Ia2b4dadf into ics
* changes:
  libcopybit: Add support for setting the Framebuffer info.
  libcopybit: Add support for YUV destination targets.
2011-12-09 05:05:31 -08: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
Linux Build Service Account
0414780dfd Merge "gralloc: Limit fallback case for SMI" 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
Linux Build Service Account
e714021cac Merge "hardware/qcom/display: support for QCOM tiled rendering" into ics 2011-12-06 19:03:25 -08:00
Naomi Luis
90f0fc7201 libcopybit: Add support for setting the Framebuffer info.
Add support to set the framebuffer width and height in the copybit
context. This parameter will be set for composition using c2d where
the c2d target is calculated based on the framebuffer width and height.

Change-Id: Ica0f7622bed305c0f56dd0a16b35406c28600fd8
2011-12-06 12:58:20 -08:00
Naomi Luis
2197d5d924 libcopybit: Add support for YUV destination targets.
Add support in the c2d copybit for YUV destination. We support 2 and 3
plane yuv formats.

Change-Id: Ia2b4dadf2966a324e011fea499da996eee8c8c3c
2011-12-06 12:52:22 -08:00
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
a9b1e1661c msm: idef TARGET_USES_ION for targets that dont have ION (msm7x30) but use C2D_COMPOSITION
Change-Id: Idbea7db9a9f3241980cbe31ea2f8e6ad8dabc484
2011-12-05 21:34:55 -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
Naomi Luis
599d9a41bc libhwcomposer: Unlock buffers if the input params are invalid.
If the input parameters in the prepare and set functions are invalid, unlock
any previously locked buffers.

Change-Id: Ifd3b02c3ae6d2095970d5e15b98196d7fa7dee4e
CRs-fixed: 322054
2011-12-05 14:02:34 -07:00
Linux Build Service Account
8281d24bcd Merge "libhwcomposer: Lock/unlock bypass buffers using genlock" into ics 2011-12-05 12:54:22 -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
f79ec0f398 libcopybit: Add copybit iterator.
Add the copybit iterator which takes a single rectangle as an input.

Change-Id: I6fd496450c29ed06ffbfad62b5c880e837450791
2011-12-04 19:40:55 -08: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
Naomi Luis
b0e7470e4f libhwcomposer: Lock/unlock bypass buffers using genlock
Use genlock to lock the bypass buffers before they are queued to the
overlay. After all the bypass buffers are queued, use genlock to
unlock the previously locked bypass buffers.

Change-Id: Ifdd7921f0c9f5d5744c899a0257a4b954274334b
2011-12-01 18:25:44 -08:00
Rajulu Ponnada
f54edbd924 hardware/qcom/display: support for QCOM tiled rendering
Tiled rendering implementation.

Change-Id: I1d1361b175fdb6f64b47df85b8f68bebd7d1eea5
2011-11-30 17:19:30 -08:00
Diogo Ferreira
5e7759135e qcom-display: Only include products for MSM boards
This change properly excludes these products from being inherited
by non-qcom devices.

Beware that the MSM7K_BOARD_PLATFORMS is not in place yet and
if you want to try these with currently unsupported devices you
will have to define this yourself.

Change-Id: I4c7f2d84df4dbde1e18ded4ca9f2333006b89bd6
2011-11-29 11:44:41 +00:00
Diogo Ferreira
36bbca99c8 display: Set optional module tags instead of eng
Change-Id: I813779637488b11f0f3c1279f0ee3dcb2357b837
2011-11-29 01:52:56 +00:00
Naomi Luis
e2de425bc4 Display: Set WAIT on primary and NO_WAIT on HDMI
When queuing buffers using the overlay:
- Set the NO_WAIT flag for the HDMI channel.
- Set the WAIT flag for the primary channel.
- Queue the buffer on the HDMI first.
- Queue the buffer on the primary.
- Wait for the HDMI Vsync.

Change-Id: Id24e9551230b7a7134bd21a7b3a9e8658f7de222
2011-11-28 16:10:51 -08:00
Naomi Luis
0e8663d5f2 libgenlock: Enable the USE_GENLOCK flag.
Change-Id: I2349de455eb82f2b10d2ccac1c318d7cef2901ae
2011-11-28 16:08:22 -08:00
Naomi Luis
d415cbf061 libgenlock: Add compile time flag.
Add a compile time flag USE_GENLOCK to enable/disable genlock.

Change-Id: I3b442a52b446c2a5e0417ba1058460bdee02fc90
2011-11-26 09:27:36 +05:30
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
Linux Build Service Account
0a01ff6907 Merge "display: Ashmem: use MAP_POPULATE when mapping" into ics 2011-11-25 05:20:31 -08:00
Naomi Luis
be1b5f3d66 libhwcomposer: Use genlock to lock/unlock buffers for composition.
For copybit composition, aquire a read lock on the buffer, before
the blit operation and release the lock after the blit operation.

For overlay, aquire a read lock on buffer N that is sent to the
overlay. After the play call for buffer N returns, unlock the lock
held by buffer (N-1).

Change-Id: I3ff178d8ed8e3a289c199237dbec501afdb7e717
2011-11-25 16:27:59 +05:30
Linux Build Service Account
8e61389886 Merge "copybit: Do not do in-place conversion for YV12" into ics 2011-11-24 04:18:08 -08:00
Naseer Ahmed
95ab7ecd2c copybit: Do not do in-place conversion for YV12
Change-Id: I7e53f44baa6e924c6923d4e1d1af9454f51a7357
2011-11-23 18:12:56 -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
Naseer Ahmed
229856bedf HWC: Fix for non-overlay targets
Do not call prepareOverlay, instead
use copybit to compose video frames

Change-Id: I5e85b0b65009de37ab792e59d259d8f1879fb0c4
2011-11-23 17:22:36 -07: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