Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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
Xiaoming Zhou
b49438cfd3 hwcomposer: 8x10: increase frame buffer count to 3 for copybit
On 8x10, ppp composition is enabled.  For PPP blending operation,
it can take around 14-15ms. This results that when the frame is
given to the display for rendering, it can happen around the
vsync boundary.   While DMA does the page flipping, it makes sure
it happens on vsync boundary.  However, in the ppp case, the vsync
can be from the previous frame, not the new frame just delivered.
Because of that, there will be tearing.  Increase the buffer count
to 3 will resolve this issue, and improve the frame rate as well.

Change-Id: I53bff1a61b38eaecd286fdbe8a069522e28df6ba
2013-07-05 16:32:05 -04: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
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
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
Naseer Ahmed
72cf9762f8 display: Enable vsync
* Use the vsync uevents from the kernel to start
surfaceflinger composition.
* This patch also does some code cleanup
    - Move copybit specific functions to copybit files.
    - Cleanup verbose logging.

Change-Id: I36936e4b0a082cfb0347d8ee7d2bc936e01808e6
2012-08-14 14:18:03 -07:00
Naseer Ahmed
31da0b1f44 display : Add support for copybit composition
This change add support for copybit composition in display HAL
for MDP3 targets.

Change-Id: I9bc8e40f624b0760f4faa223cb03a13695611bb3
Acked-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
2012-08-14 14:15:51 -07:00