Commit Graph

1231 Commits

Author SHA1 Message Date
Ramakant Singh
5cfdca4008 Display/libhwcomposer:Add intermediate stretch for low resolution clips
Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.

(cherry picked from commit 6503d323f9e113c0edf66e724bb422559ecbd5cb)

Change-Id: Ib8ea9a917896985d4f7d7ebf999222f2dc6f6480
2012-03-16 20:41:57 -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
Neti Ravi Kumar
c616c48fc5 libqcomui: Do not create EGL image for 420 SP formats in 7x27A
This change is done to reduce the CPU utilization by SurfaceFlinger
thread. This feature may be turned On/Off using a compile time flag

(cherry picked from commit 9691e73556e5c0b66553aa55eb504b9ebb0fd400)

Change-Id: I1cb5b5c8abef135bc520c6e39c6ccf236b2270c3

Conflicts:

	libqcomui/Android.mk
2012-03-16 20:41:12 -05:00
Naseer Ahmed
6f273c5c6e hwcomposer: Enable dithering if FB format is RGB565
CRs-fixed: 329362

(cherry picked from commit acd73753d1da0ba587fea91a2605229c7274e7b7)

Change-Id: I5155e98a87d17066fab6075d2b067175e4a6b56c
2012-03-16 20:35:33 -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
Jeykumar Sankaran
e806dc448b libhwcomposer: Fix dynamic composition for 2 overlapping layers
This change allows composition to fall back to c2d even if the second
layer overlaps the base full screen layer.

CRs-Fixed: 326413
(cherry picked from commit b27338930d5bf3de17d03b06db6169e648d5e5fc)

Change-Id: Iaf1bf706fb216286047452173b58aeba1781cd9b
2012-03-16 20:35:04 -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
Naomi Luis
cf67073149 libhwcomposer: Mark all layers below the SKIP layer for GPU composition.
If there is a SKIP layer present, the SKIP layers are first composited
using the GPU. If there any layer below the SKIP layer that performs
any operations on the FrameBuffer, it results in undesireable results
on the screen e.g. artifacts, since SurfaceFlinger draws the SKIP layers
before the HWComposer.

Change-Id: I198236673e2a0bd19a6087ff01049061547abb47
CRs-fixed: 327392
2012-03-16 20:31:07 -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
Saurabh Shah
235f541ec5 Fix swapinterval 0 support in class OverlayUI
Fix swapinterval 0 support in class OverlayUI. The missing property
check for swapinterval is added to the new setDisplayParams API.

Change-Id: I3a7cb843f79afa213eb2f88b80e21249f64d61d0
2012-03-16 20:30:40 -05:00
Neti Ravi Kumar
08e0b71c29 libqcomui: Select texture target based on pixel format
Do not choose GL_EXTERNAL_TEXTURE_OES for all formats, instead,
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.

This change is done to reduce composition times.

Change-Id: I17edd78cdfa051f88ed6bd4e585c7a9b0705aa3a
CRs-fixed: 328074
2012-03-11 01:18:50 -06:00
Harshad Bhutada
23f2ec2103 libqcomui: add function to find if GPU supports a format in hardware
This is a helper function that will return false if the given format is
supported by adreno drivers but not supported in GPU HW. For these
formats, adreno will use software color conversion routines to convert
them to acceptable format by the GPU HW. This may be required if we
want to avoid creating texture for certain formats when not absolutely
necessary. Could be defaulted to return true depending on a compile
time flag.

Change-Id: Idb2200b5ed13bb8c184288d44340ed1aefeaa8df
2012-02-27 01:56:28 -06:00
Naseer Ahmed
5b5bd2418b qcomui: Let the client decide the reallocation size
Always set the size the client wants, even if the
gralloc calculated size is larger

Change-Id: I31231f36ed0752db350d4fe62f8b04c7a84c6155
2012-02-27 01:46:12 -06:00
Naomi Luis
a8e088800a libQcomUI: update isGPUSupportedFormat
update isGPUSupportedFormat to include all the S3D formats and
interlaced content.

Change-Id: I737ae2f282092de97bd1f945fb66bc6e8e3dda49
2012-02-27 01:45:17 -06:00
Andrew Sutherland
3d85fbcf8e qsd8k-hwcomposer: update drawLayerUsingCopybit, revise prepare/set
apply:
Author:     Ramakant Singh <ramaka@codeaurora.org>
Display/libhwcomposer:Add intermediate stretch for low resolution clips
Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.

and cleanup loops in hwc_prepare/set

Change-Id: Ice32e12051c5c4367d1fafe17e804679e6e727c9
2012-02-27 00:16:37 -06: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
Paras Morabia
9987a6a6fa Copybit: Fix for source x and y calculation.
The x and y coordinates are derived properly from clip and dest rect with this fix.

- Even if rotation is involved, we need to start reading from the same point.
- Do scaling operation on the delta, and then add the source left and top values.
- If we scale the result of addition, we will not be reading source correctly.

CRs-fixed: 324782

Change-Id: I2876c6a8e48acbf03f80713338f9a17c57863aaa
2012-02-26 23:30:16 -06:00
Andrew Sutherland
8ead1072f1 qcom display: qsd8k hwcomposer
hwcomposer:
         rewrite from default template.
         specific for qsd8k
         put a hack in to fix screen off animation
         builds without liboverlay include which qsd8k doesnt support

Change-Id: Ica8df89be4dba4e92ed4e879e8e821b841e2ef93
2012-02-20 23:10:17 -06:00
Naseer Ahmed
25297cbe9b display: Fix blending on MDP 3.0
Assign the correct blending value
for MDP 3.0, earlier it was
incorrectly assigned to zero
for cases where blending was not needed.

