Commit Graph

285 Commits

Author SHA1 Message Date
Linux Build Service Account
f31fd02ea0 Merge "hwc: memset dropArray when changing refresh rate" 2014-10-17 03:14:17 -07:00
Raj Kamal
18e946ef99 hwc: memset dropArray when changing refresh rate
memset dropArray and set dropCount to 0 before proceeding
to identify if refresh rate needs to be changed. Not doing
this will result in dropCount containing junk value which
will impact mdpCount. This prevents us in changing refresh
rate in cases where it could be changed.

Change-Id: I4081062157620ca0dc0b4a6fed0689b2869efb91
2014-10-14 14:39:03 +05:30
Linux Build Service Account
96da83a12b Merge "hwc: Partial Update for MDP3 targets" 2014-10-10 06:26:06 -07:00
Linux Build Service Account
d01357a76a Merge "hwc: Enable PTOR for 8x16 and 8x39 devices by default" 2014-10-09 08:11:11 -07:00
Dileep Kumar Reddi
4070e93e1e hwc: Partial Update for MDP3 targets
Enable partial update for MDP3 targets.
Use computed ROI of mdpcomp in copybit
to avoid composition of layers outside ROI.

Change-Id: I4b23fd48cac814f8c35a3c01253dca8c297036f9
2014-10-08 01:08:56 -07:00
Linux Build Service Account
dd9101aec9 Merge "hwc: No idle fallback for single layers" 2014-10-07 21:21:22 -07:00
Saurabh Shah
59562ffb03 hwc/qdutils/qservice: Add dynamic idle timeout support
Add support for dynamically setting idle timeout values.
Move default idle timeout setting to IdleInvalidator.
Fix static var naming, handle errors from IdleInvalidator in hwc.
Property debug.hwc.idletime is removed with this change.

Example:
1) Set idle timeout to 100ms
adb shell service call display.qservice 16 i32 100
16 is the code for SET_IDLE_TIMEOUT, 100 is time in ms

2) Disable idle timeout
adb shell service call display.qservice 16 i32 0

Change-Id: I60e15a3ac869b4e9f4015b3be50a35c90d00d404
2014-10-03 10:53:31 -07:00
Linux Build Service Account
6df359bc75 Merge "hwc: Fix src split bugs" 2014-10-02 15:59:52 -07:00
Naseer Ahmed
96bb778950 hwc: No idle fallback for single layers
There is no need to do idle fallback if there's only one layer
being composed.

Change-Id: I0a4e0c7af66b750c1ebd31779175168613a280ce
2014-09-30 14:43:13 -04:00
Tatenda Chipeperekwa
af2c004c44 hwc: Rename libexternal to serve HDMI as primary or external
This change will make is easier to build new functionality
applicable to both HDMI scenarios.

Change-Id: I417184568cb65a49c2ccb4199aff313ae2ee9b24
2014-09-29 15:39:58 -07:00
Saurabh Shah
189f23d621 hwc: Fix src split bugs
--In "always_split" mode, split FB only if the updated portion of
FB's width is less than mixer width

--While deciding whether or not to allocate the 2nd pipe, account
for 90 transform in crop width

--Crop minimum width limitation of at least 5 pixels does not apply
to targets after 8974 v2.

Change-Id: I83b4690216a75c0d57e7e4e7b18b4531bb22df05
2014-09-29 14:50:33 -07:00
Naseer Ahmed
9eb5e09577 display: Fix warnings
Treat warnings as errors again

