Commit Graph

1245 Commits

Author SHA1 Message Date
Prabhanjan Kandula
2e18b6b9b2 libcopybit : Fix calculation of copybit source rect for blit
- Fix the copybit source rect calculation for 180 and 270
 degrees rotation. Calculate blit rects  based on the source crop.

 CRs-fixed: 337366

(cherry picked from commit 06aa97757bd7023234d3852801e05e077aaa1d2f)

Change-Id: Iba2e230acd84271fc5649e06918824752aa90670
2012-03-16 21:23:21 -05:00
Prabhanjan Kandula
917a203129 libhwcomposer: Fix temporary stretch in copybit
-Check only for 90 or 270 degrees rotation and interchange
width and height if rotation is one of them.
-make scaling computations in float

CRs-fixed: 337370
(cherry picked from commit 460d7b96c06aa33d61b38d146f76887a49cd8057)

Change-Id: I30255e3926917896223dba7306df60ff7cfa14e2
2012-03-16 21:23:05 -05:00
Prabhanjan Kandula
a16a3bc002 libcopybit: Fix the software conversion from YV12.
Fix the software conversion from YV12 to YUV_420_SP
by reading the chroma based on chroma padding involved.

CRs-fixed: 333784
(cherry picked from commit b22b6b191644e3ef618d122d30cef4bb9f87019d)

Change-Id: Ie84c1cbb2635a6197c5a907dac1e720c29a66e6c
2012-03-16 21:22:50 -05:00
Ramakant Singh
739ac1ba01 Display/copybit:Fix YV12 multiple conversion issue
Use a temporary buffer to replace inplace conversion

CRs-fixed: 333784
(cherry picked from commit 927542660e4c6106f8062c79bd6461c7fef55b4a)

Change-Id: I044bdaa31faea98552e35267bb78318317d68866
2012-03-16 21:22:38 -05:00
Naseer Ahmed
d19d1e2ff9 display: Use temporary buffer for internal conversion
(cherry picked from commit 7945ee46591ceba584b1b2167e5f750d3489d69c)

Change-Id: Ie71a8745e8810ade310103fdfed7db03cd170980
2012-03-16 21:22:11 -05:00
Naseer Ahmed
128d5de4b5 gralloc: Add function to calculate buffer dimensions.
This function can be used from other components
to get the aligned dimensions and size of the buffer
given the width, height and color format.

Change-Id: I8d7532a262194f3883bf0f5166e806e0971392e2

Conflicts:

	libgralloc/gpu.cpp
2012-03-16 20:57:34 -05:00
Rajulu Ponnada
e17722b895 hardware/qcom/display: Add debug feature to display FPS for both bypass,fb
Change-Id: Ib4991200db9bc64c823c57ed1fba43f836142957
(cherry picked from commit cc57c2f34b936636e9c52dc43689d9386bcd0e35)

Conflicts:

	libgralloc/Android.mk
	libhwcomposer/Android.mk
	libqcomui/Android.mk
2012-03-16 20:51:30 -05:00
Naomi Luis
72aff33e3e libhwcomposer: Continue the loop when we skip composition.
When the HWC_SKIP_COMPOSITION is enabled, continue looping through
the layers instead of breaking the loop. Thus we are assured that
all overlay layers are always drawn.

Change-Id: Ia8d4c7003838cbb86e2f0ea8b5ef2d47516aa011
CRs-fixed: 333986
(cherry picked from commit 8c2a615a0a3d89a5830af3b8117115ae8071bd27)
(cherry picked from commit 11ea4a3635a347182f6b2f8f2ad6e3b394a13eda)
2012-03-16 20:44:07 -05:00
Naomi Luis
7407479717 libhwcomposer: Unlock video layers below the SKIP_LAYER.
If there is any video layer below the HWC_SKIP_LAYER, we compose that
video layer using the GPU. Unlock any previous video buffer that were
sent to the overlay.

CRs-fixed: 333974
Change-Id: I1937ca8b139f40453a3bccb0b490fd4d65fa1f52
(cherry picked from commit 48a3996a2178244ce6365f97212c55e7ab33752a)
(cherry picked from commit f4a08165b2d3be97b72287fc4001cb5c90d57c07)
2012-03-16 20:43:54 -05:00
Naseer Ahmed
bd1aed8185 gralloc: Set total pmem size correctly
(cherry picked from commit 574e0998140becdfcebf11530bc10de3bcf31533)

Change-Id: I67b1530de43dab609261efa592dc41e030c157ef
2012-03-16 20:43:15 -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
Naomi Luis
2f579e15da libgenlock: Remove the call to GENLOCK_IOC_RELEASE.
The GENLOCK_IOC_RELEASE ioctl is now deprecated. This was done because to
avoid race conditions where the handle was released before another client
tried to unlock it.

(cherry picked from commit d1514357422ce130d3e2776f984294a9efeea83e)

Change-Id: Iaf433a79dd0dad992cbf67180765718beec4eb1c
CRs-fixed: 333141
2012-03-16 20:42:49 -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
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