Commit Graph

193 Commits

Author SHA1 Message Date
Saurabh Shah
c62f39861a overlay: Support for returning pipe based on capability
Add support for returning pipes based on capabilities.
getPipe() API takes in pipe specifications like format class,
scaling, display, mixer, fb and decides what pipe to return.
The nextPipe() API is now just a private helper.

Change-Id: I0ab809662c0ad6297e19a44f39264ee929944d13
2014-04-14 10:17:11 -07:00
Linux Build Service Account
c4f9b0b623 Merge "hwc: Add rotator obj to layer-rot-map if acquired" 2014-04-04 17:33:33 -07:00
Linux Build Service Account
40af717d8f Merge "HWC: Minor fix in 4k2kYUVsplit feature" 2014-04-03 21:54:27 -07:00
Saurabh Shah
dd8237acd1 hwc/overlay: Add support for pipe priorities, 1 pipe config for FB
If using source split to stage 2 pipes on the same mixer stage,
the left pipe needs to be a higher priority than the right.

Add API in overlay to compare pipe priorities and use this in
source split config to stage pipes accordingly.

Add support for 1 pipe config for FB if updating rect is within 2048
pixels.

Change-Id: I8b33d5ebd0f8765ee842bab128d8abd67a110145
2014-04-02 13:22:53 -07:00
Dileep Kumar Reddi
4cff928d01 HWC: Minor fix in 4k2kYUVsplit feature
Increment fbZ when 4k2kyuvindex matches with fbZ,
otherwise we see momentary flicker as right half of
4k2k YUV layer and fb layer have same z-order.

Change-Id: Ia900e102b6d4670b9bfdfd4e52ef360d1d813cab
2014-04-01 13:10:20 +05:30
Saurabh Shah
39240c9124 hwc: Add rotator obj to layer-rot-map if acquired
Add rotator obj to the layer-rot-map soon after its successfully
acquired. This makes sure that any object allocated is accounted
for, irrespective of whether rotator configuration succeeds or not.

Change-Id: I94102d9c607cf61b2eccdf7f2445bb07d309d35c
2014-03-31 10:31:42 -07:00
Linux Build Service Account
d36d04a2dc Merge "hwc: Use proper typecasts" 2014-03-28 23:49:57 -07:00
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30
Linux Build Service Account
0bee628a02 Merge "hwc: Color layer always has zero transform." 2014-03-27 18:11:08 -07:00
Sushil Chauhan
fda00fc87f hwc: Color layer always has zero transform.
Color layer always has zero transform because framework uses the
transform member of hwc layer to pass the color value to HAL.

Change-Id: I79fe204c558d1b6e1dd69ba635ba0bd87140b1b1
2014-03-20 11:20:52 -07:00
radhakrishna
2e792f9884 h/q/d: Add utility function for 8x16 and read RGB scalar capability
- Add utility function for 8x16
 - Add internal function to identify if RGB doesn't
   support scaling that is read from capabilities node.
 - If UI layer needs scaling and RGB pipe doesn't
   support scalar, request a VG pipe
 - On 8x16, request DMA pipe for WFD

Change-Id: I94e8e0371bb10fcad53fddd2b7c45bc9b2594a4d
2014-03-17 12:56:16 +05:30
Manoj Kumar AVM
8cbbf7cb13 hqd: Restrict decimation when layer format is macro-tile
When layer format is macro-tile, decimation cannot be supported.
Add necessary checks to bail out for such use-case.

Change-Id: I711f07a2963a76280a08887d04770cd418d8bd1e
2014-03-14 09:33:53 -07:00
Saurabh Shah
ab47c69049 hwc: Add support for SourceSplit
Add support for SourceSplit. The mixers are abstracted from hwc.
There would be no translations to mixer understood destinations.

1) If a layer's crop and position are < 2048, only 1 pipe can be used
irrespective of position.
2) Else 2 pipes can be used with the layer equally split, without
regard to position.

