Commit Graph

183 Commits

Author SHA1 Message Date
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
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
Saurabh Shah
3d4b8049b5 hwc: Combine FB program and source split adjust redundancy.
Combine the redundant code for FB programming and source split
adjustment into appropriate functions.

Change-Id: Ib99a2297a672e5ef40acb9f246021e57e41cd759
2013-12-12 11:08:36 -08:00
Prabhanjan Kandula
0ed2cc900f hwc : Fix cache based partial MDP composition.
Reset the updating layer count when new batch is started.
Else this will effect framebuffer z-order.

Change-Id: If746a5ea4b482cd7b55ba95007a3b8d7f1dc9b6e
CRs-fixed: 584021
2013-12-12 03:37:08 -08:00
Prabhanjan Kandula
21918db5d1 hwc : Add hw limitation checks for MDP compposition.
Add hw limitation checks for MDP composition once
we identify actual layers for MDP. This should be generic
way for all basic hw limitations of underlying MDP/MDSS.
Current limitations:
- a-family : MDP can not handle alpha scaling.
- 8226 & 8974 : Can not handle if multiple layers need
  downscaling and blending

Change-Id: Ia944802d798f2d0e9cd4515d7e9854c7314cac78
CRs-fixed: 538803
2013-12-11 15:41:38 +05:30
Saurabh Shah
c7e4f1d37c hwc: mdpcomp: Remove redundant function to program MDP
The programYUV used for video-only cases is the same as programMDP
function. Remove the redundant function

Change-Id: I1d891404a77b2a47f90c236d4d6dcbbd02143d93
2013-12-09 11:00:21 -08:00
Linux Build Service Account
813d679c84 Merge "hwc: Use GPU Composition for 8x26 virtual dpy scaling case" 2013-12-06 16:32:30 -08:00
Yang Xu
9c1eb2be21 hwc: Use GPU Composition for 8x26 virtual dpy scaling case
For 8x26, if there is only one layer which needs scale for
secondary display, while no scale for primary display, DMA
pipe is occupied by primary. If layer changed and need to
fall back to GLES composition, virtual display lacks DMA
pipe and error is reported.

To avoid this case, use GPU composition for virtual display
scaling case on 8x26.

Change-Id: I42297a18006517532e30d1a01c67ff8ca187482a
2013-12-05 13:55:19 +08:00
Linux Build Service Account
c258d31430 Merge "HWC: Use 2 VG pipes for YUV layer with width > 2048" 2013-12-04 19:31:07 -08:00
Linux Build Service Account
361de1d037 Merge "hwc: Bandwidth check upgrade." 2013-12-04 16:11:49 -08:00
Linux Build Service Account
bff954800a Merge "hwc: Check for downscale support only when needed" 2013-12-02 02:44:04 -08:00
Linux Build Service Account
3b689fb79c Merge "hwc/overlay: Add Color layer support in MDP Composition." 2013-12-02 02:43:48 -08:00