Commit Graph

73 Commits

Author SHA1 Message Date
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
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
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
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 Sutherland
8ae3baa1c1 revert 4d8c72e... hwc: Enable MDP_BACKEND_COMPOSITION
Change-Id: I2b3b91b17b5b47a2771e4cc5b9e349326203d29e
2012-09-13 00:03:16 -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
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
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
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
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
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
Arun Kumar K.R
b25918ac52 hwcomposer: delay starting the uevent thread
- There is a race condition window between initializing hwcomposer as a
  whole and registering callback functions for when the uevents arrive. We
  can fix this issue by delaying the uevent thread kick off until the
  callback functions are registered.
- Add thread name to uevent thread

Change-Id: I30e23b411b92b6578f186b641f562462a8f23179
2012-09-12 23:05:51 -05:00
Ramakant Singh
cefb36db5c libqdutils::Add support for qcomuiClearRegion
Add support for qcomuiClearRegion for draw
wormhole regions via CPU.

* Added separate singaltone class for getting
eglGetRenderBufferANDROID handle that can be
used by both copybit and clear_regions modules

CRs-Fixed: 383115

Change-Id: Ibeb5bdda87a60950889416e5b4d53e6eb5a3682e

Conflicts:
	libqdutils/Android.mk
2012-09-12 23:05:06 -05:00
Arun Kumar K.R
cc18cfed4c hwc/fb/overlay: wait for fbpost and pan display
Draw sequence in hwc_set
--eglSwapBuffers
--wait for fb_post. Its ok to draw to External only at this point.
--draw to external   | Parallel with PAN
--commit to external | Parallel with PAN
--wait for pan (happening in fb_post) to finish.

Call MSMFB_OVERLAY_SET ioctl only when params change.

These thing together ensure a correct sequence and should fix tearing and
stuttering, the latter assuming there are no other display pipeline delays.

Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
(cherry picked from commit c50c90863e41e31ecfe6963396b5def35e9dca34)
2012-09-12 22:58:18 -05:00
Ramkumar Radhakrishnan
34aed79a86 display: Copyright Fix
Add Copyright information to the top of the added new files.

Change-Id: Ifd878445ef6b89120f761d51254ab2a553b6a6c3
2012-09-12 22:55:50 -05:00
Arun Kumar K.R
0d6b685501 hwcomposer: Make file changes
create separate lib for hwcexternal and ihwcservice

Change-Id: Ie55b9e98eaf62d4aa2cb9f422a75f8195bfd6060
2012-09-12 22:55:42 -05:00
Amara Venkata Mastan Manoj Kumar
62223703e1 hwcomposer: Handle MPQ WFD support
1. Code clean up to handle WFD feature

Change-Id: I36170c3424f9250dc39c2c249a757d508b2abdfa
2012-09-12 22:55:33 -05:00
Jeykumar Sankaran
7c5f26105a libhwcomposer: Support swap interval zero
Change-Id: I4732263c86bb28b4c7135bad9768b8690f7f60e0
2012-09-12 22:55:16 -05:00
Ramkumar Radhakrishnan
060e7797ed display: Add binder interface between hwcservice and its clients.
Add hwc_service.cpp and ihwc.cpp file to enable direct communication
to hwcomposer by the clients to set hwc system wide properties.

Create hwcomposer service singleton object in hwc_context_t structure.

Change-Id: I0d0879475951a618a453a23ee254ea651e8c6b88
2012-09-12 22:55:04 -05:00
Saurabh Shah
1be2fcd4f0 hwc: qbuf: Add API to unlock all
Add API to unlock all current and previous buffers.
This is essential in suspend cases.

CRs-fixed: 382332

(cherry picked from commit d24eb9e70480f89561108078f68cbbd9b20e4bb5)

Change-Id: I54fcded7cabc79d991d4b28a248867d860ec6b08
2012-09-12 22:52:42 -05:00
Andrew Sutherland
54cbb6f94f Revert "hwc: call eglSwapBuffers even when there is no list"
This reverts commit 7b060c9cab.
*causes blank draws, revisit someday
2012-09-07 21:58:21 -05:00
Sravan Kumar D.V.N
857f8a5f0b display : Avoid calling eglGetRenderBufferANDROID for each layer
Currently eglGetRenderBufferANDROID is being called for each layer
which is not needed. This change calls this API once in set call,
and passes the 'render buffer' to drawLayerUsingCopybit.

Change-Id: I310163db02df13e8c03b51d73f291588fbf08160
2012-08-21 16:11:44 -05:00
Andrew Sutherland
7b060c9cab hwc: call eglSwapBuffers even when there is no list
Should fix crt-off animation

