Commit Graph

167 Commits

Author SHA1 Message Date
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
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
Saurabh Shah
f5f2b137bc hwc: Bandwidth check upgrade.
Use the low and high bandwidth values exported from driver per target
Use the low bandwidth value when the system has at least 1 video
mode panel, else use the high bandwidth value.
Newer targets could have bandwidth exceeding what an uint32 could
hold, so change the bytes read to be in gigs.
Do not use the framebuffer handle to get size, since the handle may
be null.

Change-Id: If3124ddc33334eba80d34ab7d8fc64d1b46697ce
2013-12-01 18:43:58 -08:00
Jeykumar Sankaran
1706a77364 hwc: Check for downscale support only when needed
Check for downscale support only for layers which needs to
be downscaled. Fixes issue where we bail out for all layers having
width more than MAX_LAYER_WIDTH even when they don't need scaling.

Change-Id: I19ee4d69e986390ed3df122b8ca9c0e102f3f916
2013-11-27 12:55:19 -08:00
radhakrishna
c9a6741e15 HWC: Use 2 VG pipes for YUV layer with width > 2048
To minimize usage of decimation when 4K x 2K video is played
on primary, split the yuv layer into 2 halves and configure
each layer to individual VG pipes. With this approach,
decimation can be avoided in some 4K x 2K video use cases,
thereby improving performance.

Change-Id: I7cddfab787c50f6ff132eaa7f5a3d9cfd636c282
2013-11-27 18:35:24 +05:30
Saurabh Shah
b772ae381d hwc: Add GPU-preferred and MDP-preferred modes to load based comp.
GPU's perf is proportional to the number of pixels it processes, so
the load based strategy that prefers GPU, attempts to load it less
in terms of pixels, and at the same time makes sure the MDP has
enough pipes and mixer stages.

MDP's perf is real time and proportional to the instantaneous b/w
which is a function of overlaps. So the load based strategy that
prefers MDP would look at sending only as many full-screen layers
that MDP could support.
This mode is used when the GPU-preferred mode fails.

Change-Id: I3221a94bb01c43112370c248cd4ab217f2bd8ed1
2013-11-22 13:50:45 -08:00
Saurabh Shah
3c1a6b0a16 hwc: Replace bytes claimed with bandwidth claimed.
Bytes claimed doesn't reflect the panel refresh rate.
So use the bandwidth claimed instead which factors this in.

This is important when 2 displays are running at different
refresh rates.

Change-Id: I3ab9573e43b8c25c31e01888fb2b181469b9e91b
2013-11-22 11:10:20 -08:00
Linux Build Service Account
7f2d2e9673 Merge "hwc: Move resource checks to a common function." 2013-11-21 13:55:53 -08:00
Sushil Chauhan
897a9c3ff9 hwc/overlay: Add Color layer support in MDP Composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
   denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
   is passed via the "tranform" member from framework to HAL.

Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
2013-11-20 17:04:29 -08:00
Linux Build Service Account
15eeacdcd6 Merge "hwc: Refresh framebuffer when an updating layer is marked for GPU" 2013-11-20 15:29:52 -08:00
Saurabh Shah
173f424d32 hwc: Move resource checks to a common function.
Move resource checks, pipes, stages of mixer, bandwidth to a common
function and use it from all strategies.

Change-Id: I161fc957e2793d543b5943fbd23ae3607a4cfc87
2013-11-20 10:11:12 -08:00
Saurabh Shah
d9ff30b3a5 hwc: Trim out of screen layers once only
Instead of trimming out of screen layer dimensions for various
operations repetitively, trim and store.
Will also prevent accidentally missing out on trimming.

Change-Id: I8800586070ec433aa1fcbb3aad73ec29c9c9111e
2013-11-20 09:27:49 -08:00
Linux Build Service Account
1c8bdc9009 Merge "hwc: Optimize layer drops based on ROI" 2013-11-20 01:01:05 -08:00
Linux Build Service Account
2f1421fb07 Merge "hwc: Change error messages to informative messages in HWC" 2013-11-19 22:04:32 -08:00
Arpita Banerjee
d8965989ec hwc: Change error messages to informative messages in HWC
Few error messages in HWComposer change to as informative
messages.

Change-Id: Iecd2d6c129713363d338ca7aeefbcbc422df893d
2013-11-15 18:49:08 -08:00
Jeykumar Sankaran
988d368b64 hwc: Refresh framebuffer when an updating layer is marked for GPU
When MDP cannot handle an updating layer and we marked it for GPU,
make sure framebuffer is refreshed for that frame. In the current design,
only video layers fall into these catches. But we may need
this change for future composition strategies.

Change-Id: I1d6a92da13feef4b353fa5e196d42f91148412e5
CRs-Fixed: 575340
2013-11-15 15:39:14 -08:00
Jeykumar Sankaran
862d87c4e6 hwc: Optimize layer drops based on ROI
- Iterate layer list to drop layers from composition that
are not going to be visible inside the updating ROI.
 - No ROI when skip layers are present.
 - Reset dropped layer info on full GPU fallback.

Change-Id: Ib544526a8c28ffdd16b5be12f73d57d10d207c39
2013-11-14 15:03:58 -08:00
Jeykumar Sankaran
f42f0d80a4 hwc: Add error check for secure layer handling
When we try MDP composition only for secure layers, bail out if
secure layers are not present. Otherwise partial MDP composition
succeeds with all layers marked for FRAMEBUFFER.

Change-Id: I3f968835951320bb6c5873ba77fedef8a359b7bf
2013-11-14 15:03:55 -08:00