Commit Graph

244 Commits

Author SHA1 Message Date
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
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
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