Commit Graph

83 Commits

Author SHA1 Message Date
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
Prabhanjan Kandula
5719da4034 hwcomposer : Fix copybit render buffer fence usage.
Fixing array size to hold fence fd to count of render
buffers used in copybit and use it to store
fence of corresponding render buffer at the index.

Change-Id: Ic5e7f264c2a81ded2a0f61ef138e59a093b0023a
2013-11-17 15:16:14 +05:30
Sushil Chauhan
943797c361 hwc/copybit: Add Color layer support in MDP Copybit composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL
   denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode.
2. There is no color member in HWC layer, so RGBA color value is
   passed via "tranform" member from framework to HAL.
3. Update HWC query to enable framework to query for Color layer
   support in HAL, at run-time.

Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
2013-11-13 10:13:19 -08:00
Saurabh Shah
62e1d731cd hwc: Bump up version to 1.3
Increment hwc version to 1.3.
Create and use a converter from float source crop to integers.

Change-Id: I5e185195c975b3a9434c5d9dce9ae4757ff98739
(cherry picked from commit 7e5637c850bcdbe21784ca3bfa9668870306adff)
2013-11-08 15:17:33 -08:00
Linux Build Service Account
901cb1ac82 Merge "hwc: remove gpu fallback when there is rotation" 2013-11-04 08:45:52 -08:00
Linux Build Service Account
62abe02f12 Merge "hwc: Ignore force overlay_set on mdp3 targets" 2013-11-01 18:12:19 -07:00
Terence Hampson
65fe4522cb hwc: Ignore force overlay_set on mdp3 targets
Since mdp3 only has one dma pipe for overlay, which in the driver
is just a sw overlay, there is no need to force a overlay_set call
when HWC_GEOMETRY_CHANGED is set.
Also we are moving the wait for distination buffer fence to
wait inside the blit call for mdp3.

Change-Id: Id0aed8732dc49b1041d8174a5ff38703c8023abf
2013-10-24 13:55:11 -04:00
Ramkumar Radhakrishnan
92f3abe485 hwc: Add support to smooth streaming feature.
update the source video width and height set by the video decoder
for secure video smooth streaming usecase from metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
2013-10-23 11:59:48 -07:00
Sushil Chauhan
1f6d68fce6 hwc/copybit: Handle "R/B swap" for RGBA and RGBX color formats.
1.Framework notifies HAL with "HWC_FORMAT_RB_SWAP" layer flag to handle
a limitation where R and B components were swapped in Rendering phase.
2.Add "R/B swap" in hwc query to enable framework to query for support
in display HAL, at run-time.

Change-Id: I3b44d15b51b4f24939048fee9d1bac2b9009c97c
2013-10-18 13:58:16 -07:00
Terence Hampson
3c560b96fd hwc: change error logs to debug logs
There was an error message that should just be a warning messages.
These error logs can cause automation testing to fail.

Change-Id: Ifb205d9f893012e9693628fcd24b2493d7ea51b8
2013-09-20 14:54:03 -04:00
Terence Hampson
b102193942 hwc: remove gpu fallback when there is rotation
A sw workaround was created in mdp3 so composition of layers with
rotation and roi that is not divisible by 16 is now possible to
be done by ppp.

Change-Id: Iada3707da1b85e58dad398b8271d7a26725e0d22
2013-09-18 11:15:19 -04:00
Linux Build Service Account
e25cab4cf6 Merge "HWC/copybit::Add condition for video layer composition" 2013-09-03 11:40:12 -07:00
Linux Build Service Account
a71411f6ec Merge "hwc:Change the flip value in case of MDP3.0 based target." 2013-09-03 09:41:48 -07:00
Radhika Ranjan Soni
14f6c4b3ca HWC/copybit::Add condition for video layer composition
In case of non overlay target composition of the video
layer should be based on composition of UI layer as well.
(if taget has dynamic composition)

Change-Id: I6f312978f9168dddcf6ad0b1ac72f347b94d6920
CRs-fixed: 516630
2013-08-30 23:09:29 +05:30