Commit Graph

236 Commits

Author SHA1 Message Date
Linux Build Service Account
995d0a8ac9 Merge "display: remove compiler warnings" 2014-06-20 18:39:25 -07:00
Linux Build Service Account
cde184b8cb Merge "hwc/overlay: Fix decimation / bwc bugs" 2014-06-20 00:08:46 -07:00
Shalaj Jain
a70b435d10 display: remove compiler warnings
Use correct typecasts and format specifiers and resolve
compiler warnings

Change-Id: I51b12ecb78a9a496cf1f76c3d32892a203f70c43
2014-06-19 15:44:51 -07:00
Linux Build Service Account
b7abeb1fbc Merge "hwc: Rotate RGB layer using MDP Rotator" 2014-06-19 12:13:18 -07:00
Saurabh Shah
b6810df4ea hwc/overlay: Fix decimation / bwc bugs
1) While setting BWC check for 90 transform and swap crop
2) Calculate decimation in the getDecimationFactor API itself.
   Currently, a residual downscale is calculated and the clients have
   to take logs and apply forcible decimation like in MdpCtrl
3) Fix bug where transform gets typecasted to bool

b/14225977

Change-Id: I3c99c571e02e2cf7822342516b6a87d97be553d1
2014-06-17 16:32:52 -07:00
Linux Build Service Account
e606d7b149 Merge "hwc: On downscale check swap on 90 transform" 2014-06-16 23:36:54 -07:00
Ramkumar Radhakrishnan
9d20b39e4a hwc: Rotate RGB layer using MDP Rotator
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5

Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
2014-06-16 12:10:40 -07:00
Linux Build Service Account
1e0e5cde58 Merge "hwc: Source Split layers always if indicated by driver" 2014-06-14 23:03:54 -07:00
Saurabh Shah
e28a402b72 hwc: On downscale check swap on 90 transform
While checking for valid dimensions, take 90 transform into
account while calculating downscales.

b/14225977

Change-Id: Ie8b527c8263a5eb366ae2a4adaa2ffbbf270ba50
2014-06-13 12:10:13 -07:00
Linux Build Service Account
836405d26e Merge "hwc: Avoid MDP draw if prepare is not successful." 2014-06-13 04:34:22 -07:00
Saurabh Shah
7c7276405e hwc: 8084: Split videos with width > 2048 if source split absent
Split video with width > 2048 only if source split is absent, and
the relevant system property is set.
In source split the video is split evenly anyway.

Change-Id: Iab0af427756d32120a160787ecfb7c974dbbeea1
2014-06-11 09:57:24 -07:00
Saurabh Shah
ea7a01d1cd hwc: Source Split layers always if indicated by driver
Source Split layers always if the driver indicates so by setting
the src_split_always in the capabilities sysfs node.
This is applicable to layers whose width > mixer's width, since
MDP clk rate is dependent on max(mixer_width, layer_width).

This feature can be enabled if the panel height is more than a
certain empirically derived value. Splitting always in those
cases can help with a lower voltage.

Change-Id: If9b33f11ca4132eb77416c26819f7473c65d3b08
2014-06-10 13:41:01 -07:00
Raj Kamal
4393eaa6d3 hwc: Avoid MDP draw if prepare is not successful.
If #AppLayers are 0 or exceed MAX_NUM_APP_LAYERS
return early from MDP draw.

Change-Id: I834c7b04a295fbd9b98374cade880992d995ad1f
2014-06-06 14:42:45 +05:30
Dileep Kumar Reddi
190dc1cc91 hwc: modifying logic in adjust FB Z-order for 4k2kYUVSplit
Use complete layer list details instead of depending on only
4k YUV layer indices.

Change-Id: I28deee47b8330a4b3c56bef48e333ce6ead8bf25
2014-06-06 08:53:26 +05:30
Jeykumar Sankaran
455678cbc8 hwc: Map dirtyRect to layer destination for single DSI panels.
Map dirtyRect generated for sourceCrop to layer destination
before using it for calculating ROI for single DSI
panels.

Change-Id: Ie65284e9c58270c66276f9d43c4eb3e7db29b623
2014-06-03 09:35:12 -07:00
Linux Build Service Account
8a81e76fa2 Merge "hwc: Full MDP Composition mode with overlap region removal" 2014-06-02 16:52:47 -07:00
Sushil Chauhan
defd352e10 hwc: Full MDP Composition mode with overlap region removal
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.

Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
2014-05-30 13:59:16 -07:00
Jeykumar Sankaran
6850ac64c5 hwc: Add display ROI in HWC dumpsys
Add ROI generated for each display in their dumpsys data.

Change-Id: I41fb79af9d42abc11ff147d18a600fd4ad60ab6c
2014-05-27 10:50:37 -07:00
Linux Build Service Account
4da8c2b4ad Merge "hwc: Simulate composition strategy" 2014-05-22 18:25:37 -07:00
Jeykumar Sankaran
0ad97c4c5c hwc: Simulate composition strategy
Provide support to simulate composition strategy tree to execute
and test multiple strategy combinations across test cases.

Change-Id: I5011fad32f8f45ecef47b6df513f9d72343697d2
2014-05-20 11:15:38 -07:00
Saurabh Shah
1bd5b6fcc2 hwc: source split: Enable BWC for video with width <= mixer width
Enable BWC for videos with crop and position widths <= mixer width.
Source split was earlier used on split panels only, and BWC was
never enabled (It should at least have been for eligible content).
When source split was enabled for all panels, automatically BWC got
disabled for rotated videos. This change fixes that.

