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
This adds some new data members to private_handle_t. The new data members
are needed to support GRALLOC1_ADAPTER_PERFORM_GET_DIMENSIONS, etc. All
HALs that include gralloc_priv.h need to be recompiled.
When TARGET_USES_GRALLOC1 is true, the gralloc HALs advertise gralloc 1.0
support (see ADVERTISE_GRALLOC1).
Test: builds and boots
Bug: 33398719
Change-Id: I61e9addfd11dd65e6843163c3ba667e0f95bac16
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
Let graphics map the buffer in registerBuffer, except secure
buffers. Avoid map in register (and at allocation time) can be
done when retain/release is implemented in gralloc 1.0
Bug: 28526999
Bug: 30404840
Change-Id: I208316b89edffc7486fe74deb1b9e3352d230223
CRs-fixed: 1010697
The mem file now has additional field, the mapsize. This
represents the size in bytes mapped to userspace. Use this
value and total size of an object to derive the unaccounted
size.
Bug: 30635019
CRs-Fixed: 982589
Change-Id: I9400e7ddacf185ebf93d0dd09e33a61685bea4dd
In some cases, the framework attempts to lock a secure buffer.
Since it does not get an error code from the lock, it proceeds to
dereference the base address (which is invalid). Return an error
code when a secure buffer is attempted to be locked, while still
ensuring that the metadata is mapped.
Since we return a proper error in lock(), register buffer fails.
Since a map should not be done in registerBuffer per the gralloc
spec, only map the metadata here. Clients that need to access
memory in CPU after registerBuffer should do a lock().
Note, this is a resubmission of a previous change whose Change-Id
was I74204931fa61524f1601dd99ab266219d4be2c82. Patch set 4 was
initially submitted instead of patch set 6.
Change-Id: I68124902d0b614702622dc948e13270fc86e16a6
CRs-fixed: 1010697
Bug: 28526999
In some cases, the framework attempts to lock a secure buffer.
Since it does not get an error code from the lock, it proceeds to
dereference the base address (which is invalid). Return an error
code when a secure buffer is attempted to be locked, while still
ensuring that the metadata is mapped.
Since we return a proper error in lock(), register buffer fails.
Since a map should not be done in registerBuffer per the gralloc
spec, only map the metadata here. Clients that need to access
memory in CPU after registerBuffer should do a lock().
Bug: 28887585
Bug: 28791974
Bug: 28526999
Bug: 29034950
Change-Id: I74204931fa61524f1601dd99ab266219d4be2c82
CRs-fixed: 1010697
Change I86300a1b4e3008f9d0884940420e9036c47a016f introduces a
regression by mapping metadata part of secure buffers, but not
unmapping that. This change fixes the map/unmap asymmetry.
Bug: 28887585
Bug: 28791974
Bug: 28526999
Bug: 29034950
Change-Id: I078eef1139642bd6d8a01145ab1c81060621fb8d
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
Do not require the MM_HEAP flag for TZ protection. This is in
line with the gralloc spec.
Bug: 27536318
Change-Id: I0bc7346b0a40061600707d8c1881a9d405995b4f
am: 011da83
* commit '011da83efdb366d9c1254c2287e7a120376532ea':
Perform typecast to disambiguate the call to abs in preparation for libcxx rebase.
Change-Id: I77b540571afce11618f3a05f49d0acfe6a4c1d02
If these libraries are built, both BUILD_COPY_FILES and
BUILD_SHARED_LIBRARY would copy the headers. This would create a warning
because multiple rules would define the same target header file.
Bug: 27302058
Change-Id: If91bd70d2320aaaee9679642ff9ea48b99739cbd
(cherry picked from commit b360857e92)
If these libraries are built, both BUILD_COPY_FILES and
BUILD_SHARED_LIBRARY would copy the headers. This would create a warning
because multiple rules would define the same target header file.
Bug: 27302058
Change-Id: If91bd70d2320aaaee9679642ff9ea48b99739cbd