Validate the display ID before processing any calls from the
client. This is needed to handle only the displays which are
supported by HWC
Adapted from commit of the same title in CAF msm8974 tree.
Original author: Arun Kumar K.R <akumarkr@codeaurora.org>
Change-Id: Iebeeabf791b5c53e811e1f4bb3d777ab0e4d0f47
In order to build generic system image that is agnostic to SoC or
device, such HALs should be moved from system partition to vendor
partition.
HALs moved: copybit, gralloc, hwcomposer, light, memtrack, hdmi_cec
Bug: 34826389
Bug: 35232083
Test: build & run and check whether the HAL is loaded from
/vendor/lib[64]/hw.
$ su; lsof | grep hwcomposer
Change-Id: I2bb617ac71ab040a5b1ba306c194e8672ac84561
Some makefiles didn’t specify libui but included
headers from it directly, and they didn’t even
need them.
It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).
Test: built and booted device
Bug: 35164655
Change-Id: Ib2de5e5a2f86bd857e12861bb6fc5e4739ff185a
The libc++ defines this (wrapped in ifndef, like this should have
been), so including a libc++ header and then defining this results in
a werror failure. Define this in common.mk so we can be sure it does
get defined, but also that it gets defined early enough that anyone
defining this in source wrapped with ifndef doesn't get broken.
Test: mma # on angler
Bug: http://b/34740564
Change-Id: Id7d70a6ad5e530390eb8b37e5e618312d1d7e6dc
Hwc_sync is in the hotpath of display
rendering and gets called every ~17ms
during active rerendering.
Reading the property "debug.egl.swapinterval"
on every execution of hwc_sync causes a major
regression where the execution of hwc_sync
is much slower than it can be.
Doing I/O in hotpaths is inacceptable
and can cause an unnecessary constant
I/O load, additionally to the slowdown
in display rendering which was caused
in this case.
As solution, we condition this debugging
feature with "DISPLAY_DEBUG_SWAPINTERVAL",
so it can be enabled when explicitly needed.
Gralloc is not directly affected by the regression,
it was adjusted to match the conditioning
of the swapinterval debugging feature.
The HALs of msm8084,msm8226,msm8909,msm8960 and
msm8994 are affected by the regression and
get patched by this patch. Newer HALs
are not affected.
The stats contained in this patch were
collected using a Nextbit Robin (MSM8992),
which uses the msm8994 HAL.
Test: Manual testing for proper conditioning.
Test: Running full CTS suite without DISPLAY_DEBUG_SWAPINTERVAL set.
Change-Id: If08595d37ac0c1a19edd8d296289a21c9f95512a
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Adds the HWC2On1Adapter to facilitate exporting the HWC implementation
as HWC2 instead of HWC1.
Test: None needed
Change-Id: Ic4fe02a32818e24121bfc20bc136480a5f453d82
system/core/include is included in the global include path using
-isystem, which hides log format warnings when built with gcc.
Fix the warnings in preparation for switching from -isystem to -I.
Test: lunch aosp_angler-userdebug && m -j
Bug: 31492149
Change-Id: Ie75967aa30bae2e9bebbd65efe0ff570a80203fd
am: 011da83
* commit '011da83efdb366d9c1254c2287e7a120376532ea':
Perform typecast to disambiguate the call to abs in preparation for libcxx rebase.
Change-Id: I77b540571afce11618f3a05f49d0acfe6a4c1d02
The initial mode was not set and incorrectly reported to
surfaceflinger.
Also, fix comparison bug when reading active config
Change-Id: I4fdf1d2ebb56721d044fc6e0c5ef3ea5c3616e5e
- On color mode change, remove redundant setDefaultMode
call, as the defaultMode was already set from applyModebyID
- destroy the ModeManager on deinit
Bug: 24311008
Change-Id: I4971f513e389adb56d7ed00e2c6a20adfe49f4e2
See bug description for the many compilation errors.
BUG: 24171136
Change-Id: I965679a9bc2e7fa434dee204597a3198c3bcfb48
(cherry picked from commit 46b905edf5)
Add a ColorMode class to HWC to manage color modes and expose
them as display attributes to SurfaceFlinger
Change-Id: I1010096120db6aec61163a84390527f5a0a3645e
In some cases, external displays may be driven by the primary
vsync with the primary not having any layers to compose. Do not
log in such cases.
Bug: 23487270
Change-Id: If72cb690692faa26bb4132c0f473b8b413be2bee
Use aligned width and height to check whether we need mdp scaling
for WFD use-case.
Bug: 23487270
Acked by: Manoj Kumar AVM<manojavm@codeaurora.org>
Change-Id: I8bbb0b9fb6ccec9f9798f37f9ea6ca38f69792c0
- In sanitizeROI function do not increase width/height in both
directions which causes left and right ROI to be unequal for
a source split enabled panel
- Handle ROI calculation which was beyond the frame boundary
when the panel had high min width and height values
Change-Id: Iaf9b2a97a55dc3fbab9ea8c41bfd9368eae0950b
When screen refresh is triggered, make sure at least one
full screen update when partial update is enabled.
Screen refresh is requested after post processing has been
sent to kernel, full screen update is needed so that the
pp setting applies to the whole screen.
Change-Id: I7885c451a313666c1fcef8c3d55cb86b8479de1c
Default display mode needs to applied exactly on boot
completion. Hence we check for the exact instance of
boot completion by checking the property of boot
animation exit. We keep on checking till the property
is found to be set and program the default mode over
a dynamic link to libmm-qdcm.so.
Change-Id: Ic68667a12e4058f29bc2203382baf59ef34ab038
Acked-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Some layers will not have surfaceDamage information,
like video and CPU rendered, so consider their destination
as the surfaceDamage. For other layers start with destination
will be calculated based on the surfaceDamage
Change-Id: Ic7308bf9dfb7d062596873963c738f644b1c1a84
- When generating ROI for SourceSplit case, check if the display
is split and accordingly calculate right roi
- Assign correct lRoi and rRoi in hwc_commit
Change-Id: Ie41e1f08e8f039f3548fa12be695c807d77a0b2e
- ROI calculations was beyond the frame boundary when the panel
had high min width and height values
- Consider the bounds into account when aligning the ROI
Acked by: Dileep Kumar Reddi <dkumarre@codeaurora.org>
Change-Id: Ic28a524435b1ebf0ab6894008f2af1d936d13a13
Use surfaceDamage in calculating the final dirtyRect in
case of generating the ROI for SourceSplit
Change-Id: Ibe2347c49e07ec40a3369f6970371437b81874cd
Update the HWC version to HWC 1.5
surfaceDamage is passed as part of the layer, use this information
to determine if the layer is changing and handle cache.
The total dirty rectangle for a given layer will be the sum of all
the damageRectangles, use that to calculate the ROI
Change-Id: Iddff278e716099d252e059aae02764f4b8630a6f
1) When source split is enabled, both the panels are calibrated
in a single coordinate system. So only one ROI is generated
for the whole panel extending equally from the midpoint and
populated for the left side.
2) Fixes a bug in mdpcomp where ROI generated for the frame is
reset when a strategy fails.
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: I47fa0e827985dd76d06dcbe464ef832cfc57a671
ping-pong split needs source split to be enabled to stage two
pipes of a layer in the same Z order. This change adds partial
update support to generate ROI when source split is enabled.
When configured, ping-pong-split splits the layer mixer output
equally across two DSI's. To meet this limitation, the generated
ROI is adjusted to have equal widths from the panel mid point.
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: Ic307a1d5b902af9e352b0dfc6f5ab474ecd9c8a4
In early return calls of prepare, reset the refresh rate
irrespective of layer properties to avoid stack corruption.
Acked-by: Praveena Pachipulusu<pveena@codeaurora.org>
Change-Id: I5a04e111b1f10a6cb807459c7693d049c454edaa
CRs-Fixed: 838902
Perf lock acquire would fail during the boot up as the perfd
service is not up yet.
Its harmless to remove these logs which cause false alarm
Change-Id: Id305f3122a77ebe70819e4b3edfaf405c3a87d70
Limit BWC to content with height within 4092, since this is a MDSS
requirement.
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
Change-Id: I82cd7212fc6c393b8b568abf2734a725a51d3cb0
If rotator downscale is able to reduce output dimensions below
MDP's pipe limits, then use only 1 pipe if possible in source split
cases.
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
Change-Id: I6739a1fcd32b1047ce266d60c0123961c9daa657
With source split enabled:
1) When both LEFT and RIGHT pipes gets reused pipes, we use their
pipe id's to compare their priority and swap them as needed.
2) When both LEFT and RIGHT pipes needs to be newly allocated, we
let driver take care of the priority as long as both pipes are
of same type. If different, we swap them according to the pipe
type priority.
3) When LEFT is reused and RIGHT needs new allocation, we swap
them only when they need same pipe type and LEFT has the
pipe with lowest priority.
4) When RIGHT is reused and LEFT needs new allocation, we swap
them only when they need same pipe type and RIGHT has the
pipe with highest priority.
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: I320285aaca7ffc032e3b3b0832380a9c705bc4fc