Change-Id: I501a53838d147887c1e2299366663e05320d5096
2014-03-03 09:57:12 -08:00
Saurabh Shah
be7bd32a4d hwc: Iterative Load based comp
While performing load based mixed composition, iterate from max
stages of mixer to at least 2.
Get rid of modes that preferred GPU or MDP. This new mode will
include both plus the missed out batches.

Change-Id: Ideb06a2332fe2f59968367d28df848be01f4aedc
2014-02-26 22:48:52 -08:00
Linux Build Service Account
c6f2145cde Merge "qdutils: Refactor idletimeout fallback mechanism." 2014-02-26 06:54:48 -08:00
Linux Build Service Account
d9b4758163 Merge "h/q/d: Optimize framebuffer layer update" 2014-02-22 14:50:47 -08:00
Linux Build Service Account
fda5641781 Merge "h/q/d: Rename property to enable partial update" 2014-02-22 14:50:37 -08:00
Saurabh Shah
0cba653ad7 hwc: Remove bandwidth checks
Bandwidth checks will be done in the driver as part of resource check
which makes the existing checks in hwc redundant.

Change-Id: I39eb7de63618e8ea5981f9e1a1159224831f314a
2014-02-20 16:25:22 -08:00
Jeykumar Sankaran
c2d78d8f2c h/q/d: Optimize framebuffer layer update
While doing mixed mode composition, update only the region of the
framebuffer where layer contents are cached or updated. Avoids
MDP fetch for non-visible contents of FB.

Change-Id: I20997d79e02a6bac60d7333c28c6dde134263197
2014-02-20 10:19:53 -08:00
Ramkumar Radhakrishnan
92abb4f2ad qdutils: Refactor idletimeout fallback mechanism.
1. Use kernel timer interrupt to signal about the timeout to
   Invalidator thread and fallback to GPU composition.
2. This implementation avoids waking up the Invalidator thread for
   every idletimeout value during continuous update.

Change-Id: I4370f10a0ca06b5cb1e7bdcb047e9c8daec51afb
2014-02-19 14:28:59 -08:00
Jeykumar Sankaran
7d6c4c0dd1 h/q/d: Rename property to enable partial update
Rename property to enable partial update to keep within MAX
string length.

Change-Id: I16d09b49500f3cd996c66eb52aa80df3a5f62b27
2014-02-19 12:50:04 -08:00
Linux Build Service Account
8e6c7bc4b9 Merge "Invoke a padding round in certain use-cases." 2014-02-11 23:48:44 -08:00
Linux Build Service Account
ec6bd69a1c Merge "hwc: mdpcomp: Remove pipe estimation blocks" 2014-02-11 05:20:35 -08:00
Linux Build Service Account
489d6554b5 Merge "hwc: Reset FB Z order to -1 instead of 0" 2014-02-09 19:08:38 -08:00
Saurabh Shah
4cc7423384 hwc: mdpcomp: Remove pipe estimation blocks
Pipe estimation was necessary when the unavailability from overlay
led to GPU fallback.
With the new design, hwc uses the next best strategy, so failure
to grab a pipe from overlay is ok.

Change-Id: Id20d2e6fd24aeb5af3ab84ec9dd8c52f6bbbef8b
2014-02-07 16:09:55 -08:00
Raj Kamal
9ed3d6b35e Invoke a padding round in certain use-cases.
* In some use-cases, it is possible that there are
no AppBuffer layers on the external/virtual layer-list
during which all the pipes will be allocated to the
primary. When layers do comeup on external/virtual
layer-list, subsequent overlay sets fail.

* This change ensures that in such cases, we invoke a
padding round on all the displays to free up the
hw resources which can be used in subsequent cycles.