Change-Id: Ia38a35dcb16811337c80a3f7069d770e6eebb8a7
2012-08-21 16:11:17 -05:00
Steve Kondik
85ff2df3a5 display: Add option to disable hardware VSYNC
* Set TARGET_NO_HW_VSYNC to disable use of VSYNC

Change-Id: I9c48f89ba6d4a39baf7c149717b13c83c0b7f3eb

Conflicts:
	common.mk
	libhwcomposer/hwc.cpp
2012-08-12 00:10:39 -05:00
Andrew Sutherland
c8b3f3bce8 Merge remote-tracking branch 'caf/jb' into temp 2012-08-09 22:38:37 -05:00
Amara Venkata Mastan Manoj Kumar
211f9f4144 hwc_composer: Support of WFD Display.
1. WFD Event Detection.
    2. WFD/HDMI Priority Decision.
    3. Configure HWC for WFD Connect/Disconnect.

Change-Id: I1c1bbae449ce38d9b32e8e2bd66d14ae98468c49
2012-08-08 20:30:11 -06:00
Arun Kumar K.R
9813cf3bdc hwcomposer: Store device orientation in hwc context
Instead of determining the device orientation based on the
layer orientation, use the value which comes from the framework

CRs-fixed: 382796
Change-Id: I83e87534fbfc62740a411f1324b2c12e88434b41
2012-08-08 10:53:29 -07:00
Andrew Sutherland
8d111e9b7f Merge remote-tracking branch 'caf/jb' into jelly
Conflicts:
	common.mk

Change-Id: I512d7e14264192b716e0c5921b685e995853d4f6
2012-08-07 22:00:43 -05:00
Sravan Kumar D.V.N
c1e7e4861a display : Enable vsync for MDP3 targets
-Enable vsync for MDP3 targets
-With this change all targets except 8x55,
 have vsync enabled

Change-Id: Ic0856359a28c730948d7d74427f6802ed89cc1b1
2012-08-07 14:52:57 +05:30
Jeykumar Sankaran
7c86dfe139 libhwcomposer: Reset composition types on idle timeout.
SurfaceFlinger re-creates HWC worklist only for new frame and on
 layer geometry change. Invalidate triggered by idle timeout
 refreshes the existing worklist retaining its previous
 composition type. So its MDP comp's responsibility to clear
 layer composition types to HWC_FRAMEBUFFER on timeout.

Change-Id: Ibf11dd6c12c647c75d36d8cbad408c3ea70588bd
2012-08-04 13:15:23 -07:00
Linux Build Service Account
27157148fb Merge "hwc: video: Update destination x, y" into jb 2012-08-04 03:53:22 -07:00
Linux Build Service Account
bce9dcfb5a Merge "display: Fix warnings, make warnings as errors" into jb 2012-08-03 04:47:26 -07:00
Andrew Sutherland
e25f40c946 bring back pmem/ashmem allocators
o removed RefBase usages
o ifdef for TARGET_USES_ION

Change-Id: Ief331f4c847b86be0e37d24983097af1f53234a2
2012-08-02 23:16:45 -05:00
Andrew Sutherland
87f0aec7e0 git checkout caf/jb . (starting over)
per be02ab0... display: Clean up gralloc

Change-Id: I3857046362703bacf3c4c1bcad831bfaa92387e7
2012-08-02 23:16:08 -05:00
Andrew Sutherland
1ccdbea036 Merge remote-tracking branch 'caf/jb' into jelly
Conflicts:
	common.mk
	libgralloc/alloc_controller.cpp
	libgralloc/pmem_bestfit_alloc.cpp
	libgralloc/pmemalloc.cpp
	libhwcomposer/hwc_external.cpp
	libqdutils/mdp_version.cpp

Change-Id: I1a0182faeb5e3c10153a5236434b55ff78b0eada
2012-08-02 23:02:46 -05:00
Arun Kumar K.R
0b44443a34 hwcomposer: fix the bug in setting connected status to ext display
the hdmi driver can send change uevent anytime, in which case, the
connected state was getting set to 0, due to its default value.

Change-Id: I22dc96acda0272661750277d62c5c11c5156fb3b
2012-08-02 11:06:43 -07:00
Naseer Ahmed
31dcb41d25 display: Fix warnings, make warnings as errors
Change-Id: I61f22765b04112be48e62135db930c415c9c7d37
2012-08-02 04:48:08 -07:00
Saurabh Shah
549f3b19d7 hwc: video: Update destination x, y
Update destination x, y after an out-of-bounds video's bounds are recalculated
for crop and destination position.

Change-Id: I5419f7ae054f709111c39d79ec721686f474ae53
2012-08-01 19:35:50 -06:00
Naseer Ahmed
be02ab0d74 display: Clean up gralloc
* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity

Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787
2012-07-31 22:18:18 -06:00