Commit Graph

257 Commits

Author SHA1 Message Date
Linux Build Service Account
f4045c63bb Merge "hwc: Add support for secure RGB layer" 2014-08-24 13:52:07 -07:00
Linux Build Service Account
fa90e1e422 Merge "hwc\overlay: Remove support for foreground override" 2014-08-23 07:58:50 -07:00
Linux Build Service Account
7b34be839f Merge "hwc: mdpcomp: Free pipeinfo objects every drawing round" 2014-08-21 15:30:45 -07:00
Ramkumar Radhakrishnan
4ec775f955 hwc: Add support for secure RGB layer
1. Detect and account the number of secure RGB layers present.
2. Mark secure RGB layers for MDP comp in cache based stratergy.
3. If full MDP comp and partial MDP comp fails, Mark secure RGB
   layers for MDP composition.
4. In partial MDP comp reject load based composition, if secure
   layer is present to avoid GPU composition.
5. Disable idlefallback feature if secure RGB layer is present
   to avoid GPU composition.

Change-Id: Idb4c4f09b081ec20240a2602aa3f20332fa49ad6
2014-08-20 11:32:47 -07:00
Saurabh Shah
b729b19ff2 hwc: src split: Fix unwanted scaling with H-flip
Source split splits the crop and position into half, but if the
widths are odd and the left, right crops are swapped for H-flip, it
induces a scaling that is unaccounted for while allocating pipes.
This could lead to DMA pipes having scaling.

To fix this, the patch manipulates position width, if a swap happens.

Change-Id: I1b3ed582740fd49e651407be422820f60fe59cc6
2014-08-18 11:24:05 -07:00
Saurabh Shah
2c8ad05dcf hwc\overlay: Remove support for foreground override
Remove support for overriding a layer's z to set it up for foreground.
This is unused and can be achieved using pipes staged at required
z-orders.

Change-Id: Ia4688beed770c44c20d201a2dc5687252e002981
2014-08-15 13:27:46 -07:00
Saurabh Shah
f7fad54731 hwc: mdpcomp: Free pipeinfo objects every drawing round
Free pipeinfo objects every round on reset, irrespective of the
number of layers to avoid any possible leaks.

Change-Id: Ia47c968f6ee64cbb56be72336305bf11a45c2ee5
2014-08-14 10:11:36 -07:00
Linux Build Service Account
ee75c10fa6 Merge "overlay: Add support for rotator downscale" 2014-08-12 09:16:00 -07:00
Saurabh Shah
c46cf9d26b overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support

The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.

Smaller downscale is used if we need to chop off any more than 1
line or pixel.

Change-Id: Id07d62fefa3213035f16cca49497800716484a95
2014-08-08 10:19:18 -07:00
Raj Kamal
389d6e33d3 Limit #ROT-SESSIONS to 4 in LayerRotMap and RotMgr
* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures

* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP

Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
2014-08-08 09:11:09 +05:30
Xu Yang
cda012c674 hwc: Configure MDP with updated content attributes of PTOR layers
Since there is no content underneath a PTOR layer, all overlapped
contents have been composed by Copybit on render buffer. So for a
PTOR layer, we can set blending to HWC_BLENDING_NONE and planeAlpha
to 0xFF. And the transform for the PTOR layer should be set to 0 to
avoid MDP flipping again.

Change-Id: I26fec26dcde4d9b0b62f94107a013d82074628b5
2014-08-04 14:20:09 +08:00
Linux Build Service Account
1f01133450 Merge "hwc: Enable PTOR feature for split display" 2014-07-31 06:01:16 -07:00
Sushil Chauhan
875a92e98d hwc: Configure MDP with updated crop and whf for PTOR layers
1. For PTOR layers, MDP needs to be configured with width, height
and format of the Copybit render buffer, otherwise it will lead to
artifacts due to incorrect render buffer reads, when PTOR layer
handles have un-equal strides.

2. Remove render buffer offset for a PTOR layer and configure MDP
with modified source crop, based on its position on render buffer.

3. A layer cannot qualify for PTOR feature, if none of below layers
intersect with it.

Change-Id: Idba65789b9ed3b699a5c70107881868c0385322d
2014-07-29 12:13:02 -07:00
Sushil Chauhan
bfc2de0337 hwc: Enable PTOR feature for split display
Enable PTOR feature for split display devices.

Change-Id: I2f8acc0713acf2a50f0cd472c272bc1298f4ed7f
2014-07-24 11:55:04 -07:00
Prabhanjan Kandula
5bae9f5d35 qdutils : Read max mixer width from drivers.
Read the maximum width mixer can output from drivers
and consider this in identifying if dual pipes are required
to support a layer. So far above 2K dimensions we are using dual
pipes, but 8x39 mixer output can be upto 2560. So there is no
need of dual pipes as long as pipe data is less than this limit.
Compare layer/panel resolutions against this limit to deduce
if there is a need for dual pipes or split.

Change-Id: I52e1d28e381327d4f0b00f5ea8547c1e6157313c
2014-07-23 23:16:28 -07:00
Jeykumar Sankaran
4dd10ab549 hwc: Avoid partial frame update on secure display
On configuring for secure display, MDP switches to secured
memory bank. Invoking any more DCS panel commands which
follows non-secure path will cause XPU violation. So its
necessary for HWC to turn off partial update to avoid DCS
commands due to ROI change.

Change-Id: Ibcc24d34d3cb825b027c116ac6a4d841d9cb9b70
2014-07-14 10:42:47 -07:00
Linux Build Service Account
a3691146b1 Merge "display: Dynamic debug logging via binder" 2014-07-07 21:55:28 -07:00
Naseer Ahmed
35a268c23a display: Dynamic debug logging via binder
Provides a way to enable/disable logs at runtime via binder.
The logs need to be enabled from a priviliged shell.

For example,
$ adb shell service call display.qservice 15 i32 0 i32 1

Here 15 is the integer code for DYNAMIC_DEBUG in IQService.h
The first parameter 0 is for DEBUG_ALL
The second parameter 1 is to enable.

Hence, this command enables all debug logs.

Another example - this command enables vsync logging
$ adb shell service call display.qservice 15 i32 2 i32 1

Change-Id: I13d5f397d9d03f0ac6a14d3a3c9098ed59fc62fd
2014-07-03 18:51:04 -04:00
Saurabh Shah
8ec9b5eda4 hwc/overlay: Get rot dest dimensions instead of manipulating source
Currently for Mdss rotator we manipulate the layer buffer dimensions
to be equal to what rotator's destination dimensions would be, so that
these could be fed to MDP. Instead, this patch introduces APIs in
rotator so that hwc can directly query destination crop, width, height,
format from rotator.

This also simplifies the updateSource() and configRotator() helpers.

Change-Id: I501d998f2e0574683c764af9422742b2426ba0c7
2014-07-02 09:58:42 -07:00
Linux Build Service Account
d11e467892 Merge "hwc: Extend PTOR feature for two layers" 2014-06-20 23:00:53 -07:00
Linux Build Service Account
995d0a8ac9 Merge "display: remove compiler warnings" 2014-06-20 18:39:25 -07:00
Arun Kumar K.R
b2a03b1db3 hwc: Extend PTOR feature for two layers
- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
  to acheive full MDP Composition
- This helps to acheive performance enhancement

Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
2014-06-20 12:19: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