Reset format type to FORMAT_NONE to select the pipe irrespective of
the format specifed by the client. This is required for the device
where SMP starvation is unlikely, we need not keep track of formats
programmed in the pipes to avoid potential pipe crunching.
Change-Id: Ifc00549802ca66936e171d00020124d3bcb60e0a
Not necessarily the max width supported by the MDP pipe and mixer
need to be same. HWC has to make the decision for using one OR
two pipes per layer only based on the max width supported by the
pipe not the mixer.
Change-Id: I5a2495d07de1b6f54ef64d9140c909f0f4cef914
The driver now sends the actual usable mixer stages, so no need to
deduct the STAGE_UNUSED and STAGE_BASE.
Change-Id: I3690d10b5ccf83cab499871479768fcd5cdb2a4e
- Read MDP sys_fs node for blending stages supported per mixer
instead of hard cording the value. This makes the implementation
scalable across chipsets.
- Add binder support to change the max pipes per layer value
dynamically for MDP comp.
Change-Id: I3b83f4bdc2e2e81ca55c54fc6bcfd61c55fef501
--In "always_split" mode, split FB only if the updated portion of
FB's width is less than mixer width
--While deciding whether or not to allocate the 2nd pipe, account
for 90 transform in crop width
--Crop minimum width limitation of at least 5 pixels does not apply
to targets after 8974 v2.
Change-Id: I83b4690216a75c0d57e7e4e7b18b4531bb22df05
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo
Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
Set this property persist.hwc.pubypass to forcefully disable Partial Update
and enable testing of post processing features.
Change-Id: I1e0c2f9f091b8186d5939ecbafdd4ea60de92361
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
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
Source Split layers always if the driver indicates so by setting
the src_split_always in the capabilities sysfs node.
This is applicable to layers whose width > mixer's width, since
MDP clk rate is dependent on max(mixer_width, layer_width).
This feature can be enabled if the panel height is more than a
certain empirically derived value. Splitting always in those
cases can help with a lower voltage.
Change-Id: If9b33f11ca4132eb77416c26819f7473c65d3b08
For panels that cannot accept commands in both the interfaces, we cannot
send two ROI's (for each half). We merge them into single ROI and split
them across lSplit for MDP mixer use. The ROI's will be merged again
finally before updating the panel in the driver.
- Reads panel property of dual control path.
- If dual control path not supported, merge ROI's before
analysing for composition strategies.
Change-Id: I67e361a299dc5d1adb28b180900e24633eefc4a8
Some of the definitions may not be present on AOSP builds while
other may. Check each definition to be sure.
Change-Id: Ia3cf8f024a3a6b6633a3be4646579f6cde0d5580
- Add utility function for 8x16
- Add internal function to identify if RGB doesn't
support scaling that is read from capabilities node.
- If UI layer needs scaling and RGB pipe doesn't
support scalar, request a VG pipe
- On 8x16, request DMA pipe for WFD
Change-Id: I94e8e0371bb10fcad53fddd2b7c45bc9b2594a4d
Add support for SourceSplit. The mixers are abstracted from hwc.
There would be no translations to mixer understood destinations.
1) If a layer's crop and position are < 2048, only 1 pipe can be used
irrespective of position.
2) Else 2 pipes can be used with the layer equally split, without
regard to position.
Change-Id: I501a53838d147887c1e2299366663e05320d5096
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.
Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
Some frameworks override malloc() and free() but not getline().
Pre-allocating the buffer avoids heap mismatch on free().
Change-Id: I9bd934f701ad7dbc10ec2aa21967e2a626c496f4
Currently HW revisions are maintained separately between kernel and
user-space. To optimize this there will be single place, exported
msm_mdp.h, where HW revisions will be maintained.
Change-Id: I815eb9bd32f17928356e58a38260cee69b019a8b
Macro tile is enabled only if all the conditions are met:
1. GPU hardware should support Macro Tiling.
2. MDSS hardware should support Macro Tiling.
3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
GRALLOC_USAGE_SW_WRITE_OFTEN.
4. RGB 16bit and 32bit formats.
5. persist.hwc.macro_tile_enable flag should be enabled.
PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.
Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
- Expose API to get maximum upscale value supported by MDP
- Check for MDP limitation before programming pipes
Change-Id: Id9faac54a7b3e393b6c4b60574e5e985b495bf59
Add device version inline checks for hardware devices.
Also fixes the issue of 8084 being treated as 8974v2
owing to the expanded range.
Change-Id: Iaeefb505e14e022b6e542daa8b84a87a22e7f69a
Parse low and high bandwidth from mdp capabilities sysfs node
/sys/class/graphics/fb0/mdp/caps
This will be specified in kbps.
Conflicts:
libqdutils/mdp_version.cpp
Change-Id: I2956e340106d47bb49f5744e4f9a4a0bb796f6e3
1. MDPVersion class can query the capabilities using sysfs node.
Since sysfs node can be read with out opening framebuffer, it is no
longer required.
2. New internal functions updatePanelInfo, updateSplitInfo are added.
Change-Id: If506e600fb14401d8bf2361aac969c7e29a5d50a
Metadata ioctl approach has limitations with respect
to adding new capabilities in MDSS driver.
Use sysfs node mechanism to obtain MDSS capabilities.
(sysfs node: /sys/class/graphics/fb0/mdp/caps)
Change-Id: Id7fe683c85b3acf182920d28abf62e9826ff1161
String should have null character at the end, otherwise
functions like atio may not work on the string properly.
Change-Id: Ib3eb579a5a96dbd121bf6f65b09fa19ec7e274f3
CRs-Fixed: 546662
During surfaceflinger initialization, the first fb open
call comes from the MDP version check. The MDPVersion
class implements a singleton object, which open and close
the fb device. This initial fb open and close will trigger
the kernel driver to turn on and off the display, which
results two side effects: 1) extra delay in the display on,
2) one flicker when the display is turned on and off.
The change is to close the fd handle in the destructor.
Change-Id: I2ee5cfc78cbb613ed1326d9f7c26cbca97406163
Add support for unevenly split primary displays.
The driver provides info about the split via msm_fb_split sysfs node
For external we assume even split. If driver doesn't specify any split
for primary, we default to even split.
Change-Id: I4d541f41de2d7a5d2b62653fa33cab079a6d5d30