Commit Graph

122 Commits

Author SHA1 Message Date
Saurabh Shah
649cda6710 hwc: Minor bug fixes.
Some minor bug fixes.

Change-Id: Ie8c2f58b9c6db6e77739e4693da503f6f963827d
2012-09-18 10:26:51 -07:00
Saurabh Shah
56f610dd23 display: Create QService binder interface.
Add QService binder interface to enable communication
to display by the mediaserver for Securing/Unsecuring start and end
notifications.

Create separate lib for external.
Clear reserved field before applying format.

Change-Id: I463c9c6deac7587bd0c4e0b84513b5d0b5dd7e98
2012-09-18 10:21:14 -07:00
Iliyan Malchev
80692ef564 hwc: add more debug print
- when UNBLANK completes
- when POWERDOWN completes

Change-Id: Ife7b4b40309de0f58052184ca3e4584b50c69bb1
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-09-17 23:16:53 -07:00
Ajay Dudani
cb3da0a5e4 liboverlay: close all the opened pipes after framework reboot.
b/7147557

Add initOverlay() function to close all the opened pipes when
Surfaceflinger process gets killed.

Change-Id: I9c65a61c81f9c81198f1076d6cbd27933b164c05
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-09-14 15:48:52 -07:00
Saurabh Shah
9171ec698c hwc: Add non-zero checks. Move warning log.
Add check for presence of non-zero number of layers.
Move the "composition after powerdown" log under that check.
Move the caching of dpy under list non-null check.

Change-Id: I99b9293e671a15ba1fb31692e30413d2bbd97867
2012-09-13 09:40:02 -07:00
Saurabh Shah
e557e6e8e8 fb: Remove extra PUT_VSCREENINFO call.
Remove the extra PUT call during system startup.

Change-Id: I29287af2ee5610e749ac481c2832f41d7381ca59
2012-09-12 21:41:25 -07:00
Saurabh Shah
aa537df10d hwc: Add some debug and warning logs.
Add debug logs for blank, unblank and warning logs for composition on powerdown.

Change-Id: I184a9503a26d401cf70e072815603a47d3972eed
2012-09-12 13:43:51 -07:00
Kinjal Bhavsar
139e162e34 libgralloc: remove pid checks
These pid checks seem to have been left over from PMEM days.

Change-Id: I1e504bc889b90d8fed6e0be47fd21d1e3f42c50b
2012-09-10 12:44:21 -07:00
Saurabh Shah
799a39759b display: Enable MDP pixel repeat on MDP Composition.
This change sets MDP_BACKEND_COMPOSITION flag during
MDP composition to enable pixel repeat in MDP H/W

Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: Ibc04878831c84e1e1fd0ace7c185bddce9b7ab7f
2012-09-09 14:20:29 -07:00
Saurabh Shah
1023ce2fdd 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-09 14:19:55 -07:00
Saurabh Shah
ae1044e0cb 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.

Acked-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Change-Id: Id4d58dd77f22c9efb8ece9caa34a8717964bf58d
2012-09-09 14:19:20 -07:00
Saurabh Shah
9c876d9f8c 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-05 22:08:18 -07:00
Saurabh Shah
aedf236884 gralloc: Check for HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
Check for HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED before assigning format based
on usage bits.

Change-Id: Ie140f3f8a7002febc2fab729686d646b349c3b75
2012-09-05 22:06:25 -07:00
Shuzhen Wang
79cf7c7454 Gralloc: Fall back to HW_CAMERA_WRITE if HW_VIDEO_ENCODER is not set.
In both video encoding and camera preview cases, HW_CAMERA_WRITE will
be set. This is a hack so that if HW_VIDEO_ENCODER is set, allocate
NV12 format; otherwise, allocate NV21 format.

Change-Id: I61dc96b125e026159f55048cb79783578832460a
2012-09-04 21:16:38 -07:00
Saurabh Shah
661a58f851 hwc: Do not create copybit.
Do not create copybit instance.
Fix copybit init and deinit sequence.

Change-Id: Ia669f4cc89c85294a040400a750aa72a93e579b8
2012-08-31 15:19:55 -07:00
Saurabh Shah
2e2798c71a hwc: Fix fps calculation.
Fps is returned directly by the driver. No need of additional calculations.

Change-Id: I17bed4347f094b71340ca39e37b66fbcf9fdba9c
2012-08-31 15:19:26 -07:00
Saurabh Shah
f395d09031 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.

Acked-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Change-Id: I59dd5dffad08dbf578baa459f5f4c726b6674c83
2012-08-27 19:48:01 -07:00
Saurabh Shah
b121e140e5 liboverlay: Adjust values to align with MDP requirement
For YUV only:
Crop rectangle (src_rect) needs to be even for x/y and w/h
Destination dst_rect w/h need to be even (x/y can be odd).

Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>

