Commit Graph

67 Commits

Author SHA1 Message Date
Saurabh Shah
d4e6585258 hwc: 8x26: Composition policy when WFD connected
When WFD is connected to 8x26
1) On Video transition, have 1 padding round if external connected.
Required to shift pipes across mixers.
2) Request DMA pipe always for FB on WFD.
Necessary for rotation + writeback
3) Disable non-worm-hole calcs on external (because of 2)
4) Disable action-safe calcs on external (because of 2)

Change-Id: I63b50b2477db443f9ea1d3fa610b59295c9359b7
2013-06-20 19:33:49 -07:00
Linux Build Service Account
3723996096 Merge "hwc: Move max app layer check outside isFrameDoable routine." 2013-06-17 12:59:13 -07:00
Saurabh Shah
e8e7627ae9 hwc: Don't use yuv count for fb Z order.
In video-only cases, don't use yuv count for fb Z order, instead use
the mdp count which indicates how many video layers are actually
being sent to overlays.

Change-Id: I53ab4316fbb17f5d054066ef2dd85d89183d6a8c
2013-06-13 10:16:03 -07:00
Linux Build Service Account
b9ebe5ad90 Merge "hwcomposer: Add adb property to disable Mixed Mode" 2013-06-10 14:39:02 -07:00
Linux Build Service Account
c52e8602d6 Merge "hwc: Fix MDP comp array index access" 2013-06-09 17:49:28 -07:00
Jeykumar Sankaran
24c199de2d hwcomposer: Add adb property to disable Mixed Mode
This change adds adb property support to disable mixed mode in
MDP Comp. Will be helpful in debugging issues to narrow down the
root cause.

Change-Id: I49b737bb8755dc3a35db2e1ea8ccb2043135d2b0
2013-06-08 10:52:04 -07:00
Ramkumar Radhakrishnan
c5893f1716 hwc: Move max app layer check outside isFrameDoable routine.
Move the condition for checking maximum number of app layers
ourside the isFrameDoable function to avoid heap corruption while
updating hnd array in cacheAll function.

Change-Id: Id4458fcadc7775a2d78b1849de6782857c6ac17f
2013-06-06 19:43:53 -07:00
Saurabh Shah
0d65dbe9b0 hwc: Fix MDP comp array index access
Fix MDP comp array index access in case of High Res pipe allocation.
This is already correct in case of Low Res allocation routine.

Change-Id: I7eaa0711ef8998ea03edba18b74db80459daf4c7
2013-06-06 18:33:16 -07:00
Ramkumar Radhakrishnan
e661f9677d hwc: Fix to avoid heap corruption
- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
  MAX_NUM_APP_LAYERS to avoid heap corruption.

Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
2013-06-05 18:41:47 -07:00
Saurabh Shah
8a11793ad1 hwc: In scaling check, consider out of bounds layers.
In scaling check, consider out of bounds layers, apply trim
and then decide if scaling is necessary or not.

Change-Id: Iad7f662f42096b3f7a4a1c4cfe71048d275f4b5f
2013-05-23 12:48:13 -07:00
Linux Build Service Account
69db7afdd5 Merge "hwc: Don't permit rotator use under certain conditions" 2013-05-20 04:21:38 -07:00
Saurabh Shah
e247408f06 hwc: Don't permit rotator use under certain conditions
These include constrained targets, with external connected which could
lead to a scarcity of pipes. Furthermore owing to a scarcity of writeback
interfaces, even if pipes are available, we may not be able to still
use rotator.

Change-Id: Ie2fb4c1726f32addcace89c268a126abe0cddbe0
2013-05-16 17:56:37 -07:00
Saurabh Shah
2d998a9658 hwc: Implement idle-fallback for videos
In case of videos, do a fallback using 2 pipes per mixer at most.
This redraw will happen only once to reduce pipes from at most 4
to at most 2 and never draw again until there is an update.

Change-Id: I78c0dc2af4e3bd7e9128994e507e777187b4e247
2013-05-14 18:18:37 -07:00
Ramkumar Radhakrishnan
59a110773c hwc: Do not show animation on External display.
- When primary is animating, the animation should not be
  shown on the external display.
- Mark all app layers as HWC_OVERLAY on external during
  animation so that SF wont compose it on FB.

Change-Id: Ic557cabfd9f2518614777c0e993541e36e090850
2013-05-11 18:37:37 -07:00
Saurabh Shah
e51f8ca5ba hwc: Fix unnecessary pipe allocation from mdp comp.
In High res case, there was no check for whether a layer is marked for mdp
leading to unnecessary pipes reserved for rgb layers on external.

Remove z order setting in allocLayerPipes, its too early, incorrect and
will be over-written anyway.

Remove the separate pipe allocation block for YUV. It is redundant and
unnecessary.

Change-Id: Ie90b4202a27ca4f52874514e3fa2b136ae5717f5
2013-05-07 12:58:05 -07:00
Linux Build Service Account
59793b67c2 Merge "hwcomposer: use DMA overlay pipe to do frame update on 8x10" 2013-05-06 14:51:08 -07:00
Saurabh Shah
98acd09dde hwc: Fix Idle fall back when external connected.
Reset idle fall back at the end of prepare, so that irrespective of
whether primary or external is configured first, both will fall back.

