Commit Graph

96 Commits

Author SHA1 Message Date
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
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
Sushil Chauhan
dffbf4314c hwc/copybit: Fix the wrong layer transform check.
At 90/270 degree rotations, if there is vertical or horizontal flip in
layer transform, it is wrongly interpreted by display HAL due to wrong
check. So Copybit destination rectangle width & height are not swapped
which leads to unwanted out-of-range scaling.

Change-Id: Ib917b907d1284b91b7d6c25038050bbcb503a792
2013-12-09 15:33:57 -08:00
Linux Build Service Account
1dfaed1ca4 Merge "copybit: Set default value on COPYBIT_TRANSFORM for Color layer." 2013-12-07 23:19:28 -08:00
Saurabh Shah
220a30c282 hwc: Do not use fb handle in hwc_prepare
Do not use fb handle in prepare. Use displayFrame for dimensions,
align them and hardcode format

Change-Id: I5c494a74a807d3a52a1c88257494b58c583700f5
2013-12-06 16:04:17 -08:00
Sushil Chauhan
2babecc511 copybit: Set default value on COPYBIT_TRANSFORM for Color layer.
1. For Color layer, set zero transform value on COPYBIT_TRANSFORM
otherwise it causes MDP IOMMU page fault at 90/270 degree rotation.
2. Color layer is part of Copybit context list, so no need to call
msm_copybit() explicitly for it, that will be called during flush.

Change-Id: I4421b4bddfeca56b0ad8534d921c3d743a7d92bb
2013-12-04 18:39:11 -08:00
Ramakant Singh
f2b51e6cce copybit: Use rounded integer crop value.
We are getting floating crop value in layer
but need to convert as integer for MDP.
Change-Id: Id1de7f61804295df40f3f699446c69860752b867
2013-11-28 12:18:50 +05:30
Radhika Ranjan Soni
d8d8f33f9a hwcomposer : Fixing copybit render buffer fence closing.
While closing the fence, correct index is not used.
Fixing the same.

Change-Id: I654ec4e649c247dca9c038e5b15184a01833bdc4
CRs-Fixed: 578408
2013-11-22 14:51:29 +05:30
Linux Build Service Account
cdfc45d4d5 Merge "hwc: Fallback to gpu comp when copybit cannot handle scaling" 2013-11-21 23:15:37 -08:00
Terence Hampson
6b0a42708a hwc: Fallback to gpu comp when copybit cannot handle scaling
For MDP3 we cannot support scaling more/less then 4 times. Copybit
will use intermediate buffer to run scaling operation between 4
and 16, by going through MDP3 twice. But will not continue to do
so for scaling factors greater than 16 because operation takes too
long. It is in this case that we will fallback to gpu composition.

Change-Id: I99c05f6c70307823d0497cc8f9469bcc15178fea
2013-11-20 15:03:45 -05:00
Linux Build Service Account
b00ab3a987 Merge "hwcomposer : Fix copybit render buffer fence usage." 2013-11-20 06:14:17 -08:00
Radhika Ranjan Soni
2dc1310d5a Revert "hwc: Fix Flicker on video start on MDP3 target"
This reverts commit 8f45bf6467.
2013-11-18 05:20:03 -08:00
radhakrishna
2f00c8f9ae display : Add wormholeRegion Calculation
For copybit cases we should clear wormhole region
rather than nonwormhole. Adding support to calculate
and clear the same.

Change-Id: Ie85d1b484174199e35f43ce95b30de1fac9c30b2
2013-11-18 05:19:53 -08:00
Ramakant Singh
613e357e6a HWC : Add support for solid fill color
We are using the solid fill feature for
clearing the wormhole region using black
color.
Using the src buffer same as dst buffer to
avoid kernel checks for this use case.

Change-Id: Ia46aded9b067ece83c9df1f2c2cdd6b017fa64ea
2013-11-18 13:35:08 +05:30