Commit Graph

151 Commits

Author SHA1 Message Date
Ramakant Singh
dcda8a5f27 HWC/copybit::Add condition for video layer composition
In case of non overlay target composition of the video
layer should base on composition of UI layer as well.
(if taget has dynamic composition)

Change-Id: I5eb91adec340297fdc4b0560f01f74aaf8459586
CRs-fixed: 397517
2012-10-14 15:47:48 -07:00
Amara Venkata Mastan Manoj Kumar
a4b0340e0f hwcomposer: Add secure intents to support Secure Playback
Add OPEN_SECURE_START, OPEN_SECURE_END, CLOSE_SECURE_START
   and CLOSE_SECURE_END secure intents for Securing/Unsecuring
   start and end notifications.

   1. On Open Secure Start and Close Secure End events, hwc_prepare
      close the current overlay state and composition will be
      done by GPU. This will teardown the exisiting Rotator session.
   2. On Open Secure End, secure configuration is enabled and
      subsequent hwc_prepare will allocate secure memory for Rotator.
   3. On Close Secure End, secure configuration is disabled and
      subsequent hwc_prepare calls will allocate non-secure memory
      for Rotator.

Change-Id: Ia81b21d19f8084f218ae16eb8e69bb62937afa26

Conflicts:
	libhwcomposer/hwc_utils.h
2012-10-14 15:47:48 -07:00
Arun Kumar K.R
c3dafd1e58 hwcexternal: fixes in hwc_external
- instead of FBIOPUT_VSCREENINFO ioctl, use the new ioctl
  OVERLAY_PIPE_COMMIT to update the external display
- when MSMFB_OVERLAY_VSYNC_CTRL ioctls fails, return -errno

Change-Id: Ie37309615f7fa39f20fa347fc53c04f7fcab9740
CRs-fixed: 391564
2012-10-14 15:47:48 -07:00
Naomi Luis
7181de24ab hardware/qcom/display: Remove glfinish call
There is no need to do a glFinish on every composition complete.
glFinish needs to be called for composition cycles where GPU and
copybit are both used for composition. This is because the GPU and
copybit operate on the same framebuffer.

(cherry picked from commit 7983c275ae3eb15fab931d301e6338f83ad4a75a)

Change-Id: If06da4ca60ec17122c3dd698558cbf08fec73251
2012-10-14 15:47:48 -07:00
Prashant Surana
35bec0b0bf libhwcomposer: Fix bug caused by change 152124
The change in 152124 makes the yuvLayerIndex equal to the pipLayerIndex
because of which overlay is used only for the pip video and not the main
video. Removing the assignment operation since that is updated when
yuvCount is 1.

Change-Id: I4a96a0e57c43e2c4888d3497229a9a24dde2ca27
2012-10-14 15:47:47 -07:00
Pawan Kumar
638d873edb libqdutils: Initialized GPU layer present flag to false
Change-Id: I8d7ce6acdc28fbd562f60cd8c96d993817d6489a
2012-10-14 15:47:43 -07:00
Neti Ravi Kumar
c356c1c205 hwcomposer : Synchronize EventThread, and hwcVsyncThread
Synchronization is needed,to make sure, read() is not called
by hwcVsyncThread when VSYNC is disabled.

Otherwise in usecases, where display is OFF, and still some
tasks keep running in the background; SurfaceFlinger hogs
CPU.

(cherry picked from commit ffa84468bbd2517ffb22ab4023cb57a6272fc80d)

Change-Id: Idd779647a27ed3e6fb0703a07033dd5f7cd1b5fd
2012-10-14 15:46:18 -07:00
Neti Ravi Kumar
673e4933a1 hwcomposer : Use sysfs to read vysnc information
* Read sysfs entries, to get vsync timestamp from kernel.
* External display continues to use in ueventThread.
* A new thread, vsyncThread is created to read and send vsync
  timestamps to HAL.
* Disable H/W VSYNC for MDP 5.x targets until kernel changes are
  complete.

(cherry picked from commit a61a58cb775631cd3899211f6ff0aed232f5f3c0)

Change-Id: I58e09a092f81d4ff78b8cb4072ff06d2500c6f53
2012-10-14 15:45:19 -07:00
Steve Kondik
431dc083a9 Revert "hwc: Support VSYNC notification via sysfs"
This reverts commit 0d47bc4df5de25b8232a3c297a96d8def5e206af.