Change-Id: Ifac0b8f51a8719eb55b11010d05b8d11352db054
2014-02-07 16:20:10 +05:30
Linux Build Service Account
67b60bee6d Merge "hwc/overlay: validate and prepare frame" 2014-02-05 14:02:39 -08:00
Saurabh Shah
d53bc5f899 hwc: Reset FB Z order to -1 instead of 0
In Video-only mode FB Z-order of 0 was being used, incorrectly,
because the value was reset to 0 and wasn't changed subsequently.

Reset to -1 to prevent this. Any MDP comp strategy that needs to use
FB should set it's Z order appropriately.

If cache based mode has no MDP comp layers, fail so that other
strategies can be used, rather than succeeding with FB Z as 0, which
will at most allow GPU comp to be used.

Change-Id: Ifdae2cd5f8d8ff0e10447b1fed6ee1671260f311
2014-02-05 11:59:38 -08:00
Saurabh Shah
a36be92d30 hwc/overlay: validate and prepare frame
Send the entire frame (array of overlays) to driver, so that it would
check pipes params and the whole frame wrt bandwidth and SMP.

Now, the overlay's commit API just prepares an overlay object but
makes no ioctl calls.

If the driver finds the frame, as a whole, to be not ok, the
validation fails and overlay/hwc return silently.

If a certain overlay object is mis-configured or pipes are
unavailable, the driver sets the number of objects it processed.
Overlay uses this to dump the incorrect config.

Change-Id: Ifb2b7fadc6bd6d9d94a35ba3908fbd832f41447f
2014-02-03 12:58:46 -08:00
Arun Kumar K.R
2aa44c66fa hwc: resolve compiler warnings
- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
2014-02-03 09:20:36 -08:00
Linux Build Service Account
a6fe50e686 Merge "hwc: Request RGB pipe only if layer needs scaling." 2014-02-02 23:05:35 -08:00
Jeykumar Sankaran
846e279b5f h/q/d: Consider dropped layers in load based MDP comp
While batching up layers for load based MDP composition, filter
out dropped layers.

CRs-Fixed: 607196

Change-Id: I78031f1094330e1d960ceb56d5441c27a041e48c
2014-01-31 10:33:56 -08:00
Jeykumar Sankaran
0b96145181 h/q/d: Drop layers from composition on NULL ROI.
While optimizing layer list for composition, drop the layers
blindly on encountering NULL ROI.

CRs-Fixed: 605482

Change-Id: Ib81f43e8f34d140e6222135f3caa9491cdbbd41e
2014-01-29 10:57:42 -08:00
Linux Build Service Account
a30f986ac6 Merge "qdutils: idle_invalidator: Use fixed timeout rather than range" 2014-01-28 23:35:43 -08:00
Linux Build Service Account
40524ac29a Merge "hwc: disable MDP composition on Secondary display" 2014-01-26 22:59:26 -08:00
Linux Build Service Account
99c968ec87 Merge "hwc: Common Display HAL to support VDS & V4L2 WFD solutions" 2014-01-26 22:59:21 -08:00
Linux Build Service Account
826f7ac2a4 Merge "h/q/d: Consider dropped layers while calculating FB z-order" 2014-01-26 05:19:29 -08:00
Saurabh Shah
b2117fec56 qdutils: idle_invalidator: Use fixed timeout rather than range
Currently the idle timeout is in a range from idle_timeout / 2
to idle_timeout, since we didn't need precise values.

Change this to a fixed value using timestamps, because the timeout
is too low and warrants precision.

Change-Id: I9cec1db7f1d7fda2996ab80449c61269915f6be4
2014-01-24 13:35:48 -08:00
Prabhanjan Kandula
47191dcb8b hwc: Request RGB pipe only if layer needs scaling.
For high FB resolutions do not specify required
pipe type unless a specific pipe is needed. This
makes RGB pipe available for FB in GPU fallback
scenarios because of SMP failures.

