Commit Graph

108 Commits

Author SHA1 Message Date
Ramakant Singh
140965d6a4 hwc: Add dynamic fps support for PPP
Some apps like camera and video are running on
less fps than panel refresh rate. Hence setting
dynamic fps will help in reducing BW voting for PPP.

Change-Id: I236fe96d5c6547044083774388887638f9e32958
2015-03-05 19:38:06 -08:00
Dileep Kumar Reddi
9dab73ae3b hwc: Use drop information in caching to avoid flicker
when swaprect and partial update enabled together, in some corner cases
change in ROI is not reflecting because of same layer handle.

Change-Id: Id50e296ab15cdd6c3727ef70fd75b4f2aad0cfa1
2015-02-24 02:48:06 -08:00
bait_dispatcher_monitor_system
92fff34247 Merge "hwc: Handle worm hole region for one line" 2015-02-20 14:58:44 -08:00
bait_dispatcher_monitor_system
438538bdef Merge "hwc: Fix scaling issue in copybit." 2015-02-20 14:58:43 -08:00
Ramakant Singh
909bc2a7f0 hwc: Handle worm hole region for one line
MDP3 can't handle one line worm hole region.
Hence passing full FB to clear and disabling the
swap rect if presents.

Change-Id: Iba4c7c0a08625dad8ebe700d71df83e37cc50797
2015-02-13 01:13:26 -08:00
Linux Build Service Account
8beed5c26d Merge "hwc: fix fence issue in app buffer composition" 2015-02-05 15:30:04 -08:00
Linux Build Service Account
38a40d7308 Merge "hwc: Enable swapRect for overlapping use-cases" 2015-02-05 04:08:36 -08:00
Ramakant Singh
52e1c0ce23 hwc: fix fence issue in app buffer composition
Due to wrong buffer index closing app buffer
acquired fence.
CRs-Fixed: 769718

Change-Id: I22db571ad7af303f5372532b3c5e5841fb6b27b7
2015-02-02 02:30:41 -08:00
Dileep Kumar Reddi
aa48888ad4 hwc: Use displayFrame information in caching
In some use-cases layer handle is not changing but
displayFrame is changing, resulting flickers.

Change-Id: I4e5a2756efe76754ab517f65dae75fc07db48435
2015-02-02 15:57:16 +05:30
Dileep Kumar Reddi
f7b72059cd hwc: Enable swapRect for overlapping use-cases
Use swapRect feature for use-cases with one updating layer
and updating layer is overlapping with other layers

Change-Id: I1a48926c941ef3e8184e1a6f80134f4e688741eb
2015-02-02 15:48:00 +05:30
Dileep Kumar Reddi
f4e2e0c579 hwc: Use dirtyRect details in solid fill
No need to clear a non updating region in case of swapRect.
Use dirtyRect value of updating layer to achieve this.
Before using dirtyRect value map it to respective displayFrame,
as dirtyRect is with respect to sourceCrop.

Change-Id: Ie5782a039f7075396e30405070f12ce2443c0a82
2015-02-02 15:44:20 +05:30
Ramakant Singh
75b427cc0a hwc: Add check for dirtyRect clear call.
We should call clear in dirtyRect only if its a
valid region to clear.
CRs-Fixed: 768200
Change-Id: If627170e9f4893fe13a85a9929511858132d5405
2015-02-02 15:39:15 +05:30
Saurabh Shah
15455aa610 hwc/overlay/hdmi: Fix / enable some error messages.
Fix cases where some errors are really warnings/info.
Print one-time events like HDMI connect disconnect as info logs.
Print the error string and type on MSMFB_OVERLAY_PREPARE failure.

An ENODEV from driver corresponds to a pipe not available and should
be treated as a warning. This could happen if a previous UNSET is
pending due to a missed vsync. ENODEV should be treated as fatal
only if it is seen continuously representing a book-keeping
blunder.

Change-Id: I730d4ac7db84c287f47805b9c74792c90cfadc6c
2015-01-29 15:22:18 -08:00
Ramakant Singh
d2875e130c hwc: Fix scaling issue in copybit.
We should do scaling only in required dimension(s)
(width and/or height).