Change-Id: I6206f7cf0cccf71d1b33153044546515029f4e08
2013-05-03 10:48:24 -07:00
Xiaoming Zhou
944e02e88e hwcomposer: use DMA overlay pipe to do frame update on 8x10
8x10 MDP core only have DMA pipe, add the support to enable it
in hwcomposer.

Change-Id: I2dac76046d53b9afd9d3deb4653b98bbee1c9840
2013-05-02 18:09:47 -04:00
Saurabh Shah
9f084ad8aa hwc: Alpha downscale on MDP4 is not a hard condition.
Alpha downscaling check should be applied to the full and partial
mdp comp checks rather than as a hard-feature check.

This means we could still have a video going through MDP comp and
the volume bar (lets say) failing the Alpha downscale check.

Change-Id: I6a47057e826668f7f19e20b6d0a548fffa349de2
2013-05-02 11:28:09 -07:00
Saurabh Shah
2f3895f3eb hwc: Update redrawing
By default make use of redrawing. It will be toggled only when caching
decides there shouldn't be any. Per our priority ordering:

1) Full MDP - redraw irrelevant
2) Partial/Cached MDP - decide on redraw
3) Only Video - 1 & 2, which include video, are not possible. Redraw.
4) Fallback - Redraw.

Change-Id: I6b74a5edcf79488ede2ea9480721731f371af9c8
2013-05-02 10:17:06 -07:00
Saurabh Shah
4fdde76f83 hwc: Check for mdp max downscale.
Check for MDP's max downscale limit before using MDP for composition.
MDP 4 can downscale in each direction upto a factor of 8.

Bug: 8744080
Change-Id: Ib9f640a6b1db3ba6244eb665a060f624425b4841
2013-05-01 18:06:09 -07:00
Sravan Kumar D.V.N
ad5d929b55 hwc: Fallback to GPU if source image width or height is less than 2
There is h/w limitation when MDP_OP_SCALE_RGB_ENHANCED bit and
MDP4_OP_SCALEX_EN or MDP_OP_SCALEY_EN bit is set.
The minimum block size is 2x2. MDP will hang if the source RGB image
height or width is equal to 1. Hence fallback to GPU in such cases.

Change-Id: I7333b097fd26bfb888865de9c39d1664bc87acca
2013-05-01 18:03:45 -07:00
Saurabh Shah
aa23682e81 hwc: Fix bugs with mixed mode MDP comp
Fix reseting on handles, they never were in most cases,
owing to wrong size.

Fix redrawing, which needs to be done also when the fb's zorder changes.

Fix mdpcount update which should happen before we assess the pipes
available versus the pipes needed.

Handle video only cases, where other UI layers could be present, but we
cannot use MDP comp for them.

Restructure MDP comp decision model and some redesign.

Change-Id: I86a2efb77edccbbb9e9d7701d06c5b2578a9d2aa
2013-04-29 17:18:43 -07:00
Saurabh Shah
0ceeb6ad01 hwc/overlay: Introduce padding round between DMA modes.
Introduce a padding round between the DMA line and block modes.
Do this based on whether DMA is actually being used, when block mode
is first requested.

This relieves the driver of doing an UNSET ahead of vsync which could
cause blinks in all such transition scenarios.

This approach should lead to smooth transitions for multiple targets
with the exception of secure videos, where there could be a blink in
any of the different approaches we use.

Change-Id: Ibc0b8d284b5c6ed9291a7cfa7e7f221300a921e2
2013-04-24 10:33:58 -07:00
Saurabh Shah
bd2d083c79 overlay: Add support for decimation.
Add support for decimation on top of what MDP can downscale,
because decimation can have quality issues.
B-family MDP downscale of 1/4, plus decimation of 1/16 can let
us have a total downscale of 1/64.

Also decimate by 2 (min) if width is greater than what layer mixer
supports and is not handled by the client.

Change-Id: I3b7c4bf321c7561bd98206ad118f4ac1ee2879ae
2013-04-18 10:08:27 -07:00
Linux Build Service Account
dd9e75b665 Merge "hwc: Fix code handling downscale limitation" 2013-04-17 13:00:02 -07:00
Saurabh Shah
85234ec2ec hwc/overlay: Fix dma mode design and issues.
Add support for tracking the mode in which DMA is being used in overlay.
Remove unnecessary tracking variables, and their set,reset inconsistency.

With such varibles in hwc, it still leads to overlay giving out DMA pipes.
Make overlay as the single tracking place.

Change-Id: Ib949f3d0ef5918ef323c81cb1768b68a68c83da4
2013-04-15 10:10:43 -07:00
Amara Venkata Mastan Manoj Kumar
6fa86729dc hwc: Fix code handling downscale limitation
Layer transform should be considered while performing
downscale limitation check. Failing which videos will
fall back to GPU.

