Commit Graph

53 Commits

Author SHA1 Message Date
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
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
shuoy
7c101f9388 hwc:Change the flip value in case of MDP3.0 based target.
When flip and rotation(90) are present alter the flip,
as GPU is doing the flip and rotation in opposite order
to that of MDP3.0
For 270 degrees, we get 90 + (H+V) which is same as doing
flip first and then rotation (H+V) + 90

Change-Id: I89fb4633342ae71bfdaa21837b0f16784e439147
2013-08-26 14:48:57 +08:00
Pawan Kumar
8f45bf6467 hwc: Fix Flicker on video start on MDP3 target
Fall back to GPU on MDP3 when Non WormholeRegion is
not of frame buffer size as artifact is seen in
WormholeRegion of previous frame.

CRs-fixed: 531081
Change-Id: Ic597ee9f75178276dd5498400648bfefc990188f
2013-08-22 11:48:46 +05:30
Linux Build Service Account
c2c6d4df71 Merge "hwc: change error logs to debug logs" 2013-08-16 10:56:11 -07:00
Linux Build Service Account
2198c3c3ca Merge "HWC/copybit : Add support to indicate driver on layer with Zorder 0" 2013-08-15 06:58:52 -07:00
Shivaraj Shetty
e86506ac35 HWC/copybit : Add support to indicate driver on layer with Zorder 0
Some applications send RGBA layer with constant alpha 0xFF and
isOpaque=1. For these types of layer we don't get any wormHole
regions. Hence we see the previous content (framebuffer) due to
wrong selection of blending logic at kernel side.

To fix these kind of issues on MDP3 we make layer with Z order
zero as FG layer. This makes sure that proper blending logic
is chosen in kernel.

CRs-fixed: 521638
CRs-fixed: 517944
Change-Id: I172a46c3284916264a1413a6a16875afea2b1aad
2013-08-14 17:48:52 +05:30
Terence Hampson
663dfa7c0a hwc: change error logs to debug logs
There were error message that should just be debug messages.
These error logs can cause automation testing to fail.

Change-Id: I4ba681a737e8324da9ef8e7984efa57f70ee8637
2013-08-08 12:35:41 -04:00
Radhika Ranjan Soni
46cf4e9ddc hwc/copybit: Use gpu composition for plane alpha
MDP3 doesn't support plane alpha. So falling back to
gpu whenever there is plane alpha in the list of layers.

Change-Id: Iec40e5160f4320b7393d937444645d1a243bd83b
2013-08-08 13:23:11 +05:30
Linux Build Service Account
86354d42f8 Merge "copybit: Ensure that copybit is not generating alpha values" 2013-07-23 13:11:02 -07:00
Linux Build Service Account
10c41265cd Merge "copybit: Pass in proper acquire fence count to blit call" 2013-07-23 13:10:59 -07:00
Terence Hampson
c235bda7c2 hwc: Use gpu composition when there is rotation
Mdp3 has a hw issue where it cannot handle rotation and blending,
when roi height or width is not divisible by 16. When roi is not
divisible by 16 mdp3 would read memory that it is beyond the
image. This leads to page faults, which further leads to poor
performance.

Change-Id: I2cd1b77c21c407503399630cdb702b575aa4e64e
2013-07-18 13:52:17 -04:00
Terence Hampson
b6a123a7c6 copybit: Ensure that copybit is not generating alpha values
When image was being up scaled beyond 4 times and intermediate
buffer is used, alpha value would be 0 in intermediate buffer.
This would then be blitted onto final buffer that contained alpha
value. Since fg had alpha value of 0 entire image would be blended
out.

Change-Id: I6daf03e93719212ee597c218655ae8692ae79e72
2013-07-18 12:25:15 -04:00
Terence Hampson
1d8db6f830 copybit: Pass in proper acquire fence count to blit call
The counter that was incremented when an acquire fence was provided
was not the counter that was passed into the blit call. Due to
blit requests being processed in order that it is submitted, it is
not need to pass in previous release fence as acquire fence for
next blit request.

Change-Id: Ic259af24b33e5e69440d481c92788107ff639bed
2013-07-17 11:28:37 -04:00
Linux Build Service Account
2efdd00340 Merge "copybit: Enable copy bit to use sync pt" 2013-06-06 15:46:23 -07:00
Ramkumar Radhakrishnan
e661f9677d hwc: Fix to avoid heap corruption
- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
  MAX_NUM_APP_LAYERS to avoid heap corruption.

Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
2013-06-05 18:41:47 -07:00
Linux Build Service Account
5153b5836d Merge "hwc: Allow for yuv content to go through ppp on 8x10" 2013-06-04 10:36:35 -07:00
Terence Hampson
d0fd579ab4 hwc: Allow for yuv content to go through ppp on 8x10
8x10 has overlay but it also allows for composition to go through
copybit.

