Commit Graph

101 Commits

Author SHA1 Message Date
Linux Build Service Account
9659a6a7ad Merge "hwc: Simplify vsync code" 2013-05-17 06:43:42 -07:00
Linux Build Service Account
b27da8ff97 Merge "hwc/overlay: If configRotator fails, mark all pipes as available." 2013-05-17 04:15:21 -07:00
Linux Build Service Account
cc8c72deb8 Merge "display: Remove default arguments for setMdpFlags function." 2013-05-17 04:13:12 -07:00
Sushil Chauhan
bd3ea926be hwc/overlay: If configRotator fails, mark all pipes as available.
If configRotator fails, reset usage & allocation bits on all pipes
for the given display to make them available for the current draw
cycle. It is required because if external is connected and Rotator
commit() on Video fails, all pipes which were picked-up by primary
are not available for FB update, hence it runs out of pipes.

CRs-Fixed: 483002
Change-Id: Ifd0d708e4ef8e3ddbe9d0531f6090539b8dcb249
2013-05-15 14:56:31 -07:00
Ramkumar Radhakrishnan
9d52f4395f display: Remove default arguments for setMdpFlags function.
Remove default arguments from setMDPflags function to get rid of
issues hidden from the developer.

Change-Id: Ic78645675b0aaab284fe2d0de8fffb4b26beabc7
2013-05-14 14:46:59 -07:00
Sushil Chauhan
1cac81521d hwc/overlay: Crop x, y, w and h should be even for MDSS Rotator.
MDSS driver requires Rotator crop x, y, w and h to be even for YUV
formats.

CRs-Fixed: 485216
Change-Id: I9a066970f8cedaed7ba18534bb99edd1bcf421dd
2013-05-14 00:01:50 -07:00
Naseer Ahmed
8bb8f9de3b hwc: Simplify vsync code
Handle the wait properly in the kernel and remove unnecessary
thread signaling.

Change-Id: Iff05825a7a85d0353f3feb64e7f9a06cedab7869
2013-05-13 17:38:26 -04:00
Ramkumar Radhakrishnan
59a110773c hwc: Do not show animation on External display.
- When primary is animating, the animation should not be
  shown on the external display.
- Mark all app layers as HWC_OVERLAY on external during
  animation so that SF wont compose it on FB.

Change-Id: Ic557cabfd9f2518614777c0e993541e36e090850
2013-05-11 18:37:37 -07:00
Arun Kumar K.R
ffef74885b display: Add support orientation control on ext display
- The required orientation on External can be set using the
  properyt sys.ext_orientation.
- Values can be HAL_TRANSFORM_ROT_90, HAL_TRANSFORM_ROT_270
- According to the value set, the FB_TARGET for External will
  be rotated and positioned as per aspect ratio on Ext
- For YUV(video layer) it just calculates the position, as the
  rotation should be the source orientation
- This feature is supported only for low resolution panel.

Change-Id: I3d532ee0cb8dca3c37869537b55cd8044fd9047e
2013-05-11 18:16:46 -07:00
Arun Kumar K.R
a2978452bd hwc: Add support for EXT_ONLY Layers
If there are any EXTERNAL_ONLY layers present in the list, mark
them as HWC_OVERLAY such that SF does not compose and in hwc_set
post that layer to Ext display, ignore other layers

Change-Id: Ic5db3bfa88295167d23d1fb2be7640c9fc772054
2013-05-11 18:05:40 -07:00
Ping Li
9404e2a474 hwc: Add property to differentiate the input image format
Set different vaules to property hw.cabl.yuv based on the input
image format, so that mm-pp-daemon can adjust CABL power
saving levels accordingly.

CRs-fixed: 464799
Change-Id: I212035d387a975e61a08749ba118a9da30e18d81
2013-05-03 13:00:49 -07:00
Linux Build Service Account
cc796a207e Merge "liboverlay: Add support for MDSS Bandwidth Compression" 2013-05-01 12:03:01 -07:00
Linux Build Service Account
c4c8c668ef Merge "display: Fix Bug in 180 degree rotation use case for 4kx2k panel." 2013-05-01 12:02:56 -07:00
Linux Build Service Account
1784f4a142 Merge "hwc: Fix right mixer layer positioning." 2013-04-30 23:09:19 -07:00
Ramkumar Radhakrishnan
fe7ce80e8a display: Fix Bug in 180 degree rotation use case for 4kx2k panel.
Check NULL condition for pointer to rotator object to swap
configuration information between right and left mixer.

