Enable MDP Downscale feature for primary resolution greater than
2048 only for the targets that supports source split.
Change-Id: I21871b099f74543aa8c2416bac41e3a16d4ce72d
1. Detect and account the number of secure RGB layers present.
2. Mark secure RGB layers for MDP comp in cache based stratergy.
3. If full MDP comp and partial MDP comp fails, Mark secure RGB
layers for MDP composition.
4. In partial MDP comp reject load based composition, if secure
layer is present to avoid GPU composition.
5. Disable idlefallback feature if secure RGB layer is present
to avoid GPU composition.
Change-Id: Idb4c4f09b081ec20240a2602aa3f20332fa49ad6
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
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
* A non-updating layer requiring rotation, can make use of
the older rotator buffer written when the layer got first
updated, rather than invoking a new rotator cycle.
* A rotator play is avoided in cases where incoming layer
buffer fd, offset, whf, src-rect, dst-rect, etc are similar
to that of the previous input layer to the rotator.
* For ex: In a usecase where video layer updates happen at
30fps and all other asynchrous UI updates happen at 60fps,
instead of the traditional 60 calls of rotator play per sec,
we now do only 30 thereby saving rotator bandwidth.
* Property "debug.rotcache.disable" can be used to disable
this feature.
Change-Id: I1d1c352c63007b7e0b4fee40882086ccd2f5a4aa
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support
The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.
Smaller downscale is used if we need to chop off any more than 1
line or pixel.
Change-Id: Id07d62fefa3213035f16cca49497800716484a95
* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures
* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP
Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
Read the maximum width mixer can output from drivers
and consider this in identifying if dual pipes are required
to support a layer. So far above 2K dimensions we are using dual
pipes, but 8x39 mixer output can be upto 2560. So there is no
need of dual pipes as long as pipe data is less than this limit.
Compare layer/panel resolutions against this limit to deduce
if there is a need for dual pipes or split.
Change-Id: I52e1d28e381327d4f0b00f5ea8547c1e6157313c
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
* This reverts commit 52b4fdbdbd.
* Since DisplayDevices are not created for non-wfd virtual
displays(CTS/SR/SSD) anymore, we can remove these checks.
Change-Id: I9249a70c6d6f6b42f268e6ec8a28c0a86b954c4e
Currently for Mdss rotator we manipulate the layer buffer dimensions
to be equal to what rotator's destination dimensions would be, so that
these could be fed to MDP. Instead, this patch introduces APIs in
rotator so that hwc can directly query destination crop, width, height,
format from rotator.
This also simplifies the updateSource() and configRotator() helpers.
Change-Id: I501d998f2e0574683c764af9422742b2426ba0c7
viewFrame for primary display will always be full screen, hence
initialize it to primary resolution
Change-Id: I0f6ce79a9af6eac9b7b8a684c5b690c8b4a9e760
- 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
This change closes the release fence fd in the event that
a failure occurs during the buf sync ioctl. This is additional
sanity to ensure that we are not leaking any fd's in userspace.
Change-Id: Ic303aa2a2ed20244605b0f0bd91145e8f3fc8f1b
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
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5
Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
Define binder interface setViewFrame to set view frame information
of a display by surfaceflinger when projection for that display
changes.
Change-Id: If737b51ae0f04303a1a29c91a9703f64354b61fb
1. Add hook to dump the layers going to VDS based virtual display.
2. Furthermore, add utility function to dump the frame buffer and
WB output buffer. This will be enabled via a system property
debug.hwc.enable_vds_dump
Once dumping is enabled, the dumps can be extracted from
/data/vds.fb.FORMAT.XRESxYRES.raw
/data/vds.wb.FORMAT.XRESxYRES.raw
e.g. vds.fb.MDP_RGBA_8888.1152x1920.raw
Change-Id: I2435c5507961a52929411206892c005492d5c193
FLIP flags need to be considered while calculating srcCrop and
displayFrame even when a layer is updated partially on dual DSI
panels.
Change-Id: I097b3335e66566d6639848bc8f8382bfeabb7f54
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
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
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
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.
Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.
Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.
Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
Pass the acquire fence count to driver on a buffer sync ioctl call
for the rotator. The count is always 1 since the ioctl is called
once per rotator session. This also means that the rotator has to
wait for only 1 layer always.
The earlier assumption that in the presence of a session id, the
acquire count would be NOP, does not seem to hold with the driver.
Change-Id: I986a436194c66e8ce2a2afb363627f72dc6e20cd
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.
Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.
* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.
Change-Id: I1726caa4634f72d781561e797078648524ea2eef