I suppose we'll use CAF's version.
2012-10-14 15:39:34 -07:00
Raj kamal
6d678fb683 libhwcomposer: Check for downscaling with alpha
RGB pipe doesnot support downscaling with alpha on targets
with MDP 4.1 and less. Abort bypass for those targets if the
layer requires downscaling with alpha

Change-Id: I3450968458977626dfc90a9f35da593f08ced93c
2012-10-14 15:39:34 -07:00
Prabhanjan Kandula
e09a5d04db libgralloc: Fix possible leak of fd
Fix possible leak of fd in ion allocation.
If mmap fails close the fd before returning.

Change-Id: Id414792c14a75259f6075b0d76bc470c31fb5853
CRs-fixed: 387633
2012-10-06 00:49:06 -05:00
Steve Kondik
36445e454b hwc: Support VSYNC notification via sysfs
* Poll on FB0 sysfs for VSYNC events. This requires kernel support to
   call sysfs_notify instead of sending a uevent.

Change-Id: I48734d8ffdd59dc1de7064fa004af1332ceb7623
2012-10-06 00:49:06 -05:00
Rajulu Ponnada
6c321b272c hardware/qcom/display: avoiding tile rendering when render target changes for the same fbo
tile rendering avoided when switching between same FBOs

Change-Id: I66e3008652470f5cabd26585ece8ef7a783fd0c2
2012-10-06 00:49:06 -05:00
Jeykumar Sankaran
cfb095ef61 libqdutils: Add copybit support to qdutils
- Introduce cbutils for copybit utilities
- Don't use qcomuiclearregion if GPU is used
- Check for qcom composition types updating FB
- Dont show YUV information to copybit
- Fallback to GPU in the presence of SKIP layers

This change adds support in qdutils to check for FB
updating composition type.

Change-Id: I200d3798a27836a51f4b2e6c79cdd9d8b155fad8
2012-10-06 00:49:06 -05:00
Arun Kumar K.R
db76cc05a0 display: Add support for video rotation on Ext display
- sourceTransform in the hwc_layer_t has the source buffer transform,
  use this transform for external display.
- This helps in showing videos with source orientation properly on the
  external display
- Remove unsed flag FINAL_TRANSFORM_MASK

Change-Id: I66f7db95166c51ecee8b6b5cc126a67df3dd4602
CRs-fixed: 387357
2012-10-06 00:48:59 -05:00
Prashant Surana
0dbb7ae83c libgralloc: Add RGB_888 format as BUFFER_TYPE_VIDEO
GPU cannothandle RGB 888 format hence mark it is video.
This is required for MPQ.

Change-Id: I52b0e8c20af00a901ce3fc07cfb56d862f00caa9
2012-10-06 00:42:09 -05:00
Steve Kondik
40a95bd726 gralloc: Don't use FB metadata on gimpy targets
* If a device doesn't support VSYNC, it probably doesn't support FB
   metadata ioctl. Add an ifdef around it.

Change-Id: I1bf788147129f7b9d584e22b914f1c59d2ee133b
2012-10-06 00:41:59 -05:00
Jeykumar Sankaran
ce1f0fe1c0 libgralloc: Set alpha mode for MDP base pipe.
This change configures default alpha mode for MDP base pipe
during intialization.

Change-Id: Ibbc7185c4c57979584a5ce66bd4eef8e521165b5
2012-10-06 00:41:49 -05:00
Amara Venkata Mastan Manoj Kumar
d0181d6f7c hwcomposer: Remove vsync event control for WFD External Display
Change-Id: Ic0ffcfb035a8d0037d6394cb4b77888390eb7608
2012-10-06 00:41:40 -05:00
Ricardo Cerqueira
ad7f1aa0d3 liboverlay: Make sure the crop rectangles' dimensions are even
Even out the values for both dimensions and position on both src
and destination rects.
This fixes both over and underrun issues, especially with HD panels

Change-Id: I781792d69cad83f76c3c0a45a5179a731661c3cf
2012-10-06 00:41:06 -05:00
Steve Kondik
2657e2e851 hwc: Close overlay when HWC disabled
* SF will disable HWC before showing the electron beam animation. Close
   the overlay so that the GPU can be used.

