Commit Graph

65 Commits

Author SHA1 Message Date
Prabhanjan Kandula
70139de6a2 libgralloc: fix the calculation of fb virtual y resolution
calculate the yresolution virtual according to the hole
introduced by 4k alignment of frame buffer.

CRs-fixed: 325134

(cherry picked from commit 464443a5d3b216e06e644d0e41c234490c3c46c2)

Change-Id: Id7a93e11e2f3c1d52a26ec3669a9d710c369bf41
2012-06-02 23:38:31 -05:00
Prabhanjan Kandula
e80c89a867 libgralloc: fb size alignment to pagesize
Align framebuffer size and offset to pagesize, calculate
framebuffer size based on this alignment and use it for
mapping framebuffer in userspace and page flipping.

CRs-fixed: 332175

(cherry picked from commit d89b0493b4651fbaaeccccf0ae880cbf1a3a3479)

Change-Id: I7840f7f3c5c42852087cb9df6ae85680c971c601
2012-06-02 23:38:31 -05:00
Arun Kumar K.R
9a02b8e9d6 framebuffer: In enableHDMI, check if target supports true mirroring.
- check if the target supports true mirroring in fb_enableHDMIOutput
  instead of framebuffer HAL initialization.
- We check if the target can support true mirroring by using the RGB1
  pipe, with new driver changes, RGB1 pipe is allocated only after
  first display update.
- Hence moved this call to fb_enableHDMIOutput

(cherry picked from commit db5225cc97b7c42871d5674702e1ca48a5a27904)

Change-Id: I9838fb0bfe6d49c5de3a7b1f4c116bd93c7b375c
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2012-06-02 23:38:31 -05:00
Saurabh Shah
272e6ecb11 Fix heap corruption in overlay clients.
Fix heap corruption in overlay clients, caused by missing
compilation flags. All libraries using overlayLib.h should
have flags used for conditional member declaration in overlay.

CRs-fixed: 342959
(cherry picked from commit 42120b29500560ebedbd897e2e7adf7369eb0a21)

Change-Id: Idf613861c4dc67e96ecadf7ce7e37472cb4e4daf
2012-06-02 20:57:09 -07:00
Andrew Sutherland
0fefc37909 Makefiles: remove QCOM_HARDWARE cflag
Change-Id: Ief3ab8c3eb89fa54fdf3f7889c962311615d7542
2012-05-22 17:06:11 -05:00
Andrew Sutherland
9bcdf571d7 libgralloc: add missing ion ifdefs
Change-Id: I34ce6e17da0ad7b1831008e7d6555c8e530d09b2
2012-05-22 17:05:46 -05:00
Jeykumar Sankaran
6d56f14dff libqcomUI: Add utils folder to libqcomUI
-Introduce utils folder in qcomUI lib for all Qcom
 implemented utility classes.
-Move FPS calculation profiler class into utils
 folder.

CRs-Fixed: 342060
(cherry picked from commit e9469022741642cfd8483839de96e809f4d94f1e)

Change-Id: Ie0af0c0cc10b5304814b4f26aed581ea93ce7f5f
2012-05-22 17:03:47 -05:00
Mathew Karimpanal
49e5cace38 libhwcomposer: Unregister layer handles that fail validation.
Layer buffer handles that fail gralloc validation must be removed
from hwcomposer's register of previous bypass and overlay handles.

(cherry picked from commit 18c7f1951018b6632bd6e1a4957194c01423b6ee)

Change-Id: Idaaf3557b05adb5b3e938e9cd46dac5b104b729e
CRs-Fixed: 347157
2012-05-22 17:03:46 -05:00
Naseer Ahmed
d6ffef4cef gralloc: Add locking to alloc and free in ION
Change-Id: I16e24e3d366b15a458b19983827233a7bd27d9f7
(cherry picked from commit edad58e17deb0cb1d9ff4754fbac511eea8e4ecf)
2012-05-22 17:03:46 -05:00
Sudhir Sharma
a7dbdc7072 Display: Fix swap interval 0
- debug.gr.swapinterval is now deprecated. It has been replaced by
  debug.egl.swapinterval.
- Do not disable MDP bypass if we have ASYNCHRONOUS layers present
  and debug.egl.swapinterval=0.
- Do not lock overlay buffers if debug.egl.swapinterval=0

Conflicts:

	liboverlay/overlayLibUI.cpp

Change-Id: I004a437397570ad62b589bb68db2b9815917f551
2012-05-22 17:03:46 -05:00
Naseer Ahmed
c92339fb57 gralloc: Allow temporary buffer to choose to be cached
The flag GRALLOC_USAGE_PRIVATE_UNCACHED can be set in the
usage to allow it to be uncached. If not set, the buffer
will be cached by default.

CRs-fixed: 341196
(cherry picked from commit 6232816aadd311dbb57b714c7c0a4073d3ddc7f7)

Change-Id: Ic10677d105328702972dd69581b919c984d17fe9
2012-05-22 17:03:46 -05:00
Naseer Ahmed
840a257b9e gralloc: Initialize and handle allocType correctly.
CRs-fixed: 346154
(cherry picked from commit a235dd6b4e8efe3cc432057806b3d5fb2cb4881d)