Change-Id: Ib23552efcb7807164a33f618f7ff41c469661cb5
2013-04-30 11:38:59 -07:00
Sushil Chauhan
bab187a53e liboverlay: Add support for MDSS Bandwidth Compression
- This adds support for Bandwidth Compression.
- If MDSS supports BWC, then we set BWC flags
  to both Rotator(encode) and overlay(decode)

Change-Id: I6f7800716a2ce2ab855f4c0b1a53cd96f7d06d74
2013-04-29 13:51:44 -07:00
Linux Build Service Account
4bc32bdf74 Merge "display: Enable more Debug logs." 2013-04-29 13:42:52 -07:00
Ramkumar Radhakrishnan
b32a0bc134 display: Enable more Debug logs.
- Dump more info for BUFFER_SYNC ioctl failure case.
   - Enable debug logs for blank/unblank display.

Change-Id: I289ed8ad39a0181ff4a404644b90cb02a8144b9a
2013-04-29 11:02:04 -07:00
Sushil Chauhan
80fc1f95f0 hwc/overlay: Set crop rectangle for MDSS Rotator.
Since MDSS rotator will crop, the crop rectangle for overlay
will always start from (0,0).

CRs-Fixed: 476494
Change-Id: I1ccece8eab7d1a97ccec561a4d0df4558b5e33c4
2013-04-26 13:38:54 -07:00
Saurabh Shah
baa68983ce hwc: Fix right mixer layer positioning.
Fix positioning of layer on the right mixer, by making it relative to
the half width of total panel.

Change-Id: Iecbe4496db1faae426b2606118ccaab90c1e4fca
2013-04-26 09:55:29 -07:00
Saurabh Shah
0ceeb6ad01 hwc/overlay: Introduce padding round between DMA modes.
Introduce a padding round between the DMA line and block modes.
Do this based on whether DMA is actually being used, when block mode
is first requested.

This relieves the driver of doing an UNSET ahead of vsync which could
cause blinks in all such transition scenarios.

This approach should lead to smooth transitions for multiple targets
with the exception of secure videos, where there could be a blink in
any of the different approaches we use.

Change-Id: Ibc0b8d284b5c6ed9291a7cfa7e7f221300a921e2
2013-04-24 10:33:58 -07:00
Linux Build Service Account
722b477e9b Merge "libexternal: change action safe property to persist" 2013-04-23 22:23:34 -07:00
Arun Kumar K.R
4d73d64744 libexternal: change action safe property to persist
It is more probable that end user always use same TV to connect.
Hence make the action safe property persist, so that it is
persistent across reboot
Also, change property to sys. from hw. so that hwc can write

Change-Id: I5a77156012d121e28d1adbadb9162fcdf7ca3edd
CRs-fixed: 472431
2013-04-23 18:12:05 -07:00
Sravan Kumar D.V.N
78f51e7050 hwc: Close Fds in case of errors in openFramebuffer
Close opened Fds in case of errors in openFramebuffer
function.

Change-Id: Ifd80adf1eff0d2efd698cd4abd3980d5c1f333ab
CRs-fixed: 473488
2013-04-23 07:33:02 -07:00
Saurabh Shah
85234ec2ec hwc/overlay: Fix dma mode design and issues.
Add support for tracking the mode in which DMA is being used in overlay.
Remove unnecessary tracking variables, and their set,reset inconsistency.

With such varibles in hwc, it still leads to overlay giving out DMA pipes.
Make overlay as the single tracking place.

Change-Id: Ib949f3d0ef5918ef323c81cb1768b68a68c83da4
2013-04-15 10:10:43 -07:00
Linux Build Service Account
3dda2a0953 Merge "overlay: Swap flips on 90 only for older mdp version." 2013-04-12 23:18:36 -07:00
Ramkumar Radhakrishnan
d224a1a2db libhwcomposer: Log and dump app layers of screen frames
Log a frame-by-frame succession of HWComposer layers' data and write
their buffers, if any, into raw or png files based on system property
values.