Change-Id: I25bb3ed5cd9a5d80a590af4f94f2d0b903e98352
2012-10-06 00:40:55 -05:00
andrew.boren
29808884a9 qcom/display: Fix ion header.
Change-Id: I4a7759c2bf52433565c8501c22627794fb9c45a1
2012-09-30 00:45:38 -07:00
Andrew Sutherland
51cba77355 Revert "libtilrenderer: enable debugging"
This reverts commit 0e74f1f414.
seems to work ok. this is far too noisy
2012-09-13 20:07:05 -05:00
Andrew Sutherland
0e74f1f414 libtilrenderer: enable debugging
Change-Id: I0d677df35c3584e6a50d6d9a11f863ce8c49c73c
2012-09-13 20:03:19 -05:00
Andrew Sutherland
becf389b5b libtilerenderer: fix include path
Change-Id: Ie4310ebe3e18d806c85a0a13cbd251a645b9e6a3
2012-09-13 20:02:58 -05:00
Andrew Sutherland
8ae3baa1c1 revert 4d8c72e... hwc: Enable MDP_BACKEND_COMPOSITION
Change-Id: I2b3b91b17b5b47a2771e4cc5b9e349326203d29e
2012-09-13 00:03:16 -05:00
Andrew Sutherland
b9d164d3e4 libtilerenderer: update include paths
Change-Id: I12d6bf9c929c2f379bb7fd58ff48c44c721a324a
2012-09-12 23:42:27 -05:00
Jeykumar Sankaran
e8c4c541b2 libhwcomposer: Close MDP PIPES in hwc_prepare.
Since MDP is doing a deferred close on pipes after PAN DISPLAY
HWC can close the pipes in prepare

Change-Id: Ia451e3b2e388d1b2199a14e31c3991d5d1b057c8
2012-09-12 23:11:50 -05:00
Amara Venkata Mastan Manoj Kumar
1b69283a7f hwcomposer: keep secure content in an overlay when below skip layer
Secure content can not be displayed unless in an overlay.  Since
getLayerStats marks all layers under the skip layer for framebuffer
composition, when there is a skip layer on top of protected content,
the protected content disappears since surfaceflinger doesn't draw
protected layers.

Change-Id: I59dd5dffad08dbf578baa459f5f4c726b6674c83
2012-09-12 23:11:50 -05:00
Jeykumar Sankaran
0d7fad0878 libhwcomposer: Reset layer list before clearing MDP states.
This change resets layers flags and composition types
before clearing MDP states.

Change-Id: I03ec173df7dec67348942f307079b506649f592b
2012-09-12 23:11:50 -05:00
Saurabh Shah
43dfffc8d6 hwc: wait for fb_post, PAN only if target has overlay.
Wait for fb_post, PAN only if target has overlay.

(cherry picked from commit c6e9a0aae817e75b4b5e20ef23edd02a0a627ccd)

Change-Id: I9696c122b3ce5abed2ae2adb9e5929d3664b3add
2012-09-12 23:09:59 -05:00
Amara Venkata Mastan Manoj Kumar
da0c6f2126 Overlay: Change MDP format for YV12 buffers
Android uses different alignments for YV12 buffers.
   Hence, introduce a new format (MDP_Y_CR_CB_GH2V2) for
   such buffers.

Change-Id: Id4d58dd77f22c9efb8ece9caa34a8717964bf58d
2012-09-12 23:09:51 -05:00
Saurabh Shah
8904b7a648 hwc/overlay: Add premultiplied alpha support.
Add premultiplied alpha support to video and mdp comp features.

Change-Id: Ieddaf82d5cc43c455bd1c10dbc82b0fc016903ea
2012-09-12 23:09:43 -05:00
Saurabh Shah
e684abd1ec hwc: video: Create crop and position structs only once.
Create crop and position structs only once.
Fix bug where x and y were not updated.

Change-Id: I7c6a873ba207997baa302b8999bdaf34cc938dba
2012-09-12 23:09:36 -05:00
Arun Kumar K.R
6f560322d7 display: Add support for video rotation on Ext display
- sourceTransform in the hwc_layer_t has the source buffer transform,
  use this transform for external display.
- This helps in showing videos with source orientation properly on the
  external display

CRs-fixed: 387357
Change-Id: I2ac7e5481a27b93d10ba3fc1ad2e4a8788dc20a5
(cherry picked from commit a51a41188d34db49528edadadbf9ddbc052e772d)
2012-09-12 23:09:28 -05:00
Pawan Kumar
b39f56b071 copybit: Fix crash when copy_image is called with Tile format
Add check for copy_image failure case.
CRs-Fixed: 393122

Change-Id: I5765120e87a135795d771c5d331275a66ade7e23
2012-09-12 23:09:10 -05:00
Naseer Ahmed
357ee6d8dc hwc: Call swap buffers even on NULL lists
Swap buffers and UI mirroring must be done even on NULL lists
which are composed by SurfaceFlinger.

