1.Select the smaller downscaling ratio for both sides as
rotator needs do the same downscaling for both direction.
2. Use rotator to do the minimum downscaling first to get the
best quality. Use decimation when rotator downscaling is
not enough.
3. Assign z_order when doing resource configuration.
4. For non src split case, if two pipes are on one mixer,
need make sure right pipe has the different z_order.
Change-Id: I1b829545053c2b719da8b6b42c1e5341a5040bcc
1. Set the power mode for virtual display while setting power mode for
primary, as surfaceflinger does not invoke SetPowerMode() for
virtual display.
2. Invoke null commit on each display to release all the pipes connected
to it on SetPowerMode().
Change-Id: I8992850a7acbfdf8ab0de3216d92cf4f28fbaaeb
1. Align rectangle to be even for video format input.
2. Align width and height for rotator downscaling case.
3. Validate scaling again after config is done because scaling ratio
might be changed.
4. Make sure layer count doesn't exceed mixer stage number.
5. Add sde.disable_rotator_downscaling property for disabling
rotator downscaling.
6. Add sde.disable_decimation property for disabling decimation
7. Disable 2 pipes on non-display_split case temporarily as z-order
needs be different
Change-Id: Iec20c292552b23ff1a4135a6be1695fa8fb737de
1. Configure the rotator control parameters on every rotator commit
to avoid concurrency issues with HDMI/virtual displays.
2. Pass the layer transform flag properly to SetOutputFormat() to
determine the rotator output format.
Change-Id: I2394d7fa137bd5dd0f6a5c37b8b9050418f59c3b
Resource config communicates with scalar library to configure the
Scale data structure. Then HWFrameBuffer populates the Scale data
structure to mdp_scale_data structure of MDP input layer.
Change-Id: Ibdfea2d3ef38ca381b14ceccb65df583407fda02
1. Compose the first animating frame using GPU on external display.
2. Set composition type of subsequent animating frames as SDE
composition and update cached framebuffer to external display.
3. Close the releasefence fd of framebuffer target during animation.
Change-Id: I674efa1821c8fc2fa0c3f9ccee88e25b70f75f9d
1. When non-primary displays are registered, set composition mode to
safe mode until resources for the added display is configured
properly.
2. Fix HDMI mirroring issue on framework reboot.
It could be possible that HPD is on during framework reboot.
HDMI driver needs HPD toggling to send uevent to userspace.
Disable HPD at start if HDMI is external, it will be enabled later
when the primary display powers on.
Change-Id: I27f27af3f6d525bd3697f5d5edd838f04003ff61
1. Add support to dump the input layers for all displays or each
display separately.
2. Add support to dump output layer for virtual display.
3. Add binder support to enable dump on each display, to enable dump
for input/output layers, and to set number of frames to be dumped.
Syntax:
adb shell "service call display.qservice 21 i32 <FRAME_COUNT> i32
<DISPLAY_TYPE> i32 <LAYER_TYPE>"
FRAME_COUNT = Number of frames to be dumped.
DISPLAY_TYPE = 1 -> To enable dump on primary display
2 -> To enable dump on hdmi display
4 -> To enable dump on virtual display
LAYER_TYPE = 1 -> To enable input layer dump
2 -> To enable output layer dump
To dump 2 frames of input and output layers on virtual display:
adb shell "service call display.qservice 21 i32 2 i32 4 i32 3"
Change-Id: Ifb3e6a7554e0012495f6f5858d6e32ff8fee6bec
1. Lock prepare() and set() APIs using sequence entry and sequence
exit lock respectively to prevent the critical section being
accessed by other threads.
2. Wait for sequence wait lock on HotPlugEvent thread or any other
binder threads(Eg. dumpsys), before it accesses the critical region.
3. Prevent deadlock during multiple prepare() calls before a set().
Change-Id: I5443675c870ed2967615ec383dd2d59ded30b52b
1. Create virtual display, if the current virtual display list is
valid and the output buffer handle is not NULL.
2. Configure input and output layers of writeback for the composition
using writeback.
3. Propagate the retire fence back to framework, so that the consumer
will wait for retire fence before it consumes the output buffer.
4. Recreate the virtual display, if the width, height or format of the
output buffer changes.
5. Destroy virtual display, if the current virtual display list is
invalid or the output buffer handle is NULL.
Change-Id: I096575381da3db1d0c7b7270bc55c5d936b9f5a8
1. Implement Buffer manager to allocate and deallocate output buffers
for rotator.
2. Assign buffer slot for each layer requires rotation and manage the
internal state of buffer slot in buffer manager.
3. Get the output buffer for each layer requires rotation from buffer
manager and associate the information along with that layer.
4. Create/Destroy the rotator session from the hint provided by buffer
manager. This is required to help driver to calculate the bandwidth
for the current frame.
5. Validate the rotator configurations and submit the rotation job
using rotator validate and rotator commit ioctl.
Change-Id: I1bc1de05042f64d5f32e95ac6226890fa4fabd24
1. Define an interface between hwcomposer and display engine to collect
systrace for a module in display engine.
2. Implement the functionality of conditional ATRACE_BEGIN/ATRACE_END
in hwcomposer.
Change-Id: I441d06397a2618f87f132c8037ca83d5fc13b07c
1. Set idle timeout value to driver through sysfs interface for
primary display.
2. Get notification about idle timeout from driver and fallback to GPU
composition.
3. Avoid idle fallback, if there is only one application layer.
4. Define a binder interface to set the idle timeout value through adb.
(Eg. adb shell "service call display.qservice 16 i32 70")
Change-Id: If0cfcbea140580803ad8a67ac9425db86c0f75bb
Configure decimation factor to MDP, if a layer requires to be
downscaled more than that of maximum MDP downscaling limit.
Change-Id: Ib36173f2458bf0554b4dd9de18521f6dff65a625
Add support for flush on a display. This flush shall release pipes,
all pending buffers and associated fences that are currently held
by display engine.
Change-Id: I8a8d7030fb6af031b3760c172fce4f1f8ef3fedc
SDE checks for PRIV_FLAGS_UBWC_ALIGNED bit in private handle flags
and sets the corresponding UBWC aligned LayerBufferFormat. Driver
expects UBWC specific pixel formats defined by MDP header.
Change-Id: Iaf86c4d7433dc9628b1cf8d7fb8872ab4f1f0a39
1. Set the video and secure flag of the layer buffer flag properly.
2. Normalize the crop rectangle of the layer to even values.
3. Handle one pixel downscale usecase, as MDP hardware dont support it.
4. Set the hint flag for each layer qualified for SDE compoisition to
notify surfaceflinger to clear the layers destination region in FB.
Change-Id: I20239e79db3ea90e0d4fdcb6953b8b70d703b4fc
Rotator might be used for downscale only. Output
ROI should not swap if there is no rotation.
Do not print out error log when the input is wrong,
Lua test will treat them as failures.
Add some more logging for rotation.
Checking for over width limit should only be greater.
Change-Id: Ib60bee3153e833ae3906169c216305f63f07f14b
- Provide a debug hook to change resolution on HDMI.
- Config(edid) set by user is validated before setting and this
overrides the best mode
- Add max_attempts in strategy interface which will be used for
looping through the strategy selection which removes infinite loop
- Set Max SDE layers on HDMI as 2
- Fix incorrect sde layer index in Dump
Change-Id: I9ae1d0b115a06774470be5c0f9b78c4d930b7065
Only mark dedicate block for rotator allocation. Use
rotate array other than left_rotate and right_rotate.
Use bit mask to indicate rotation usage because rotation
can be shared by multi displays.
Change-Id: I70bd03250080a24dcf7f38c39dbd6391c0bba97c
On suspend, HDMI interface should not be turned off.
Just unstaging the pipes is enough, so call commit with
0 layers.
Change-Id: Ieb297d8c9660a3e04171b166cc5c8e22069eb6d9
Close acquire fence fd of all layers, if display commit fails. This
is required to avoid fd leaks.
Change-Id: I12d44ddc0d1e378374c64a1808e7a19f071209be
Set flip flags in the driver interface to notify driver to do
horizontal/vertical/both flips using MDP.
Change-Id: Idbbffcc835a4779da5fb497a891ba5b8d9ec66b1
Use rotator when 90 rotation or downscaling is needed.
Configure rotator input/output ROI, acquire source pipe
and writeback block for the rotator.
Change-Id: I4b8348714eade9a57e553f0f23e6b0b62dd32bad
Handle source split support case, allocate two pipes when the src
width or dst width is over the limit.
Change-Id: If17fb96f82973653caa400157d210e636b2c1725
Move some state info into display ctx.
Reorganize layer config for display split config case.
Add macro tile format check for scaling limit difference.
Change-Id: If9c3bed6161343828c14f784f69269c181510223
Get new metadata values: max pipe bandwidth, max sde clock rate and
clock fudge factor. They are needed for bandwidth and clock checks.
Change-Id: I16078c6a707f5a81aa0eb2690b756df732fec218