Change-Id: Icceccf5fff5ab4d78dbc6c28c11210b8837ddfd9
2013-04-11 14:47:14 -07:00
Saurabh Shah
d1a2278d97 overlay: Swap flips on 90 only for older mdp version.
Older mdp rotator does 90 first and flip next,
forcing HAL to swap flips, in presence of 90.

Newer mdp does flip first and 90 next, owing to DMA pipe.
(Also similar to GPU flip handling). So we can pass flips as-is.

Change-Id: I379509a07e45966262005666e7727e7923079d3a
2013-04-10 16:41:46 -07:00
Jeykumar Sankaran
85977e3abe hwc: Implement mixed mode composition.
With this change we are moving  MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.

        - Mixed mode design is based on layer caching
        - Mixed mode path is configured only when non-bypassing
          layers are cached.
        - Never allow mixed mode when FB needs to be  udpated.
        - If we cannot bypass all MDP comp marked layers, bail
          out completely.

Change-Id: Ie08f39db07e032b537f042d0d2bfe772ebfed049
2013-04-08 11:36:03 -04:00
Linux Build Service Account
32085b7ce1 Merge "hwc: Use correct z-order in video overlay" 2013-03-29 11:17:36 -07:00
Naseer Ahmed
7a4287cce8 hwc: NULL check on buffer handle
In some cases it is seen that we receive a NULL handle on
suspend/resume. One such test case is open browser, suspend
device, resume device, unlock screen. Since we rely on the handle
to get the format, make sure it is not null.

Change-Id: Ia476887a831df33a50b2939a46c143b9c207ea9b
2013-03-28 12:09:20 -04:00
Linux Build Service Account
f77af57636 Merge "hwc: Add MetaData support in overlay path." 2013-03-27 12:56:17 -07:00
Linux Build Service Account
4705583660 Merge "libhwcomposer: add dynamic thresold support for copybit." 2013-03-27 01:06:57 -07:00
Sravan Kumar D.V.N
b5ed029da8 hwc: Use correct z-order in video overlay
Set z-order of video layer to 0 and framebuffer to 1 in case
of video overlay composition so that the blending takes effect.
Also set is_fg OFF for framebuffer.

Change-Id: I05f930074d265d690f29a1003b7c28077df89bbf
CRs-fixed: 458180
2013-03-26 16:32:42 -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
Sravan Kumar D.V.N
075ef00219 hwc: Fix alpha downscale check for mdp composition
Do not allow mdp composition when any layer format has alpha channel
and needs scaling as the VG pipes are not supporting alpha downscaling.

In few scenarios, at the beginning/ending of animations Surface Flinger
passes few frames with flag HWC_BLENDING_NONE though it has Alpha.
When such layer passed to VG piple and if needs scaling , it results in
flicker. Hence, just checking for HWC_BLENDING_NONE is not enough.

Change-Id: I70fdfe4547df6fe7b2771ed8042f43aa4e07a71d
CRs-fixed: 462508
2013-03-26 11:26:38 -07:00
Linux Build Service Account
22dd8e7ef2 Merge "hwc: Add DMA pipe support in MDP composition." 2013-03-25 16:25:38 -07:00
Saurabh Shah
5daeee5bcf hwc: Add MetaData support in overlay path.
DONE:
    1. HSIC(SPA) test.
    2. IGC R/G/B channel test.
    3. QSEED2 sharpening/smooth test verified through register value check.

Change-Id: Ia9472f489c013df22a3411eeaac3c8d1e6e22ac0
2013-03-23 04:53:38 +08:00
Arun Kumar K.R
0e8efb8afd hwc: fix dst calculations for right mixer
The calculations made for the right mixer was not correct,
fixed it for both FBUpdate and video usecases