Change-Id: Ie657f6e52df5a4b39c9fa04e74aabe1135e5bdd5
2012-05-22 17:03:46 -05:00
Panneer Arumugam
873b6a9a79 libgralloc: Clearing PRIV_FLAGS_NOT_MAPPED.
- clearing PRIV_FLAGS_NOT_MAPPED if
  GRALLOC_USAGE_PRIVATE_DO_NOT_MAP flag is not set
  so mmap can be skipped.

Crs-fixed:342782

Change-Id: I01de82dedf08c8c41db179789cc3a9927aa7e221
(cherry picked from commit 67215121cdff9df78d6a80cda442a6bfc7aa27b3)
2012-05-22 17:03:46 -05:00
Andrew Sutherland
906031e60f gralloc: hide pmem debug messages
these tend to dominate logcat especially when playing videos

Change-Id: Iaeb73b164bd2baf71c2f1ea93e0105a843e21ff3
2012-03-30 21:11:00 -05:00
Sudhir Sharma
1d2a4912c5 Revert "framebuffer: In enableHDMI, check if target supports true mirroring"
This reverts commit 85b77ee17b4f30cedb7b449182aa0ad5e942af7e.
2012-03-30 20:32:31 -05:00
Andrew Sutherland
081a89a5ad fixup after huge update
this brings us inline with cafs ics_chocolate branch
per: f696608c9d9e3b6b60a92423338f08d59d19d746

Change-Id: Ibaff05220e7d7f0ddd1b4d7507626a38d717340c
2012-03-16 23:53:44 -05:00
Saurabh Shah
e15d259d8c hardware/qcom/display: External-only display.
Add support for external-only display. Layer buffers
marked with GRALLOC_USAGE_EXTERNAL_ONLY will be
displayed on external panel only, if available.

In addition if the layer buffer also has the flag
GRALLOC_USAGE_EXTERNAL_BLOCK then only that layer
will be displayed on external (During suspend).

When this mode is on, the default mirror mode for
external is stopped.

Conflicts:

	libhwcomposer/hwcomposer.cpp

Change-Id: I8ea2920384c5b68311ee3fe00707d01ab6568b52
2012-03-16 23:29:57 -05:00
Naseer Ahmed
694752d90d display: Add flag to avoid mapping memory in userspace
For secure content the MM heap should never be
mapped in userspace. Add a flag to avoid
doing this for rotator which does not need
userspace mapping.

(cherry picked from commit 8d9f2fa336564d5a021dd932f5619b5f389d5fad)

Change-Id: I17d1faa40859e261518d928089f2ce86084d31fd
CRs-fixed: 332402
2012-03-16 23:15:06 -05:00
Arun Kumar K.R
297e73b6a9 qcom/display: Fix aspect ratio calculation for UI on HDMI
- Changed the aspect ratio of UI on HDMI based on the aspect
  ratio of the primary resolution.
- Remove the default values for action safe region.

Change-Id: I596611f8b01e6e1c1007ad7e6c323ea0ea710ec9
CRs-fixed: 323358
(cherry picked from commit b3c2e7f9d68db550f280ed60e37e7f4ee2a73058)

Conflicts:

	liboverlay/overlayLib.h
2012-03-16 23:14:12 -05:00
Naomi Luis
38e11bf7d4 liboverlay: Refactor setting overlay flags.
Modify the overlay APIs to use only one parameter to set the overlay
flags, instead of adding a parameter per required flag.

Change-Id: Ia753e10b9e2c7a5ee1aabfd48f30c9b7583beaa1
(cherry picked from commit 5535a95c8f69891090a81dbd8ccdc11aa889a42c)
2012-03-16 23:14:01 -05:00
Arun Kumar K.R
37c2692006 qcom/display: Add support for WFD
- HDMI has priority over Wifi display, if HDMI is connected during
  Wifi, close the session for Wifi and start one for HDMI.
- the enableHDMIOutput parameter externaltype - HDMI/WIFI/OFF

Change-Id: If2cd9143fc7a953db49f38a6c166f9425ba5266e

Conflicts:

	libqcomui/qcom_ui.cpp
2012-03-16 23:13:28 -05:00
Arun Kumar K.R
ca1d2bab60 qcom/display: add true mirroring support on HDMI
Change-Id: I7e884e5dde2a08048a28610eb88760fcdd24d558

CRs-fixed: 316397
2012-03-16 22:50:16 -05:00
Jeykumar Sankaran
bd35204368 Revert "Bypass: Turn off only after FB content is displayed."
This reverts commit f2dbabe786.

This change is not needed any more because we are caching the MDP pipe
contents when closing the channel. So no need to wait for postFB finish.

Change-Id: Ia6f01c33953762cb7a97e0b2b795d9afeb60d2d9
(cherry picked from commit 441f1824593bb12a97508b426b597a16b35091e6)
2012-03-16 21:25:51 -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
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
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
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