Change-Id: Iaf6e9ae09351dadb91f60f02730338fb01545a73
2015-01-23 19:10:03 -08:00
Linux Build Service Account
7230446234 Merge "Hwc : Calculate copybit destination rect properly in PTOR" 2014-11-13 13:03:20 -08:00
Dileep Kumar Reddi
408fde5128 Hwc : Calculate copybit destination rect properly in PTOR
When the layer destination rect is not transformed properly on target
render buffer location of that PTOR layer,  it results in corruption
on the PTOR layer. This corruption is observed when the overlapping
region of any below layer different from PTOR display frame.

To fix this, destination rect for copybit is calculated as follows:
i.   Find the intersection of layer display frame with PTOR layer
     with respect to screen co-ordinates
ii.  Calculated the destination rect by transforming the overlapping
     region of layer display frame with respect to PTOR display frame
iii. Transform the destination rect on to render buffer

Change-Id: I9468e194ac87de4e3d37f7b1df90bfa6473a1921
2014-11-06 22:55:33 -08:00
Dileep Kumar Reddi
d1f08e410a hwc: Clear render buffer before blitting layers below PTOR layers
Stale render buffer data results in flickering in some corner cases.
It always better to clear render buffer before using it.

Change-Id: If87dc05bcdc88e839f162cf3db4f00aba6f1d535
2014-11-06 22:54:47 -08:00
Linux Build Service Account
4850bd8a11 Merge "hwc: Add msm8x09 version checks in HAL." 2014-10-11 21:21:45 -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
Ramakant Singh
b4106a121c hwc: Add msm8x09 version checks in HAL.
Add version checks for msm8x09 in hwc,copybit
and overlay.

Change-Id: Ia8b00f0ccd5f0495ab120b4c3e188caa5dbfa79c
2014-10-08 12:20:54 +05:30
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
aa18901d75 Merge "hwc: Configure MDP with updated crop and whf for PTOR layers" 2014-07-31 06:00:54 -07:00
Linux Build Service Account
f689eca921 Merge "HWC: Support for thermal mitigation on 8909" 2014-07-31 02:01:12 -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
Dileep Kumar Reddi
a25a9187a3 HWC: Support for thermal mitigation on 8909
Avoid MDP composition while system running in thermal burst mode
by reading node msm_fb_thermal_level which is being updated by
thermal daemon.

Change-Id: I3a1a85f1af35b787310ac205dbed3bb2ae86deb7
2014-07-28 08:38:21 +05:30
Sushil Chauhan
fb8845cc3e hwc: In PTOR, offset depends on stride calculated by gralloc
1. In PTOR feature, offset for the second overlap layer on render
buffer, depends on stride calculated by gralloc for RGBA (4 bpp).

2. If mCopyBit object exists for external, we need setReleaseFd()

Change-Id: I74e365def2a6e540b2f2ba2b294b6b1e00e0ea96
2014-07-23 10:23:41 -07:00
Linux Build Service Account
7c9014b83f Merge "hwc : Enable ABC only for non intersecting layers." 2014-07-15 15:54:22 -07:00
Linux Build Service Account
d11e467892 Merge "hwc: Extend PTOR feature for two layers" 2014-06-20 23:00:53 -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
Ramakant Singh
cc32661b65 hwc : Enable ABC only for non intersecting layers.
To prevent artifact(s), we should enable ABC only in case
of non intersecting layers.

Change-Id: I3dd265e834340dcb298d7b9e06d135a4583a17b8
2014-06-20 16:09:37 +05:30
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
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
Ramakant Singh
467759fb28 hwc : Add support for ABC in MDP3
In display list if one layer has same parameters
as framebuffer on index '0'. Use this layer
as FB and blit other layer(s) on top of it.

Change-Id: If38712781f24a2e27686d2b370643f51a9b05358
2014-05-26 13:59:22 +05:30
Ramakant Singh
0def28c653 hwc : Add support for single layer Bypass in MDP3
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.

Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
2014-05-26 13:56:36 +05:30
Praveena Pachipulusu
2005e8f612 hwc: Fix klockwork errors
Resolving klockwork errors to avoid memory leaks,
improper assignments in liboverlay.

