Adjust horizontal/vertical decimation factor for left and right pipe to
the max of horizontal/vertical decimation factor of left and right pipe.
Change-Id: I85055a469f18b07983b6ce73282b8eb83b6334cb
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
Enable POST_PROC flag to update PP features (HSIC/IGC/QSEED2)
info from metadata. Dynamically link ABL library.
Change-Id: Id5d8cf17eccb3ad8f1a671d0f3b5a96a7dbf7c00
Handle return value of validateAndSet so that the error
value doesnt get over written by improper value.
Change-Id: Ib7fde09bfcf80010ba6dab3ef28c589008d2dc50
Remove support for overriding a layer's z to set it up for foreground.
This is unused and can be achieved using pipes staged at required
z-orders.
Change-Id: Ia4688beed770c44c20d201a2dc5687252e002981
1) While setting BWC check for 90 transform and swap crop
2) Calculate decimation in the getDecimationFactor API itself.
Currently, a residual downscale is calculated and the clients have
to take logs and apply forcible decimation like in MdpCtrl
3) Fix bug where transform gets typecasted to bool
b/14225977
Change-Id: I3c99c571e02e2cf7822342516b6a87d97be553d1
Remove usage of scale header and do not create or destroy objects.
the programScale() function exported out of libscale.so will
internally manage objects.
This frees up overlay from relying on scale.h which may not be
exported by libscale.so to a known location if only binaries are
shipped.
Change-Id: If6970541e2eb0ee2bdb907c73ed3534fc22e9dd1
Dump ovinfo only when validateandSet fails due to invalid pipe
configs. Failure due to insufficient resource is common and
dumping ovinfo for such cases wont provide much information.
Change-Id: I9e102cf633bb394603ea2484d80017e4b906b49a
To support interlaced content with 90 degree rotation
width has to be aligned to 4 multiple.
Change-Id: Idaae06f1aa80490ae1b37e148c6d862dc26bebca
CRs-Fixed: 637264
Send the entire frame (array of overlays) to driver, so that it would
check pipes params and the whole frame wrt bandwidth and SMP.
Now, the overlay's commit API just prepares an overlay object but
makes no ioctl calls.
If the driver finds the frame, as a whole, to be not ok, the
validation fails and overlay/hwc return silently.
If a certain overlay object is mis-configured or pipes are
unavailable, the driver sets the number of objects it processed.
Overlay uses this to dump the incorrect config.
Change-Id: Ifb2b7fadc6bd6d9d94a35ba3908fbd832f41447f
Standardize the constructor/destructor init/close of internal
components.
Also internal components are allocated dynamically, with pointers
maintained in parent. This should facilitate gathering internals
from objects into arrays.
Change-Id: I8606fa436cf03fb75e43dc0f8341a05901751a11
* Call overlay_set even if there are no change
in mdp_overlay params.
* Remove mPPChanged and mLkgo variables and associated
functions.
* This is needed because there is no value add in
avoiding set calls when there are no change in params.
This also helps us in avoiding hal hacks where we
need to force call overlay_set due to driver issues.
Change-Id: Ib626acbdce93185ff037c9581d07bbe428f5f159
Forced pipe configs were used during geometry changes to track bandwidth
in driver, which is no longer the case
Change-Id: I49fb1ca1b7173da2e17ccfc8ce9b447152b9b7b6
1. Color layer has a destination rectangle, RGBA color and plane
alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
is passed via the "tranform" member from framework to HAL.
Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
Add support for using scalar calculations from custom library.
The calculation will override pipe configurations if required on
basis of format, scaling, split display etc.
Change-Id: I53c73431b70b5b339ad09c19ac8792f0fc96aaaa
HWC 1.2 API passes down the plane alpha and the blending
operation to apply. Pass this information to the MDP.
Change-Id: I7fbd17345d9157aa654e4b1031ac3e26adf87f37
As MDSS cannot handle 1-pixel downscaling for UI layer, decrease
src crop by 1 pixel in such cases.
Change-Id: Ifc1f3a8e416c48db4b09d2ab0838927952e263ed
Add a BWC policy manager that decides if BWC needs to be disabled on
certain conditions.
These conditions are statically determined. BWC might get used and
still fail (or cause failure of subsequent pipe requests) if SMP
blocks are not sufficient.
Change-Id: I805738911a8da7dfc6232c133c74ef844c3af5b1
MDSS driver requires the crop height to be multiple of 4 to
de-interlace the interlaced Yuv content.
CRs-Fixed: 491488
Change-Id: I9a95392a71cca217e2890c9736f1450fd8aa4a59
There can be frequent failures in pipe config on certain targets
owing to scare SMP blocks. In such cases, reset usage of all pipes;
forcibly configure them next time, even if params haven't changed;
Change-Id: I769513fc3513e292d9d9b7f126735841a7a8f493
In extreme cases, when all pipes are used, the buffer is insufficient.
Reduce logging by striping off unnecessary bytes.
Change-Id: I5a6ffb9ff288e389eea4e9ca4ac850ed59d539ff
Add support for decimation on top of what MDP can downscale,
because decimation can have quality issues.
B-family MDP downscale of 1/4, plus decimation of 1/16 can let
us have a total downscale of 1/64.
Also decimate by 2 (min) if width is greater than what layer mixer
supports and is not handled by the client.
Change-Id: I3b7c4bf321c7561bd98206ad118f4ac1ee2879ae
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
1080p Video on 4k TV:
On newer mdp versions we don't need video destination to be even.
Portrait framebuffer on TV:
The framework chops off texels from RGB layers's crop.
Ref: frameworks/native/libs/gui/SurfaceTexture.cpp#616
When we use getNonWormHoleRegion() in HAL on a 4096 width TV,
we get a final rectangle short by 2 pixels on the right.
When we divide this frame in half for displaying using 2 pipes,
we end up not filling up the left layer mixer upto 2048.
Example:
Tv width 4096. (Portrait display on TV)
Dst left = 1440 (left black bar is 1440 pixels wide)
Dst width = 1214 (ideally should be 1216, but because texels are chopped)
4096 - (1440 + 1214) = 1442 (right black bar is 1442 pixels wide)
When the half width (1214/2 = 607) is given to left layer mixer,
its left (1440) + width (607) comes to 2047, leaving 1 pixel out!
--The texel chopping can be gotten rid of but it breaks test cases
in a way which is difficult to fix.
--The other option is to not use getNonWormHole() but to stick the full
framebuffer on display will increase bandwidth.
--Yet another option is to subtract the left rectangle from 2048,
calculating backwards. This change does that.
Change-Id: I17f3bfd1184bbf8a33d116c288d4cc2c51a3911a
-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
Fix rotator output buffer size for mdp and mdss rotators.
Output size is based on rotated width & height.
Output format can be different than source format.
It could be same if using mdss rot or using fastyuv mode in mdp rot.
Deprecate the static mapping of rotator input and output formats.
Driver will be responsible for correctly populating the dest format that its
wishes to use.
Change-Id: I17352d6d460cac24eb97083aed38668929c66807
* Set mdp source format as rotator output format
rather than determine it from a fixed mapping of
input/output formats.
* This is needed since for the same input format
to rotator, fastyuv mode if enabled may result in
a different output format than the one if the mode
is not enabled.
* Do the inline optimization for rotator where possible
CRs-fixed: 451064
Change-Id: If0bb2f3a44df10968383ab3f5c3625257518934d
Engage the rotator to assist MDP in performing video downscale for
primary and external. This saves bandwidth and avoids causing the
driver to make too many panel mode switches between BLT (writeback)
and non-BLT (direct) modes.
Change-Id: Icfabc2c0f978a23cf96c78a9976cf69cea697b5f
CRs-Fixed: 434852
For YUV only:
Crop rectangle (src_rect) needs to be even for x/y and w/h
Destination dst_rect w/h need to be even (x/y can be odd).
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Change-Id: Ib0c1b7d31773e71d60f080b4beacaa68e32a990e
Draw sequence in hwc_set
--eglSwapBuffers
--wait for fb_post. Its ok to draw to External only at this point.
--draw to external | Parallel with PAN
--commit to external | Parallel with PAN
--wait for pan (happening in fb_post) to finish.
Call MSMFB_OVERLAY_SET ioctl only when params change.
These thing together ensure a correct sequence and should fix tearing and
stuttering, the latter assuming there are no other display pipeline delays.
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
Ensures that reset and mFd.Close is always called when MdpCtrl
and MdpData are closed down.
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Change-Id: I775ba7cfe45c67e6acf874e3f4e8b4fa6fbe33b8
Camera client doesn't factor in the 90-rotated source when setting the flip
Switch the flips when the source is 90-rotated.
Change-Id: Ia5f18afff4384a33b8ad2ca051be1a120aefa4d5
Acked-by: Kinjal Bhavsar <kbhavsar@codeaurora.org>
* Fix memory leak during copying pipe objects.
* Remove unused / unnecessary code.
* setMemoryId API is merged with queueBuffer.
* setParameter API is setTransform now.
* Rotator upgraded to:
--Allow different rotator hardware types.
--Remove dependency on MDP code.
--Allocate memory only during first playback,
close when the associated pipe is closed.
* Have single commit implementation.
* Include new format types.
* Remove WAIT and CHANNEL enums and usage. Replace BypassPipe with
GenericPipe. Client expected to set alignments and parameters.
Add transform combination enums.
* Allow APIs to be called in any order. Do transform calcs in commit.
Move ext type setter and getter functions.
* Add calculations for 180 transform.
* Add secure session support in rotator
* Implement all rotations in terms of H flip, V flip and 90 rotation.
Change-Id: I34a9a2a0f1255b3467a0abbaa254d0b584e901ce