Commit Graph

45 Commits

Author SHA1 Message Date
Linux Build Service Account
db770e203f Merge "libhwcomposer: MDP composition for Higher Resolution panels" 2013-03-01 03:15:17 -08:00
Jeykumar Sankaran
b551ce4ed2 libhwcomposer: MDP composition for Higher Resolution panels
This patch:
       -Implements MDP composition for higher resolution
        panels of width more than 2k.
       -Adds DMA pipe support for high res. MDP composition

Change-Id: Ib7b1f822e3600eca81521294fedfe05e948b65c3
2013-02-26 16:19:58 -08:00
Saurabh Shah
747af1e9e1 hwc: Close acquireFenceFds always.
Close acquireFenceFds always even in case of failures if a layer is either
OVERLAY or FRAMEBUFFER_TARGET to prevent leaks in case of failures.
The framework is *not* responsible for closing acquire fds, for layers
marked as above two.

Change-Id: Ia6c751d3ec25f196f5503120894fc6cc692b9d25
2013-02-26 16:06:07 -08:00
Amara Venkata Mastan Manoj Kumar
11a380df08 hwc: Allow HWC to support Virtual Display
This change allows virtual display to be composed
  by HWC for supporting Google WFD App + QCOM WFD stack.

Change-Id: If8892230256e72fa34e3fb5ae715c3ad8cbd5b64
2013-02-22 17:55:39 -08:00
Saurabh Shah
86c1729e75 libqservice: Add a client interface.
Add a client interface which interfaces with hwc.
qservice upon receiving IPC, provides a callback notification to the qclient
which does appropriate stuff in hwc.

In future, qservice can safely be even made a separate process with no changes
to exisiting code. This was not true earlier owing to the hwc pointer held by
qservice forcing it to be in the same process that hwc is in.

CRs-fixed: 452977
Change-Id: I05838c213f5d4606a6573693de1bacbc5876107e
2013-02-14 17:27:55 -08:00
Arun Kumar K.R
feb2d8afc9 display: Add support for overscan compensation for ext display
- Read scan_info sys file node to check if TV underscans
- Apply action safe parameters to avoid overscan on ext display
- Store action safe width and height ratio using system  property
- Use these to calculate the destination position on the ext display
- Remove unsed ActionSafe Class

Change-Id: Id27e6fa20966fb13fc16aa7e237cacce8caeb642
CRs-fixed: 447367
2013-02-05 12:10:16 -08:00
Jeykumar Sankaran
cf53700d9f libhwcomposer: Allow 2 YUV layer frames to use MDP composition
This change introduces the following changes:
- Frames having 2 yuv layer can be bypassed
- if not handled by MDP comp, video path will not
  handle any such frames and will be FB rendered

Change-Id: Id211dbc185608c482badbca00a2708fa6138a8e5
2013-01-29 13:37:55 -08:00
Sushil Chauhan
2515abfe7c hwcomposer: In Mdss,secure content policy applies to layer buffer
In Mdss, mSecureMode is never set, instead the secure content flag
has been set/unset on each layer buffer.

Change-Id: I3283533c11206e189ce70dbc84776b2cff3a909d
2013-01-15 16:51:24 -08:00
Arun Kumar K.R
361da4fde0 hwc: Add support for copybit(C2D) composition
- Add CopybitEngine to hwc_context
- draw the layer on the HWC_FRAMEBUFFER_TARGET using
  copybit(c2d) if it qualifies for C2D composition.
- use fence returned from the copybit during c2d
  composition

Change-Id: I052da015cd031f7abd6411d83d7944c335caeff7
2013-01-10 12:29:10 -08:00
Linux Build Service Account
a41a79d598 Merge "hwc: Delay HDMI/WFD connection request by one frame" 2013-01-04 03:16:43 -08:00
Amara Venkata Mastan Manoj Kumar
75526f5941 hwc: Delay HDMI/WFD connection request by one frame
This change introduces hdmi pending state, where we allow
  frames to fall back to FB, closing all MDP pipes.

  Pipes could be used by primary (mixer 0) in which case moving
  them to external (mixer 1) involves unsetting them and setting
  them in the same round which is not recommended by the driver.
  It will fall back to GPU till HDMI is configured on a connect
  event.

  CRs-Fixed: 430057

Change-Id: I4b6677883c499f6d15656c3578190be1115ee6b4
2013-01-02 23:22:36 -08:00
Saurabh Shah
cbf7ccc4b6 hwc: mdpcomp: Restructure for 4kx2k displays
Restructure MDPComp class for 4kx2k displays.
Cleanup MDPComp class to remove unused stuff and formatting.
Add a MDPCompLowRes class for current functionality.
Add a hollow MDPCompHighRes class for future.