Change-Id: I086aab118b03c1cbc7fa0dbc080ceb906310deab
2013-06-03 11:54:55 -04:00
Terence Hampson
adf4730f2f copybit: Enable copy bit to use sync pt
Since mdp composition is now an async call, the waiting for fences
is now no longer needed inside copybit. In addition, how
composition ioctl is called is slightly different as a result
needing to pass in aquire fences device performing compsition

Change-Id: Ia12dfb2960ba2fc78b14e776984ffe0c3fe45fdb
2013-05-29 09:34:02 -07:00
Linux Build Service Account
c6d6b33d5b Merge "hwc: Do not include Framebuffer area in calculating total area" 2013-05-25 00:00:56 -07:00
Terence Hampson
ef379d4b82 hwc: Do not include Framebuffer area in calculating total area
In dynamic composition, While calculating total render area of
application layers to decide on which composition to choose,
FrameBuffer layer area shall not be added to the total render area.

Change-Id: Ibfa23130864ebae514ab94e75813bfaa4a61528c
2013-05-22 10:14:11 -04:00
Linux Build Service Account
4cf4354f41 Merge "display: Enable copybit on msm8610" 2013-05-21 09:29:00 -07:00
Terence Hampson
0124cc725d display: Enable copybit on msm8610
This change is the hwc and copybit changes need to enable
composition to go through mdp on msm8610.

Change-Id: If0df3a247c5f4f4310966d14fe8fd839bf84b9d5
2013-05-09 16:20:40 -04:00
Sushil Chauhan
b00f59d79e hwc/copybit: Add check for Max layers support.
Add check in copybit for Max. layers supported by HWC. Increase
max. RGB surfaces to MAX_NUM_LAYERS to support known use cases.

CRs-Fixed: 481226
Change-Id: Ie30ab0ef3047a304133cb547902ae11fecc5db22
2013-04-30 16:35:06 -07:00
Prabhanjan Kandula
73030bab82 libhwcomposer: add dynamic thresold support for copybit.
copybit blit may not be effective if data for composition
is high. Add configurable threshold support beyond which
we can avoid copybit blit. set default threshold value to
2 times of fb resolution.

CRs-fixed: 462450

Change-Id: I0ee77ea1d761dc370d82ade1724caefbecfa01f5
2013-03-26 11:27:44 -07:00
Naseer Ahmed
183939dd08 hwc: Add support for clearing with c2d
When blending translucent layers or transitioning with c2d,
sometimes the frame is blended with stale framebuffer content.
Clear the frame with C2D fill surface before drawing.

CRs-fixed: 462461
Change-Id: I1dca477fe88d77f4f0fa4846b155404f348e911d
2013-03-20 14:26:20 -04:00
Naseer Ahmed
64b8121562 hwc: Use intermediate buffers for copybit
The earlier copybit solution involved blitting directly into
the SurfaceFlinger's framebuffer target. That solution involved
unnecessary framework changes and caused issues when the
framebuffer was being written to both by GL and copybit.
Update hwc_copybit to use our own buffers for this purpose.
We also make sure we display only the region we're interested in
so that unnecessary artifacts from previous blits do not show up
on the display. This way, we can avoid clearing the intermediate
buffers every frame.

Change-Id: I713b3fc606e0768444c621af76853ece41964da1
2013-03-01 10:55:23 -05:00
Naseer Ahmed
7421472e5c display: Reconcile display HALs
Make the display HALs compile with/without the Qualcomm BSP
specific features so they can work with pure AOSP.
Change-Id: I1ad7282c4fe1fe7e3309afb530a07735f165ffbe
2013-02-09 08:29:49 -05:00
Arun Kumar K.R
361da4fde0 hwc: Add support for copybit(C2D) composition
- Add CopybitEngine to hwc_context
- draw the layer on the HWC_FRAMEBUFFER_TARGET using
  copybit(c2d) if it qualifies for C2D composition.
- use fence returned from the copybit during c2d
  composition

Change-Id: I052da015cd031f7abd6411d83d7944c335caeff7
2013-01-10 12:29:10 -08:00
Saurabh Shah
661a58f851 hwc: Do not create copybit.
Do not create copybit instance.
Fix copybit init and deinit sequence.

Change-Id: Ia669f4cc89c85294a040400a750aa72a93e579b8
2012-08-31 15:19:55 -07:00
Naseer Ahmed
5b6708ac87 hwc: Update to new API
* Updates HWC to use the Jellybean MR1 API
* Remove qcom_ui which was using parts of the old API

Change-Id: I663363547b193d2318aae88f2256a9baed1e3d4b
2012-08-14 14:18:23 -07:00
Naseer Ahmed
45a9960377 libhwcomposer: Add C2D support to copybit
Change-Id: I2f2c915bb92d5c459428078149a9709356ae83f1
Acked-by:  Neti Ravi Kumar <ravineti@codeaurora.org>
2012-08-14 14:18:18 -07:00