Commit Graph

76 Commits

Author SHA1 Message Date
andrew.boren
bb1ae5d198 Merge "ionalloc: Fix typo." into ics 2012-06-06 22:18:45 -05:00
andrew.boren
ac6e239175 ionalloc: Fix typo.
*Not sure if this is a typo, or had used this flag previously, but
  needs to be O_SYNC now.

Change-Id: I665aa2436009fcc735c1ffb9e0ab4bde79c5163d
2012-06-03 11:22:25 -07:00
Andrew Sutherland
ae4a02e746 copybit: fix ion define
Change-Id: I9d4005b30f16aa191d3eb4c8455e5dbe198d5607
2012-06-03 02:49:06 -05:00
Steve Kondik
1ded1767f9 gralloc: Remove ifdef around assignment of perform
* Perform is used for more than HDMI, and without this set on devices
   that don't have HDMI enabled, crashes result.

Change-Id: I9029892a12ab09ffb66b3560f796ffb99ea57460
2012-06-03 02:49:06 -05:00
Naseer Ahmed
6b64b4881e gralloc: Reduce log severity for invalid handles
The calling function logs the appropriate error

Change-Id: I41f446b1495e23995aff4778f1c1a488d83537fb
CRs-fixed: 361831
(cherry picked from commit 81fd358ee8b70946b306417064d104fa3341d6fa)
2012-06-03 02:49:05 -05:00
Saurabh Shah
7015a91bc8 framebuffer: Remove extraneous update on HDMI
HDMI should be updated only in conjunction with primary.
Which means on a resume from suspend (which is treated as
cable connect in HALs) we need not draw ahead of primary.

A good way (already existing) is to call invalidate() on SF
on cable connect so that primary is updated and only then HDMI,
by a trigger from disp_loop thread.

Change-Id: I7d5268b2f0e27adb04aade757c36483cdfc1333e
CRs-fixed: 335763

Conflicts:

	libgralloc/framebuffer.cpp
	libhwcomposer/hwcomposer.cpp
2012-06-03 02:49:05 -05:00
Saurabh Shah
1e2be7b5b0 hardware/qcom/display: Add events for secure session setup
Change-Id: I0c0b5b7ae70d7ea8b341285479cd92750e1f6274

Conflicts:

	libgralloc/framebuffer.cpp
	libqcomui/qcom_ui.h
2012-06-03 02:49:05 -05:00
Ramakrishna Prasad N
5875b20445 libgralloc: Add API's to synchronize framebuffer update.
This change introduces API's in gralloc to allow clients
to synchronize with framebuffer posts.

CRs-fixed: 348953

(cherry picked from commit f81de75b1adb78018c0bd54b7f27901ba467defd)

Conflicts:

	libgralloc/framebuffer.cpp
	libqcomui/qcom_ui.h

Change-Id: I98b6a2b3243f520138cb5d1c76493cdfa3af60b6
2012-06-03 02:49:05 -05:00
Arun Kumar K.R
ac786968e3 qcom/display: add perform function to fb/hwc HALS
- Add perform function to framebuffer and HWComposer HALS
- This will be used communicate custom events(external display,
  video overlay, orientation, etc.,) to HALS
- remove setActionsafe API(not used)

CRs-Fixed: 341947
(cherry picked from commit 31999628ddd4a6c0996e22e9fbf1f311d6efb160)

Change-Id: I221f2ab49770e8db7602bb1881ef9972567b7780
2012-06-03 02:49:04 -05:00
Naseer Ahmed
0371a6cfa9 display: Use a new flag for content protection
The GRALLOC_USAGE_PROTECTED flag that was used
earlier for content protection is also used for
some other use cases such as disabling of
screen captures. Define this new flag that
is explicitly used for allocating secured
buffers for DRM.

Change-Id: Ia33f79fa0dea7f2f16dd320f267203e6173af48e
CRs-fixed: 348454
(cherry picked from commit 440a996f13be732895524412762793f109681c11)
2012-06-02 23:39:24 -05:00
Naseer Ahmed
b904eeeec8 gralloc: Allow SF to use IOMMU heap
(cherry picked from commit 9ff9a8df77ce6887b6d45fdb7dc7400690d408c5)

Change-Id: Ia079f4c68b88201f638cfc2b4618de381d246e49
2012-06-02 23:39:24 -05:00
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