Change-Id: I343540e712d31ca907257a73b49567578f49d5f7
2012-12-28 17:59:19 -08:00
Saurabh Shah
cf053c6eda hwc: Support 4kx2k FB for Primary and External.
Add support for 4kx2k FB for primary and external panels.
Change class design to create appropriate version of FBUpdate on boot up based
on the panel resolution.

Change-Id: I216d815d9b81c610aa39e351f7b55736dfa48b43
2012-12-20 15:15:41 -08:00
Naseer Ahmed
e78f052ce5 hwc: User Layercache for external display
Change-Id: Ibca92e1470ef72dc02d16d4ef8c05f1a1d2d485c
2012-12-12 23:01:59 -05:00
Naseer Ahmed
1d183f59f5 hwc: Implement dump function
Does a basic implementation of the dump function
called by SurfaceFlinger in dumpsys.
Further logs in different areas can be added later on
using the dumpsys_log utility.

Change-Id: I2194b4ed7f10947272b7b824ef802ce2ee3c8a48
2012-12-05 14:25:42 -05:00
Naseer Ahmed
018e54569f hwc: Avoid MDP composition with alpha scaling
MDP4 supports scaling with alpha, only in RGB pipes.
In some cases this scaling happened with video pipes.
We now fall back to GLES composition for layers that have
alpha and need scaling.

Change-Id: I084355bad1cdb17c7308077b56006c59e75d2042
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Bug: 7648647
2012-12-03 15:36:21 -05:00
Naseer Ahmed
54821fe3a2 libhwcomposer: Add support for 4 layer MDP Comp
This change extends MDP composition to support
upto 4 layers by making border fill as base pipe and
using all MDP h/w pipes in overlay mode.

Conflicts:

	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_utils.cpp
	libhwcomposer/hwc_utils.h

Bug: 7626586
Change-Id: I01a0e53ddfbcf3ed46734f6f3bb0ef7d912ceac6
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:34:07 -05:00
Naseer Ahmed
758bfc5b50 hwc/overlay: Dynamic pipe tracking.
Remove state based pipe handling and make pipes tracked dynamically.
Add the configStart, configDone, nextPipe availablePipes APIs.
Remove setState API.

-configStart marks all pipes available.
-configDone garbage-collects unused pipe objects.
-nextPipe returns the index of next available pipe and create a corresponding
pipe object if not present
-availablePipes returns total of "unallocated" pipes. (Pipes could be allocated
but unused)

Changes in hwc adapt to the new overlay APIs.
Compile out MDP comp.
Remove unused files in overlay and hwc.
Update licenses.

Conflicts:

	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_utils.cpp

Bug: 7626586
Change-Id: Id8e56901d34e5dc0fd088260d05e3e46f68ff090
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:33:29 -05:00
Naseer Ahmed
b1c7632ec5 hwc: cache layers on framebuffer
In the cases where all the layers that are marked as HWC_FRAMEBUFFER did not
change, we can mark them as HWC_OVERLAY since their contents are already on the
framebuffer and do not need any additional processing.

This optimization shows power improvement for video playback.

Bug: 7623741
Change-Id: Ia178a926e6f56a3ec9291250a22a66f212c30b14
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:32:29 -05:00
Saurabh Shah
1a8cda0b2c hwc: clean up overlay for external from the draw thread only
Cleanup overlay for external from the draw thread. If done from the uevent
thread, its possible that the object being used by draw thread is deleted by
uevent thread.

This also removes unnecessary side-effects where libexternal sets states in
hwc, whereas, it could be set from hwc itself. There should be no need for
libexternal to modify states in hwc.

Bug: 7335863 (partial fix)
Change-Id: If07483e640abae2ced2418e0d5c8f278f8c6ec33
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-15 12:02:33 -07:00
Kinjal Bhavsar
f83d4480f2 HWC: Protect hwc_set from async events
Wait for hwc_set completion if already in progress before processing
the async events.

Bug: 7288769
Change-Id: Ibdd0ee82f079df566b899c94df19f6bb1031d686
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-12 16:15:31 -07:00
Saurabh Shah
27c1d65113 hwc: utils: Include orientation while screen-fitting.
MDP doesn't like out-of-screen-bounds parameters. So based on the position of
the layer, we adjust the portion of layer the MDP should pick.

However, this did not factor in orientation, so far. This patch does that and
allows panning to work in other orientations, without having to use GPU.

Bug: 7313955
Change-Id: Ice17ad144abcd60279c2ef9ad87fc617a1bd3621
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-10 23:04:28 -07:00
Saurabh Shah
150806ae0e hwc: fix for not ignoring framebuffer
If the FB is not used, because all the app layers are overlays, then set the
flag to have the driver not fetch from the FB pipe.

