Commit Graph

43 Commits

Author SHA1 Message Date
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
Naseer Ahmed
a256748947 hwc: Use number of app layers from the hwc context.
Current frame count is not valid in cases where MDP
composition is not doable. This could lead to clearing
the flags for the wrong number of layers.

Bug: 7643563
Change-Id: I1f506a4a0a8f706d02e954bd6c12e354c0fb5fe9
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:36:13 -05:00
Naseer Ahmed
76e313c901 hwc: Disable mixed mode composition for secure videos
Also make sure layer cache is used correctly when
we're not using MDP composition

Bug: 7643563
Change-Id: I4dcd70c2da128b2dcbe0b72dc14031983649719d
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2012-12-03 15:35:44 -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
Saurabh Shah
09549f6d75 display: Add support for flip operation in MDP comp
This change adds support for flip operation during MDP composition. This
enables frames to get MDP composited during 270 degree orientation too (with
pre rotation doing 90 degree rotation) or even with layers with just h flip or
v flip.

Bug: 7435860
Change-Id: I7fd18226d8337b2cd9341d709c2bd030eff881f7
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:32:19 -05: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
91a6a994e8 hwc/overlay: Add premultiplied alpha support.
Add premultiplied alpha belnding support while using MDP for composition.
Layers could have PMA blending which was missing from hwc1.1
This change just handles the PMA case.

Bug: 7301436
Change-Id: I7d83169831b40943b2b595723fefc3a95a177137
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-08 14:49:49 -07:00
Naseer Ahmed
52ca6d2747 display/libhwcomposer: fix potential memory leak
This changes fixes a memory leak, by freeing up the pipe alloc structure
everytime before parsing the current frame.

related-to-bug: 7301196
Change-Id: I23edefca71ec0209291be24ee9d629b4a80f0a25
Acked-by: Jeykumar Sankaran<jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-08 13:18:40 -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
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
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
799a39759b display: Enable MDP pixel repeat on MDP Composition.
This change sets MDP_BACKEND_COMPOSITION flag during
MDP composition to enable pixel repeat in MDP H/W

Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: Ibc04878831c84e1e1fd0ace7c185bddce9b7ab7f
2012-09-09 14:20:29 -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
Saurabh Shah
b45b881fe6 hwcomposer : Disable bypass, when connected to external display
Change-Id: I3690e2145967e95a4a8c2fdb5ced34fef6eba639
Acked-by: Ravi Kumar Neti <c_rneti@qualcomm.com>
2012-08-20 16:37:13 -07:00
Naseer Ahmed
fb4cbddd0b libhwcomposer: Reset composition types on idle timeout.
SurfaceFlinger re-creates HWC worklist only for new frame and on layer geometry
change. Invalidate triggered by idle timeout refreshes the existing worklist
retaining its previous composition type. So its MDP comp's responsibility to
clear layer composition types to HWC_FRAMEBUFFER on timeout.

Change-Id: I2407c44f6aa3b11365586364e5865ae629d5326a
2012-08-16 19:27:24 -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
b90d091c75 display: Compile for mako, disable copybit route
Change-Id: I147b50dbedd9d52c715982f911be5c9ac0e267f1
2012-08-14 14:18:19 -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