Change-Id: Iff2c296321bce14b776731528fff6f1d255d829a
2013-03-22 13:11:24 -07:00
Jeykumar Sankaran
a37fdbf2ab hwc: Add DMA pipe support in MDP composition.
This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.

Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
2013-03-22 10:54:22 -07:00
Linux Build Service Account
0ebd0cd967 Merge "display: Fix merge issue in jb_mr1" 2013-03-21 16:47:12 -07:00
Naseer Ahmed
66e9788c6c display: Fix merge issue in jb_mr1
Slightly different version went on jb_2.5 which caused a
mismatch. Escaped testing because FB HAL is not used.

Change-Id: Ia7ee2fb80bf937499d372383641f71530dc1feca
2013-03-19 20:42:11 -04:00
Linux Build Service Account
dc7e3fe018 Merge "display: Remove framebuffer HAL usage" 2013-03-18 23:09:37 -07:00
Jeykumar Sankaran
c1f8682f7b display: Remove framebuffer HAL usage
This patch removes the usage of the framebuffer HAL which is
deprecated in JB MR1 onwards. The code is left for compatibility
such as conformance tests but it is unused for normal display
usage.

Change-Id: If98133bdaa759cdc41d4503ff695b225ee43cb6f

Conflicts:

	libhwcomposer/hwc_utils.cpp
2013-03-18 16:38:54 -04:00
Saurabh Shah
76fd655c28 hwc/ov: Fix MDP orientation flags and values.
--Fix MDP_SOURCE_ROTATED_90 removal.
Since mdp flags are updated fresh each round,
this flag should not be removed if there is no 90.
If pre-rotation is used, this flag is set by hwc and removed here.
(Affects anything having a 90 component in transform)

--Provide MDP adjusted transform to prerotation calcs.
Clients on Android don't switch flips if 90 component is present,
but expect the output to be that way. (camera)
We do it in HAL and then calculate final crop for MDP.
(Affects anything using 90 + Just 1 flip i.e camera)

--Pass 0 transform to MDP even for flips, since we
prerotate if there is 90 with flips or use MDP to flip via flags,
so no need to flip transform calcs.
(Affects anything using just flips).

Change-Id: I115a82ee4558794db0b6b641710494b9007d6f54
2013-03-15 18:01:52 -07:00
Sushil Chauhan
07a2c7660c qdutils: Retrieve MDP revision and pipes information from driver.
Userspace can retrieve MDP revision number and number of different
types of MDP pipes (RGB,VG,DMA) information from driver. Add target
specific flag as previous MDP versions do not provide this support.

- Make use of this information while maintaining PipeBook.
- Move PipeBook related functions from overlay utils to PipeBook.

Change-Id: I46578bb27e515c4b9525d90b6619c11d7749914f
2013-03-14 11:43:42 -07:00
Saurabh Shah
acf102021a hwc/overlay: Video on 4k2k external, 4k2k rotation.
-Add support for Video via overlay on 4k2k external panel.
-Add support for rotating videos on 4k2k panels. We use
pre-rotation in hwc to rotate a video into a single buffer,
irrespective of panel size. Then this buffer is fed to MDP.
Rotator objects are managed by the new RotMgr.
-Cleaup mdpcomp and overlay.

Change-Id: Ifb08534747e8e18b6c58dd8a3e1a9947409100f1
2013-03-13 10:24:31 -07:00
Naseer Ahmed
56601cd508 hwc: Check for correct screen state before enabling vsync
Sometimes vsync would not be disabled before the display is
blanked.
This was due to the vsync disable ioctl being kicked off in a
thread different from the event control which surfaceflinger
called. So, while the calls from surfaceflinger are in order, the
order of execution wasn't always the same. Hence, making sure
ioctls are called in the same context to ensure order.

Also
- Make blanking/unblanking logs show the operation as a string.
- Add a debug property to dump vsync timestamps (needs framework
reboot)
- Remove a log which showed delay in reading vsync. This log was
unreliable when vsync is disabled and we're still reading from
the sysfs node.

Change-Id: Ibec04e9ffebd0ac6e1d32b7031e3668abd9390ff
CRs-fixed: 443113
2013-03-11 15:45:33 -07: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
Linux Build Service Account
db770e203f Merge "libhwcomposer: MDP composition for Higher Resolution panels" 2013-03-01 03:15:17 -08:00