Change-Id: Ib0c1b7d31773e71d60f080b4beacaa68e32a990e
2012-08-27 13:55:25 -07:00
Saurabh Shah
df727717e8 hwc: Unlock prev. buffers in N+1th draw round.
Unlock previously locked overlay buffers 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.

Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>

Change-Id: I13d9c39e276918c3d3d27b2f07ed486b27b58441
2012-08-27 13:54:37 -07:00
Saurabh Shah
fc2acbe754 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.

Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>

Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
2012-08-27 13:53:40 -07:00
Saurabh Shah
94822ee87c liboverlay: Changes in getting FrameBufferInfo on MDSS.
- MSMFB_OVERLAY_GET does not need to be called.
- MDSS always supports border fill.

Acked-by: Sushil Chauhan <sushilchauhan@codeaurora.org>

Change-Id: I04afc5119b2467eb026b11b6f558cca21b5454c7
2012-08-23 13:31:30 -07:00
Saurabh Shah
e012f7ad30 liboverlay: Add support for MDSS Rotator.
Acked-by: Sushil Chauhan <sushilchauhan@codeaurora.org>

Change-Id: I60a2b0ce2b491d03b2b1a04966113e253b7f3dd8
2012-08-23 13:31:00 -07:00
Naseer Ahmed
59802500bc gralloc: Support camera and video encoder flags
- Set private flags for these formats so that the camera HAL
can differentiate between the allocated buffers.
- Usage flags define format

Change-Id: Ib3cfad12ab2ba79662207609138633769b1504e6
2012-08-23 09:43:54 -07:00
Jesse Hall
3be78d9816 Update for cleanups in hwc interface
Also store the hwc_procs_t* into a dedicated field instead of one of
the hwc_composer_device_1_t::reserved_procs slots, which are supposed
to be NULL so the structure can be extended without breaking backwards
binary compatibility.

Change-Id: I11e6bc713958d854aba418242caa749cbcb21f1d
2012-08-22 23:17:45 -07:00
Saurabh Shah
8e1ae95d9d liboverlay: ensure open fd's are always closed
Ensures that reset and  mFd.Close is always called when MdpCtrl
and MdpData are closed down.

Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Change-Id: I775ba7cfe45c67e6acf874e3f4e8b4fa6fbe33b8
2012-08-20 16:39:01 -07:00
Saurabh Shah
83523d8157 hwc: qbuf: Add API to unlock all
Add API to unlock all current and previous buffers.
This is essential in suspend cases.

Change-Id: I61c26db2e0e2b3e5e7f526a62a56424a8632f1d8
2012-08-20 16:38:16 -07:00
Saurabh Shah
b45b881fe6 hwcomposer : Disable bypass, when connected to external display
Change-Id: I3690e2145967e95a4a8c2fdb5ced34fef6eba639
Acked-by: Ravi Kumar Neti <c_rneti@qualcomm.com>
2012-08-20 16:37:13 -07:00
Saurabh Shah
a73738dc70 Overlay: Switch the flip for MDP, on 90 rotated source
Camera client doesn't factor in the 90-rotated source when setting the flip
Switch the flips when the source is 90-rotated.

Change-Id: Ia5f18afff4384a33b8ad2ca051be1a120aefa4d5
Acked-by: Kinjal Bhavsar <kbhavsar@codeaurora.org>
2012-08-20 16:35:40 -07:00
Sungmin Choi
5c5ca0ca17 disable led while charging
Fixes b/6970382

Change-Id: Idb823059424a0fa1f6382dc01d56c6c4f668c45c
2012-08-17 14:17:18 -07:00
samin.ryu
d57c7d55c9 led: add blink feature and remove specific values
Change-Id: I3a9ea70f972c2a12d584e557294ef8c47f7a3f12
2012-08-17 14:11:40 -07:00
Naseer Ahmed
fb4cbddd0b 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: I2407c44f6aa3b11365586364e5865ae629d5326a
2012-08-16 19:27:24 -07:00
Naseer Ahmed
934790c2fc hwc: Call blank ioctls
The blank ioctls were never called, we were relying on
the driver to implicitly do this on suspend/resume.
Fix this by calling blank with the right parameters.

Change-Id: Ib969c4e55d9f460255750f07aecefb04a310bd7a
2012-08-16 18:44:57 -07:00
Naseer Ahmed
51df92ad07 hwc: Calculate orientation based on framebuffer info
Change-Id: I6c2b6e2f6b5f701bea3b4e49a4e28c66f79a3f5a
2012-08-15 22:26:11 -07:00
Naseer Ahmed
c3f033cec4 Revert "hwc: Fallback to GPU for video playback usecase"
This reverts commit e217fbfb09.
2012-08-15 20:22:22 -07:00
Naseer Ahmed
9edd17cc64 hwc: Fix reserved field usage
Use the top 16 bits of reserved[3] for HDMI
and the bottom 16 for FPS. A follow up patch
in the MDP driver will get rid of reserved field
usage entirely.