Bug: 7183992
Change-Id: I96ecc1610ac052e8512158d189b0614ecf82d139
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-09 18:22:04 -07:00
Saurabh Shah
e4f3f721b5 hwc: external: Cleanup overlay objects on external disconnect.
Cleanup overlay objects and close fds when external is disconnected.  Without
this, the external does not come on when cable connected-disconnected multiple
times when device is in suspended state.

Bug: 7150885 (part of the fix)
Bug: 7295979
Bug: 7150885 (partial)
Change-Id: I1ae2ce7220b9928dde332ce3644dbe671d25c7e6
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-08 14:08:58 -07:00
Saurabh Shah
c4d034f4b8 hwc: enable dual display on hwc 1.1
Enable dual display on HWC 1.1; video uses overlay.

Bug: 7124159
Change-Id: I8333e46cfc74072f6259fba2b82368f0dd52b6df
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-02 23:46:58 -07:00
Naseer Ahmed
ff4f0254be hwcomposer : Use sysfs to read vysnc information
* Read sysfs entries to get vsync timestamp from kernel.
* External display continues to use uevents for hotplug events
* 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.
* Synchronization is needed to make sure read() is not called
by hwcVsyncThread when VSYNC is disabled.

Change-Id: Iab0a94a3cfce9142b8867859f2a7d9bcaecb0996
Acked-by:  Neti Ravi Kumar <ravineti@codeaurora.org>
2012-10-02 16:54:14 -07:00
Naseer Ahmed
32ff225e6d hwc: Make blank wait for set to complete
Bug: 7217641
Change-Id: Ie25c9caa7a4c6a256c0f35fc40cbae2ef4572f5d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-01 22:24:41 -07:00
Naseer Ahmed
7b80d9c8cb hwc: Fix dpi values reported
HWC 1.1 expects DPI multiplied by 1000

Bug 7241591

Change-Id: I680da8769f53f8a18d942a3b292d96a16885ebfa
2012-09-26 17:43:38 -07:00
Saurabh Shah
3e858ebde3 hwc: hwc 1.1 implementation
Bug: 7124159

--External disabled
--MDP comp coded but disabled.
--Videos via overlay, so that secure videos can work.

Change-Id: Ie48b264143d5e4237ab9724e28930e3f68ba49ee
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-09-25 22:51:14 -07:00
Kinjal Bhavsar
2dd04a873b hwc: sync-point implementation.
Add sync pt implementation.
Add genlock and sync pt under conditional compilation flags.

Change-Id: I32fb7f6051ccc706662152e90ac15b6b6743f897
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-09-21 17:18:44 -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
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
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
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
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
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
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
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
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
Naseer Ahmed
0c8b7b5c84 hwcomposer: Add support for UI mirroring
- Uevent observer as part of Hwcomposer
- HPD, enabling/disabling external display from HWC

Change-Id: I52b4f30c78e98c5b52c86722046389f458c2dbee
2012-07-23 12:38:12 -07:00
Naseer Ahmed
f48aef64b2 liboverlay: Refactor, bug-fixes, upgrade.
* Fix memory leak during copying pipe objects.
* Remove unused / unnecessary code.
* setMemoryId API is merged with queueBuffer.
* setParameter API is setTransform now.
* Rotator upgraded to:
  --Allow different rotator hardware types.
  --Remove dependency on MDP code.
  --Allocate memory only during first playback,
  close when the associated pipe is closed.
* Have single commit implementation.
* Include new format types.
* Remove WAIT and CHANNEL enums and usage. Replace BypassPipe with
  GenericPipe. Client expected to set alignments and parameters.
  Add transform combination enums.
* Allow APIs to be called in any order. Do transform calcs in commit.
  Move ext type setter and getter functions.
* Add calculations for 180 transform.
* Add secure session support in rotator
* Implement all rotations in terms of H flip, V flip and 90 rotation.

Change-Id: I34a9a2a0f1255b3467a0abbaa254d0b584e901ce
2012-07-23 12:36:44 -07:00
Naseer Ahmed
a87da60090 display: Add QC Display utils
* Rename qcomui directory to qdutils
* Avoid inclusion of qcom_ui header
* Add class to get MDP version
* Add namespace for qdutils to prevent collison

Change-Id: I9a3f440e6b0fea1cfcc478ddca90af5df3bbb897
2012-07-13 17:50:32 -07:00
Naseer Ahmed
29a26818d7 qcom/display: Update HALs
- Update the display HAL from Code Aurora Forum
- Add updated overlay library
- Enable HWC with basic video going through overlay
- Cleanup some files

Change-Id: I65c687c51be458cee71213c79e03eeda962d9086
2012-06-21 11:52:07 -07:00