Storage for six pollfd structs is allocated on the stack in a 2d array.
Subsequently, the address of the first element is passed to poll along
with the same total number of fds. At this point, the fortify dynamic
checker, considering only one of the dimensions of the array, throws an
error and warns that array is too small. Since the array is actually
sized appropriately, use a reinterpret_cast to subvert the checker.
Bug: 77323983
Change-Id: Ib88c5a00bc84b3d05be95baf57df5f522a769da4
* Add missing include $(LOCAL_PATH)/../common.mk and -Werror.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I8cd29680bb623343a0dcac9e541b86a339b5a7c7
In the kgsl function which gets memory info for a
pid, there could be possibility of integer overflow
in operations with size, mapsize, accounted_size,
and unaccounted_size due to which result might be
smaller than these values. External inputs size and
mapsize are verified, and overflow check has been added.
Change-Id: Ic511f92574d80e0d596975db16a43787699ae543
Use 2 new columns from the kgsl debugfs mem file:
egl_surface_count: # of buffer attachments with usage=egl_surface
egl_image_count: # of buffer attachments with usage=egl_image
If an ion buffer is mapped with usage=egl_surface, the entire size will
be counted towards the egl_surface. The assumption is that the buffer
will be freed if the producer process is killed.
To handle buffers such as the wallpaper and texture atlas which have
no producer and are potentially mapped multiple times, assign each
process where usage=egl_image a size of "size / egl_image_count". This
ensures that the total memory usage is correct, while still assigning
some memory to each process which maps the buffer.
The above replaces the attempts to avoid double counting buffers using
the "is_surfaceflinger" check.
Change-Id: Icd2dc230edb6b5beb7a20dad45d2d066e9e4d623
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.
Change-Id: I36b03e49f431f11db7b06f1366cd37d264381747
The length of flags field in kgsl debugfs mem file has changed
from 7 to 8. Hence, change the parsing in libmemtrack accordingly
Change-Id: Ia94ee7b41a7903badc42851a05c61940ece67ef5
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
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)
Test: building SonyAOSP with this removes the warnings
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>
MDP composition with rotation and unaligned ROI results iommu page faults.
Use GPU composition to for rotation to avoid iommu page faults.
Bug: 30971681
Change-Id: I10d3eacfeda98578619bfc73808322fd490c8044
Signed-off-by: Uday Kishore Pasupuleti <upasupul@codeaurora.org>
Add missing va_end() and additionally extra protection in the
deconstructor in case of use after free.
Bug: 30483149
Change-Id: Ib28c6312b67654e19d89c7b9acf03f26a8640ad3
Stub out getHDMINode and getEdidRawData for 8909w.
This will avoid error messages from above functions.
Change-Id: Ief2dd8907de15d7320a3d0b5b1880356edf322f8
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
Add clang support for display modules and fix error identified by clang.
Change-Id: I8e62ce5773c675e50ef9f4c82ae588ff0ec7ff67
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
Add a new file with stubs for the existing hdmi calls.
The execution of the stubs is dependent on the value of
the TARGET_SUPPORTS_WEARABLES flag which is set to
true for MSM8909w
Change-Id: I2d2ad76e98d37f0ccacacbf50831cdbf8980d503
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
am: d44112d
* commit 'd44112dc0a37ec132b2d5440903df89564a20919':
display: Point to new opensource project path.
Change-Id: Iba2a57f0bb2c5819cc1060ed28fcc886478733c0
Clang has more warnings and errors than gcc which prevent the
msm8909 display components from compiling successfully. Disable -Werror
and clang temporarily until these issues can be fixed.
Bug: 27790279
Change-Id: I83fef652d3da81d0740286040b8a942998e9d836