Change-Id: I82ac6ae782c7b783e89999b832bbd1d361376b9f
2014-05-16 08:45:03 +05:30
Saurabh Shah
93c690531d hwc: Conditionally compile dirtyRect under QCOM_BSP for copybit
Conditionally compile layer's dirtyRect under QCOM_BSP in the copybit
file to prevent breaking builds that don't have this member in
headers.

Change-Id: I1669c5eefd1f48e45625797ef1508b5a6f23e6b1
2014-04-24 10:27:10 -07:00
Ramakant Singh
21cec725af HWC/Copybit :: Add swap rect feature in HAL for MDP3
We brings all swap rect level checks in HAL from surfaceflinger
for MDP3.
swap rect kicks in case of
1 Only one layer is updating.
2 No overlaypping layers.
3.Both src and dst has same value.(no scaling)
4.No video layer

Change-Id: I881958994e80b53d4969beaaf51518b727a8de78
2014-04-19 19:04:41 +05:30
Saurabh Shah
74eff4debf hwc: featurize using QCOM_BSP
- Use QCOM_BSP for HWC_BLIT and GPUHint features
- These are not avaliable on all platforms

Change-Id: Ied0c60246093c868ac708f2f8897f08cec1e8878
2014-04-09 10:08:09 -07:00
Linux Build Service Account
d36d04a2dc Merge "hwc: Use proper typecasts" 2014-03-28 23:49:57 -07:00
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30
Sushil Chauhan
fda00fc87f hwc: Color layer always has zero transform.
Color layer always has zero transform because framework uses the
transform member of hwc layer to pass the color value to HAL.

Change-Id: I79fe204c558d1b6e1dd69ba635ba0bd87140b1b1
2014-03-20 11:20:52 -07:00
Ramakant Singh
80f36f22d8 HWC/copybit: Add ceil value for downscale value
We are dividing (in downscaling case )the src rect value
to get intermediate value of dst. And due to rounding we
may not get exact ratio of src and tmp dst in kernel or
else where.Hence using ceil value.

CRs-Fixed: 618847
Change-Id: I8b95c3e00e83ff986d95e063d5927a3c57a13ff6
2014-02-26 10:34:18 +05:30
Ramkumar Radhakrishnan
36bd527bc8 display: Remove klockwork warnings and errors.
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.

Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
2014-02-18 12:39:21 -08:00
Arun Kumar K.R
2aa44c66fa hwc: resolve compiler warnings
- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
2014-02-03 09:20:36 -08:00
Linux Build Service Account
457e820b9c Merge "display : change wormhole calculation for swap rect" 2014-01-20 05:39:31 -08:00
Ramakant Singh
0b35f2c7d8 HWC copybit: Add conditional check for src/dst crop w and h
It's better to check the source/dst  crop width and height
for null and -ve value, may cause float exception.

CRs-Fixed: 596099
Change-Id: I34881cf37a99fb52be6429e27deba4ac12ed2474
2014-01-13 11:08:20 +05:30
Ramakant Singh
762ae0869a display : change wormhole calculation for swap rect
In case of swap rect use case ,wormhole rect will
be same as  dirty rect (if has any blending)

Change-Id: Id2ee34d860207c440a033010460723fe964f7074
2014-01-08 16:30:22 +05:30
Terence Hampson
c67b03798c hwc: Remove need for intermediate for mdp3 composition
8x10 has a product line that is suppose to use 256MB. The
intermediate buffers allocated are not needed when we can
compose onto fb frame.

Change-Id: I13fd2deb328a3ef4b6738cfe7030fe67ea7bd6c6
2013-12-17 14:55:47 -05:00
Linux Build Service Account
6ba55d898f Merge "hwc/copybit: Fix the wrong layer transform check." 2013-12-12 00:08:30 -08:00
Linux Build Service Account
0616b39ffe Merge "hwcomposer : Fixing copybit render buffer fence closing." 2013-12-10 00:08:14 -08:00