Change-Id: Ib52029aa276b5736d46a48489d280e7f65de2eab
2014-01-22 23:01:45 +05:30
Ramkumar Radhakrishnan
8bb48d3314 hwc: Common Display HAL to support VDS & V4L2 WFD solutions
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
   property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.

Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa
2014-01-21 18:41:04 -08:00
Arun Kumar K.R
2e2871c32a hwc: disable MDP composition on Secondary display
- Do not use MDP composition on secondary disp when the primary
  is a high resolution panel.
- MDP would use decimation on secondary and on fall back it uses
  GPU, which could lead to quality mismatch

Change-Id: I4c92df89563de6c8387eaaaa5f450ad7cc09b647
2014-01-21 16:41:46 -08:00
Jeykumar Sankaran
9502f3554a h/q/d: Consider dropped layers while calculating FB z-order
While batching in partial mdp composition, calculate FB batch
z-order after dropping the z-order of dropped layers lying below.

Change-Id: I92752f67e797a834aae6a575af2f8fa42c9c0911
CRs-Fixed: 601614
2014-01-20 23:00:30 -08:00
Jeykumar Sankaran
6cd8e7e68a h/q/d: Check for MDP upscale limitations
- Expose API to get maximum upscale value supported by MDP
- Check for MDP limitation before programming pipes

Change-Id: Id9faac54a7b3e393b6c4b60574e5e985b495bf59
2014-01-13 19:08:39 -08:00
Ramkumar Radhakrishnan
4af1ef0935 hwc: Disable MDPComp for external UI layers if scaling is present.
Fallback to GPU composition for the external UI layers if Actionsafe
or WFD/HDMI downscale mode is enabled that requires scaling.

Change-Id: Ie03da35e1c2e78434de00f92ad6c2e5073fc33b8
2014-01-06 12:20:03 -08:00
Prabhanjan Kandula
3dbbd8853a hwc: Skip load based composition for video playback.
DMA setting cannot be estimated ahead of time,
so do not do load based compostion where videos
can fall to GPU.

Change-Id: I01ccc26044df6bced428bd164f5c50f87aff99fd
2013-12-20 23:59:53 +05:30
Saurabh Shah
df4741dba4 hwc: mdpcomp: Use other compositions if programming MDP fails
Currently, if programming MDP fails from a certain composition
strategy we fall back to GPU. This change, redesigns so that
composition types can have a chain of fall back strategies if
programming MDP fails. This happens currently only if resource
checks fail.

Change-Id: Ia7fb71788e595e59a91e95b1fb4eac3faea9451e
2013-12-19 12:00:25 -08:00
Linux Build Service Account
c25d39f9e9 Merge "hwc: Refactor disable animation on external" 2013-12-17 18:25:23 -08:00
Saurabh Shah
f2de00f07c hwc: Use mixed mode comp. strategies as fallback for each other
If there is a GEOMETRY change try the load based compositions first
and then cache based. Vice versa otherwise.

Change-Id: Ie7ce6017e867f47e975487a72fba81f5d94eb9e3
2013-12-16 10:40:16 -08:00
Saurabh Shah
7a606847a6 hwc: Update rotator object handling in error cases
Earlier, on configuration errors, we simply drained the fences held
by current rotator objects and went to GPU comp. The rotator objects
were deleted in the subsequent rounds, if they remained unused.

If we don't use GPU comp on failure but use other strategies, then we
need to mark the rotator objects for a display for reuse, so that
other strategies can use them.

Also any failure resets on overlay or rotator need to happen from
functions that call configuration helpers rather than the helper
themselves. Leaving cleanup to black-box helpers is not desirable.

Change-Id: I59b5b1bb774b82ee85a037e934c9d2d023db30af
2013-12-13 11:49:55 -08:00
Ramkumar Radhakrishnan
a70981abfa hwc: Refactor disable animation on external
Fall back to GPU for one cycle at the start of animation and display
the frame buffer for the subsequent cycle till animation ends.

Change-Id: I6c651cebaf4694f326d6e32ae485e014f391577c
2013-12-12 14:42:14 -08:00