Change-Id: Ibd7f484d31ad420b85e82fd5183d70bf7dce4bfa
2014-09-25 16:11:15 -04:00
Dileep Kumar Reddi
c6ef347816 hwc: Enable PTOR for 8x16 and 8x39 devices by default
Change-Id: Ic12f721194155c7ae103d4ab9d84855f18d56dd3
2014-09-25 23:15:40 +05:30
Linux Build Service Account
b8173300fa Merge "display: Add support for dynamic refresh rate" 2014-09-20 13:38:37 -07:00
Linux Build Service Account
b803e4c13e Merge "hwc: vd: Add support for Dynamic Resolution Change (DRC)" 2014-09-18 18:36:45 -07:00
Arun Kumar K.R
a727a888ba display: Add support for dynamic refresh rate
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
  when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
  updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo

Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
2014-09-17 13:48:26 -07:00
Tatenda Chipeperekwa
cb2a243608 hwc: vd: Add support for Dynamic Resolution Change (DRC)
1. Add support for Dynamic Resolution Change

We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.

For the WFD use cases, the WFD  MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.

2. Update WB dump with output buffer format and resolution

Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.

Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
2014-09-15 11:12:35 -07:00
Linux Build Service Account
4ecfb281c3 Merge "hwc: Fix PTOR for overlapping PTOR regions." 2014-09-15 00:04:11 -07:00
Linux Build Service Account
d6a3a5e94a Merge "hwc: Release non VIG pipes during padding round and HDMI configure" 2014-09-13 13:29:44 -07:00
Linux Build Service Account
a7dcd9f7b8 Merge "hwc: Moving error log to debug log for non-fatal error" 2014-09-10 18:55:02 -07:00
Linux Build Service Account
663e49d89c Merge "hwc: Enable mdp downscale feature for 4k resolution" 2014-09-10 18:54:33 -07:00
Ramkumar Radhakrishnan
f26fe9ebdb hwc: Release non VIG pipes during padding round and HDMI configure
1. Fall back to video only composition instead of full GPU composition
   to release all pipes assigned to RGB layers for primary display
   during external configuration and padding round. Do this only for
   the target which has total number of pipes >= 8.
2. This resolves blinks when HDMI is connected during secure video
   playback usecase.

Change-Id: I6cf3a20c3eb3c2b82ad6c70eba84292cf59ecf26
2014-09-10 13:56:21 -07:00
Prabhanjan Kandula
9889a20f78 hwc: Fix PTOR for overlapping PTOR regions.
If two PTOR layers are overlapping, remove overlapping
region from bottom PTOR layer if possible to reduce total
overlapping layers in a region.

Change-Id: I695c097360ac5a8fa123e014f21380169519eb32
2014-09-10 18:21:12 +05:30
Linux Build Service Account
121a863a32 Merge "hwc: Add error log to MDP Comp simulation failures" 2014-09-09 20:58:49 -07:00
Ramkumar Radhakrishnan
0cabf21287 hwc: Moving error log to debug log for non-fatal error
In secure RGB usecase, we mark secure RGB layers for MDP composition
as GPU does not support secure RGB composition even if skip layer
is present. In markLayerForCaching function, when we encounter a skip
layer marked for MDP composition whose handle can be null will flag
"Layer handle is NULL" as error. So we can enable this message only
when MDP debugging logs are enabled.

Change-Id: I8be579636bf1de12a032c289e2542614fbbd375c
2014-09-08 20:11:30 -07:00
Ramkumar Radhakrishnan
a5c72875f5 hwc: Enable mdp downscale feature for 4k resolution
Enable MDP Downscale feature for primary resolution greater than
2048 only for the targets that supports source split.

Change-Id: I21871b099f74543aa8c2416bac41e3a16d4ce72d
2014-09-08 17:37:53 -07:00
Saurabh Shah
286cf1202d hwc: Add error log to MDP Comp simulation failures
Add error log to MDP Comp Simulation failures when none of the mode
succeeds and hwc falls back to GPU. This is enabled only for primary
display.

Change-Id: Id449397a933a9670c9cae1f0d70ab700163b5e6b
2014-09-08 14:13:08 -07:00
Manoj Kumar AVM
9591a5e8cd hqd: virtual display code clean up
Remove V4L2 based virtual display functions as it is
no longer used.

Change-Id: Ibd7685791de6baa1bbf12ffe343443fcd7725269
2014-09-02 19:50:23 -07:00
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