Change-Id: I349e782fb6de515ff42fcb137f02cf27c425da56
2014-05-19 12:51:53 -07:00
Linux Build Service Account
fe31d200c5 Merge "hwc: Map dirtyRect to layer destination before using." 2014-05-19 01:02:06 -07:00
Linux Build Service Account
c90c87656a Merge "hwc: Support single ROI for split panels." 2014-05-19 01:02:06 -07:00
Linux Build Service Account
3cc3fa5dff Merge "hwc: Extend partial frame update for split displays" 2014-05-19 01:02:05 -07:00
Linux Build Service Account
11d5e35f66 Merge "overlay : Rely on 8x16 pipe strategy for 8x39." 2014-05-16 05:43:36 -07:00
Linux Build Service Account
b6c714c901 Merge "hwc: Handle validateAndSet failures in AD prepare call" 2014-05-15 17:33:42 -07:00
Jeykumar Sankaran
71e597c7e8 hwc: Map dirtyRect to layer destination before using.
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.

Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
2014-05-15 09:28:08 -07:00
Jeykumar Sankaran
a40a934551 hwc: Support single ROI for split panels.
For panels that cannot accept commands in both the interfaces, we cannot
send two ROI's (for each half). We merge them into single ROI and split
them across lSplit for MDP mixer use. The ROI's will be merged again
finally before updating the panel in the driver.

 - Reads panel property of dual control path.
 - If dual control path not supported, merge ROI's before
   analysing for composition strategies.

Change-Id: I67e361a299dc5d1adb28b180900e24633eefc4a8
2014-05-14 17:45:56 -07:00
Jeykumar Sankaran
6c7eeac178 hwc: Extend partial frame update for split displays
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.

Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.

Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
2014-05-14 17:45:24 -07:00
Tatenda Chipeperekwa
88fe63557d hwc: Handle validateAndSet failures in AD prepare call
When validateAndSet fails we must reset the mDoable flag to false and
close the fb device. This will prevent making a draw call using
invalid resource references and prevent any fd leaks.

Additionally, we should only turn AD on if there are no configuration
errors during prepare call. This will prevent toggling AD between
on/off state in the face of continuous failures.

Change-Id: I15502dbf64c6203092aa13e001bab5d27b0e17ec
2014-05-13 12:50:56 -07:00
Prabhanjan Kandula
958ffa9693 overlay : Rely on 8x16 pipe strategy for 8x39.
Since both has same number of pipes with similar
features like scaling capabilities, for now rely on 8x16.

Change-Id: Ief51bb5c70d8aef7dca3d791f8b4d62a4c5392ff
2014-05-13 18:08:38 +05:30
Saurabh Shah
60e8bdebae hwc: Enable source split for targets with single dsi
Enable source split for targets with single dsi. This has the
benefit of using 2 pipes for layers whose width (crop) is higher
than line width.

Change-Id: I147136a3eb786e1af7b63508d65c010e88e358ed
2014-04-30 14:46:03 -07:00
Jeykumar Sankaran
880da83ec1 hwc: Don't validate dropped layers for MDP support
Ignore dropped layers while checking MDP support for layers
when trying for full MDP composition.

Change-Id: Ia11594173759e9dcc321d72ef425615281c35b7c
2014-04-29 09:12:20 -07:00
Linux Build Service Account
64e1ce83b7 Merge "hwc: Add target specific checks in hwcomposer" 2014-04-28 22:26:59 -07:00
Linux Build Service Account
ac7a7dd410 Merge "hwc: [8x26]Never allow primary get DMA pipe when external connect" 2014-04-28 22:26:58 -07:00
Raj Kamal
068f4575f6 hwc: Add target specific checks in hwcomposer
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.

* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.

Change-Id: I1726caa4634f72d781561e797078648524ea2eef
2014-04-25 14:18:32 +05:30
Jeykumar Sankaran
7c85238f0c hwc: Use layer dirty rect to calculate frame's updating ROI
Use layer dirty rect instead of display frame to calculate frame's ROI.

Change-Id: If5fe93da7815efdf9b44ed683a4d80b397921cf1
2014-04-24 10:43:02 -07:00
Xu Yang
1e686f6607 hwc: [8x26]Never allow primary get DMA pipe when external connect
For 8x26, if external display is connected, DMA pipe should never
be occupied by primary display. Otherwise, external display would
lack DMA pipe if switch to GPU composition.

This patch refines former commit: 9c1eb2be21

CRs-Fixed: 640934
Change-Id: Idc64b724cfacf9e8e22ca73e4e443e8d989e1212
2014-04-23 09:33:47 +08:00
Prabhanjan Kandula
8e6f914e66 hwc : Enable partial update if panel supports it.
Rely on panel info shared by driver and enable
partial update if it says as supported. Use the
existing property to disable partial update if
required for debugging.

Change-Id: I75d5dcbbfea08515d17150054ca91367319b929c
2014-04-22 18:02:56 +05:30
Linux Build Service Account
64fa249253 Merge "hwc: Skip dropped layers in video only composition" 2014-04-19 04:20:24 -07:00
Jeykumar Sankaran
eb3a5e2656 hwc: Skip dropped layers in video only composition
No need to draw dropped layers while doing video only composition
since they are lying outside updating ROI.

Change-Id: I7bef731538e39a5b16f17314ad31f0c4e7f2b618
2014-04-18 09:35:55 -07:00
Linux Build Service Account
37059a258a Merge "hwc: Set MDSS_MDP_DUAL_PIPE on both pipes" 2014-04-16 15:22:49 -07:00
Saurabh Shah
97e2d80865 hwc: Set MDSS_MDP_DUAL_PIPE on both pipes
Set MDSS_MDP_DUAL_PIPE on both left and right pipes so libscalar
can detect the pipe pair.

Change-Id: I2c77238de1c7f81d4e17f516680a63462482910e
2014-04-15 10:54:29 -07:00
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