CRs-fixed: 474244
Change-Id: I04e005afa77a209d5de58446d4c6f15842d9a43b
2013-04-12 18:30:32 -07:00
Jeykumar Sankaran
85977e3abe hwc: Implement mixed mode composition.
With this change we are moving  MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.

        - Mixed mode design is based on layer caching
        - Mixed mode path is configured only when non-bypassing
          layers are cached.
        - Never allow mixed mode when FB needs to be  udpated.
        - If we cannot bypass all MDP comp marked layers, bail
          out completely.

Change-Id: Ie08f39db07e032b537f042d0d2bfe772ebfed049
2013-04-08 11:36:03 -04:00
Saurabh Shah
9e3adb21e9 hwc: Initialize rotator field to NULL.
In case of High resolution MDP comp, initialize rot field to NULL,
which was missing.
This is already done in the Low resolution case.

Change-Id: I5a9be8393cceff58f0ba3b6d85a887949f25af62
2013-03-27 09:33:26 -07:00
Jeykumar Sankaran
a37fdbf2ab hwc: Add DMA pipe support in MDP composition.
This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.

Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
2013-03-22 10:54:22 -07:00
Saurabh Shah
acf102021a hwc/overlay: Video on 4k2k external, 4k2k rotation.
-Add support for Video via overlay on 4k2k external panel.
-Add support for rotating videos on 4k2k panels. We use
pre-rotation in hwc to rotate a video into a single buffer,
irrespective of panel size. Then this buffer is fed to MDP.
Rotator objects are managed by the new RotMgr.
-Cleaup mdpcomp and overlay.

Change-Id: Ifb08534747e8e18b6c58dd8a3e1a9947409100f1
2013-03-13 10:24:31 -07: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
Linux Build Service Account
f912294e62 Merge "libhwcomposer: Only 4 pipes can be used per display for MDP Comp." 2013-02-15 14:25:50 -08:00
Sushil Chauhan
69f2bb260e libhwcomposer: Only 4 pipes can be used per display for MDP Comp.
Although 6 pipes are available in total but only up to 4 pipes are
available per display (single mixer) for MDP Composition.

CRs-Fixed: 450985

Change-Id: I99df91ab955a1a7110dfbea2aaf790ba26058a78
2013-02-13 13:25:22 -08:00
Linux Build Service Account
961407fe41 Merge "display: Reconcile display HALs" 2013-02-13 10:16:51 -08:00
Jeykumar Sankaran
c18dbc2a3d hwc: Don't use MDP for buffers of width less than 5
This is a software workaround for MDP hardware limitation where
DSI mode panels wont give more than 30 FPS if buffers in RGB
pipes are of width less than 5

MDP can't handle layers of width less than 3. Fail MDP
Composition for those frames.

Change-Id: If45efab19817ea9e724fd2857fcc1c5d98ce0eab
2013-02-11 12:58:29 -08:00
Naseer Ahmed
7421472e5c display: Reconcile display HALs
Make the display HALs compile with/without the Qualcomm BSP
specific features so they can work with pure AOSP.
Change-Id: I1ad7282c4fe1fe7e3309afb530a07735f165ffbe
2013-02-09 08:29:49 -05:00
Linux Build Service Account
3b6d1115ef Merge "hwc: Pass transform value while cropping dst rect" 2013-02-07 16:36:18 -08:00
Jeykumar Sankaran
8f7a94f826 hwc: Pass transform value while cropping dst rect
While croping destination rect values for out of bound layers
consider its transform value.

Change-Id: I1f6bf25ac8ca8a27a3402c2d946edfaf57ab23d0
2013-02-04 13:57:23 -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
Ramkumar Radhakrishnan
288f8c7e25 liboverlay: Rotator-assisted MDP downscaling of videos.
Engage the rotator to assist MDP in performing video downscale for
primary and external. This saves bandwidth and avoids causing the
driver to make too many panel mode switches between BLT (writeback)
and non-BLT (direct) modes.

Change-Id: Icfabc2c0f978a23cf96c78a9976cf69cea697b5f
CRs-Fixed: 434852
2013-01-18 12:07:49 -08:00
Ramkumar Radhakrishnan
12b103bdac display: Add NULL check for metadata
Add NULL pointer check for metatdata buffer before accessing its
member variable

Change-Id: I91de520b76d3c9714f357cff2de696e701811d06
CRs-Fixed: 434388
2013-01-09 18:18:22 -08:00
Jeykumar Sankaran
ccb4460088 display: Return MDP pipe availability per display type
Pipes allocated for one display type cannot be used by other
display types without calling UNSET on them. So clients should
check for pipe availablity only for a specific display type.

Change-Id: Id2244e4976b4cc1f040ada7e56686742d5a65141

CRs-Fixed: 433870
2013-01-07 12:51:03 -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
Ramkumar Radhakrishnan
47573e20d5 display: Add display metadata in buffer handle
Allocate extra space for metadata in buffer handles
Provide api to map this space in client process and set the metadata

Change-Id: I8bca8448670d4aa88d439320faf402dae30458f8
2012-12-26 15:45:17 -08: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