Change-Id: Ic9f7a2f91b46b0dec830ea54784b7775009fbe48
2012-08-15 20:19:38 -07:00
Naseer Ahmed
5b6708ac87 hwc: Update to new API
* Updates HWC to use the Jellybean MR1 API
* Remove qcom_ui which was using parts of the old API

Change-Id: I663363547b193d2318aae88f2256a9baed1e3d4b
2012-08-14 14:18:23 -07:00
Naseer Ahmed
b90d091c75 display: Compile for mako, disable copybit route
Change-Id: I147b50dbedd9d52c715982f911be5c9ac0e267f1
2012-08-14 14:18:19 -07:00
Naseer Ahmed
45a9960377 libhwcomposer: Add C2D support to copybit
Change-Id: I2f2c915bb92d5c459428078149a9709356ae83f1
Acked-by:  Neti Ravi Kumar <ravineti@codeaurora.org>
2012-08-14 14:18:18 -07:00
Naseer Ahmed
31278ad52f 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: I862a120a6f36eb788f1e28d0f0650d924ff4f83a
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
2012-08-14 14:18:17 -07:00
Naseer Ahmed
1ddf366c26 liboverlay: Remove waitForVsync, getOvPipeType APIs
Remove waitForVsync support.
Vsync will be done explicitly by clients outside of overlay.

Remove support for the unused getOvPipeType API.
Remove redundant state checks in class Overlay

Change-Id: I8b35d7868bb46b0be755833dc8f28a158d3ff104
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2012-08-14 14:18:16 -07:00
Naseer Ahmed
af49e215a2 liboverlay: Update format translation.
Update format translation from HAL to MDP.
Add support for RGB_888, YCbCr_444_SP, YCrCb_444_SP formats.

Change-Id: Ic3f0ff96a8f587feaa82b5dd80fb52aa53199495
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2012-08-14 14:18:16 -07:00
Naseer Ahmed
69476312cb 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: I2d88fae76641b2f03dc5277f0f930b5d64561ec0
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2012-08-14 14:18:15 -07:00
Naseer Ahmed
c72e7dc6bf HDMI: Fallback to MM heap.
- IOMMU heap is not available for all targets. we should
  have a fallback heap always as IOMMU can be disabled.

Change-Id: I8fa265a50004550baccb0fe803c957529886ba0b
Acked-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2012-08-14 14:18:14 -07:00
Naseer Ahmed
4c588a200c hwc: Add support for external-only layers
Add support for different types of external-only layers
EXTERNAL_ONLY: General purpose
EXTERNAL_BLOCK: Blocks the display of other ext-only layers
EXTERNAL_CC: Used for closed captions with videos.

Change-Id: I9cc7b9a1dbf1085194725474d6a4d1094e27a0c8
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2012-08-14 14:18:13 -07:00
Naseer Ahmed
2cc53dd510 overlay: Refactor State Transitions.
Refactor transitions by templatizing to have default behavior for most cases
and full specializations for specific cases.
Partial specialization of functions is not allowed, so create templatized
intermediate functions for those use cases.
For ex: if we have 8 states, we don't need 8x8 transition handlers.

Add and define OV_DUAL_DISPLAY state.
Add a GenericPipe for subtitles to OV_2D_VIDEO_ON_PANEL_TV state.
Add a 2D_VIDEO_ON_TV state and its transitions.

Change-Id: I064cf813c43c3e3736800fbd465c6f1aa9b3a2d3
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2012-08-14 14:18:12 -07:00
Naseer Ahmed
96c4c95d48 display: Get panel type from framebuffer
Change-Id: I3b7cb78d7c6019482ae698b30d553ca782f5022b
2012-08-14 14:18:11 -07:00
Naseer Ahmed
7c958d445f display: Add support for MDP Composition
This change
   1) implements MDP Composition upto 3 layers
   2) adds invalidator support to fall back to FB
      composition during idle screen condition.

Change-Id: I55f27321fd0df096b353d66aaad1cc720cd4b84b
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2012-08-14 14:18:09 -07:00
Naseer Ahmed
f8ec162999 hwc: enable vsync for external display
- wait for hdmi vsync when connected to hdmi
- add commit to call PANDISPLAY for updating ext display
- add functions to close fb and reset info

Change-Id: I49afbeb85935b111055a872b29a1f65d87ab72c9
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
2012-08-14 14:18:07 -07:00
Naseer Ahmed
72cf9762f8 display: Enable vsync
* Use the vsync uevents from the kernel to start
surfaceflinger composition.
* This patch also does some code cleanup
    - Move copybit specific functions to copybit files.
    - Cleanup verbose logging.

Change-Id: I36936e4b0a082cfb0347d8ee7d2bc936e01808e6
2012-08-14 14:18:03 -07:00
Naseer Ahmed
31da0b1f44 display : Add support for copybit composition
This change add support for copybit composition in display HAL
for MDP3 targets.

Change-Id: I9bc8e40f624b0760f4faa223cb03a13695611bb3
Acked-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
2012-08-14 14:15:51 -07:00