Change-Id: Icec6541616c8a9dc6ffc0e99c5b2936389799656
2012-02-06 23:19:37 -06:00
Saurabh Shah
90e1eda3a3 Refactor OverlayUI
Refactoring is necessary to attain flexibility in setting mdp overlay params
at runtime, while using composition bypass.
This change includes new APIs for setting crop rectangle, display params and
commiting mdp params, namely setCrop(), setDisplayParams() and commit(),
respectively.

Change-Id: Id57035602baabd954fd6b484be4f63fef632d74b
2012-02-06 23:19:37 -06:00
Chetan Kalyan
3679414a77 Overlay: Change rotator format for YV12
Change rotator output for YV12 input from CBCR_H2V2 to CRCB_H2V2.

Change-Id: I5d9711d5006dfbed5fc0b478af43e1fe673988bc
CRs-Fixed: 327956
2012-02-06 23:19:37 -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
Jeykumar Sankaran
dadd73f13f libcopybit: Disable copybit blending for opaque layers
This change disables copybit blending when surface flinger sets
HWC_BLENDING_NONE for a layer.

Change-Id: Ie86a2d5c9e3d3dab1bc7a0a3cc31bff7afe604da
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
Ramakant Singh
36ba650a17 Display/libhwcomposer:align the copybit src and dst buffer
Align the copybit source and destination buffer according
to the frame buffer pixel format.
CRs-fixed: 327687

Change-Id: I00a0a047f2f6d639202e8395d85902b821e2a65c
2012-02-06 23:19:37 -06:00
Andrew Sutherland
a9a3796c03 qcom: copybit: build proper for qsd8k
Change-Id: Ic4ab7ec7105e45b8e09b232ae8096f3c7ea75ede
2012-02-06 04:27:53 +00:00
andrew.boren
3ca3cb138b Apply patch for touchpad.
Change-Id: I29b7e653eaa8c861863fb6f304065b4f59d85d9b
2012-01-18 19:51:47 -07:00
andrew sutherland
bd4bfd035d gralloc: add BOARD_USES_LEGACY_QCOM
Change-Id: I7fae5cf67ed4a1f00012c64c384bb621ab8bb183
2012-01-07 22:40:24 -06:00
toastcfh
0cba1f7659 libgralloc: libqcomui: add QCOM_HARDWARE CFLAG
Change-Id: Idff9fb871f418c590da46aac7b00706946d2cf9b
2012-01-01 17:57:26 -05:00
Naomi Luis
ffeb749f69 liboverlay: Check the is_fg flag in checkOVState
Check the is_fg flag along with the other parameters in checkOVState.
This is done so that the is_fg flag can also be updated even if there
are no updates to the geometry.

Change-Id: I82874d01c11eb85fb444c2bdbc50f586db683481
2012-01-01 17:55:08 -05:00
Naomi Luis
42c4db1c6e libhwcomposer: Check the number of open overlay channels
When performing the setup for bypass operations, check the number
of bypass channels that are in open state. If the count does not
match the number of bypass layers, close all the bypass channels.
This is done to prevent the overlay channels from going into an
inconsistent/undefined state.

Change-Id: If471a4b4437e25642586616461c5d745f15b3287
CRs-fixed: 323676
2012-01-01 17:54:54 -05:00
Steve Kondik
d2dde1230a Merge branch 'ics' of https://github.com/toastcfh/android_hardware_qcom_display into HEAD
Conflicts:
	libhwcomposer/Android.mk

Change-Id: I22baeb33395aa3478554109781dd1ded2293490b
2011-12-30 09:25:44 -08:00
Neti Ravi Kumar
ada9e68943 Display/libqcomUI:Choosing memset according to pixel format
For 2 bytes per pixel format the width might be not alligned to 4
So for such cases we need to use memset16

Change-Id: I22a6c673439c44447ce33faf2ed0615febd70a28
2011-12-26 16:46:37 -05:00
Neti Ravi Kumar
6db0f47326 Display/libqcomUI:Check for the clip width limit
clip width should not exceed with the render buffer width(fb0)

Change-Id: Ia927dc1e709a259910ae8f9e7d37979306eb3437
2011-12-26 16:46:27 -05:00
Jeykumar Sankaran
7abeff1de3 Display: Use bitwise operators on HWC flags
Change-Id: I031a6510622a1e768651bcd91d3ab6f399fc81f1
2011-12-26 16:46:14 -05:00
Naomi Luis
4438e2f942 libQcomUI: Implement clearRegion for C2D/MDP/CPU composition.
Implement clearRegion for C2D/MDP/CPU composition. This prevents
glClear and therefore the glFinish from being called, thus
improving performance.

Change-Id: I03d9230e03cce11d9fe7e2bd34e4df8328ad2e00
2011-12-26 16:46:02 -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
Jeykumar Sankaran
5312f7f48e Display: Add support in libqcomui to check FB update
This change adds support in libqcomui to check if FB is updated
by a composition type

Change-Id: Ic23f24d95166cb9b1a03614f1c0fd562f321a1fd
2011-12-22 21:44:07 -05:00
Naomi Luis
2ce4ec69b8 libcopybit: Temporary buffer optimization.
Add the following optimizations for the temporary buffer:
- Initialize the temp buffer only when required.
- The temp buffer is not deallocated/released unless there is a
  change in size of the temporary buffer.

Change-Id: I833851b1feff0a7457ad6847f18a988e002d61d5
CRs-fixed: 319337
2011-12-22 21:43:32 -05:00
freexperia
9be3ed9e53 qcom_display: added missing flag for idef eglGetRenderBufferANDROID
Change-Id: I1a531d223cfc21e741b083eba002ba9293fd6047
2011-12-22 11:39:58 +02:00
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