Change-Id: I6c840e3dd02dfa447c10bf3f4798114fc74536ee
2012-09-12 23:08:48 -05:00
Steve Kondik
ddd0b7498d hwc: Correct default value of dynThreshold
Change-Id: I18aefe755334cb62e43fc2c39cc42fb0fcbadef1
2012-09-12 23:08:39 -05:00
Steve Kondik
e7e5ddbba9 hwc: Set premultiplied alpha flag appropriately
Change-Id: I516dc5c6d3bb4f02c98b4add5e818ae88d08eba4
2012-09-12 23:08:31 -05:00
Neti Ravi Kumar
4c01c36778 hwcomposer : Use system property to set DYN composition threshold
Change-Id: I15c82d46ec846ff2bff7a1fc7a924bb7fcf844f9
2012-09-12 23:08:23 -05:00
Saurabh Shah
82a40187e0 overlay: Remove OVASSERT from getFormatString utility
Remove OVASSERT from getFormatString utility. OVASSERTS should happen only from
critically wrong states of overlay.
Just failing in this utility method would allow a fall back to GPU.

Change-Id: I4467a750574ee90aee4fa2e0fbb041e7f386a63b
2012-09-12 23:08:14 -05:00
Ramkumar Radhakrishnan
9445335019 libgralloc: Allocate buffer Fix.
Fix to allocate buffer of size defined by the client using
NATIVE_WINDOW_SET_BUFFER_SIZE property function.

Change-Id: I29f3e7e85c2f8dd7c11149d78b2681e6478cef78
2012-09-12 23:08:07 -05:00
Prabhanjan Kandula
1759ea1ab0 libcopybit: fix YUV buffer alignments as per gralloc
buffer alignment in copybit should be in sync with
gralloc allignments while allocating buffer.

CRs-fixed: 377051
Change-Id: Ib2ae64e368ea3c92d3494c71da605197ccb4a9a5

Conflicts:

	libcopybit/copybit_c2d.cpp
2012-09-12 23:07:59 -05:00
Prashant Surana
cc5cb1781c Add support for PIP, picture in picture feature
Add a new state and required implementation in new overlay to support playback
of two videos using overlay.
Add a new class VideoPIP to handle the pip feature.

Change-Id: Ibce7044bc1216cba77bd952e191aed5472ed6737
2012-09-12 23:07:49 -05:00
Ramakant Singh
77e0c7b380 libqdutils::Use qcomuiClearRegion for dynamic composition
Change-Id: I7483f6967c6f712af15031c386fb08c8fdae0808
2012-09-12 23:07:39 -05:00
Steve Kondik
4d8c72e306 hwc: Enable MDP_BACKEND_COMPOSITION
* Add MDP_BACKEND_COMPOSITION flag to resolve flicker

Change-Id: I3dfa680e0c74ccbac69f40dc15e014153ce0b530
2012-09-12 23:07:14 -05:00
Andreas Schneider
6635f27cd8 qdutils: Add MDP v3.0.2 detection.
Change-Id: I22ad1f7fe3c2c03518e192b44f8f0f7018d8ff34
2012-09-12 23:07:05 -05:00
Saurabh Shah
0a2352aee5 hwc: Unlock prev. buffers in N+1th draw round.
Unlock previously locked overlay buferrs in N+1th draw round, rather than N+2th.
This is now possible because of wait for PAN.
Provides an opportunity to improve genlock behavior and makes it more ICS like.

(cherry picked from commit b3a4cd7944397565388b4e940fb41d2af8882687)

Change-Id: I48f937b77d59b31f3bf04c5a2eb35500bd5d76d6
2012-09-12 23:06:57 -05:00
Sravan Kumar D.V.N
dc733193ef display : Do not use copybit for composition when YUV layer is present.
Do not use copybit for composition when YUV layer is present only in
overlay targets & use copybit in non-overlay targets.

CRs-Fixed : 385992
Change-Id: I671bc5f37b924160e32e900207fb81634dee0929
(cherry picked from commit 1f05b5ef18723bc73a21259ca7c5f112228a5c85)
2012-09-12 23:06:49 -05:00
Neti Ravi Kumar
560a18ba31 hwcomposer : Disable bypass, when connected to external display
disable bypass, when connected to external display

Change-Id: I57edc8fc1b9254b3c60c229aabb2515f320c9de4
2012-09-12 23:06:41 -05:00