Validate buffer parameters like numInts, numFds, version etc of buffer
handle while importing the buffer
CRs-Fixed: 2337383
Change-Id: Ia1cb1cf05d845b5ef5b2feb476c2c924fa3bbf17
Signed-off-by: Subash Chander <subash@codeaurora.org>
There's an issue on devices with MDP rev. 4.3 and lower,
with random black/white screen causing the system to freeze
for a while. Reproducible with Chrome based browsers.
Debugging traced the issue back here, and testing shows that
this workaround is likely not needed anymore.
Reverting it makes Chrome work again without crashing, and
Netflix still works as it should.
This reverts commit 5b934669ca.
Change-Id: I7f969e87de29b630e2be04bf4876c48cd3051bc7
When there is unset overlay in prepare, commit needs to be sync
mode and wait for VSYNC. Otherwise, kernel resources may not be
ready for next overlay set.
Change-Id: Ibfc64ddd035993781eca2b4393650ce716d87549
Do not proceed with panel recovery sequence if panel is already off.
Proceeding with reset sequence, if panel is already off, results in
race conditions.
One e.g., there is race condition between early suspend triggered
by pressing power key and panel recovery triggeredby ESD uevent.
If pressing power key happens exactly at kernel DSI driver is
reporting ESD uevent, it's likely that panel will be unexpectedly
on by ESD uevent after having blanked the screen by early suspend.
This change avoids unintentional panel recovery in the case above.
Change-Id: I19022691ec3c178f62f392913435ddc032ee1ab2
CRs-Fixed: 613155
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
DOZE_SUSPEND is the lowest power state with the display still on.
With DOZE, we can still have updates. With DOZE_SUSPEND, MDP
clocks are off and no update can happen. This is applicable only for
wearables and doesn't happen in doze in handhelds/tablets.
Change-Id: I10fe467a099ead3b0b56a01fec0fb18e1ad78580
A recent CAF addition to hwcomposer_defs.h added new
display types, and this exposed a bug in our hwcomposer
which causes a crash in surfaceflinger. Fix this by
iterating through numDisplays instead of HWC_NUM_DISPLAY_TYPES.
This aligns with newer CAF platforms.
Change-Id: Iafb506e6b7b3551c4504386c3ced75fa550a65cb
* This always fell through to false....pretty sure that wasn't
intended. Compiling in ten complains about this, so let's fix it
now I suppose...
Change-Id: I2f40409fdf0e8b382f115b35a0e2e434497d643d
On open source builds, adreno libs don't get built, due to which
c2d headers aren't exported. Export it from the display HAL.
Change-Id: I6ed1d1fcf3f99ba83d5f194e40d0b42bd7b4d566
- Use getpagesize() function from unistd.h to get page size
in place of PAGE_SIZE macro.
c
Change-Id: I89405e999e4683874f4daa32188181e688a19812
CRs-Fixed: 1069351
Allocate gralloc buffers cached by default unless clients specify
uncached using PRIVATE_UNCACHED or READ_RARELY or WRITE_RARELY at
allocation time. Some clients could use gralloc for allocation but
later won't use lock()/unlock() for CPU operations and likely use
their own caching methods. Cached by default helps such clients.
SW usage flags are not defined as bit values, so do not use bitops
on those flags.
Change-Id: Id371de2ec6efbfa0ed84172b3540f3ebc8f5d459
lock() can be called from a CpuConsumer with only the READ_OFTEN flag
so relying only on that makes gralloc assume there are no non cpu
writers.
Store the writer information during allocation in private flags of
handle and refer to those during lock()
Change-Id: Ifbf25ebc74dbf4e422a2fdec52ec000cd75e549b
-Clients not having WRITE_OFTEN or READ_OFTEN are uncached.
-Invalidate cache on lock only if CPU needs to read and there
are non-CPU writers in system (camera,gpu etc)
-Flush cache on unlock only if CPU writes. Since all buffers will be
read in HWC(MDP) there is no need to check if readers exist.
Change-Id: Icd114e60b7456bd71592b81016892e806c37cb22
Currently HWC integerizes float source co-ordinates (l, t, b, r) in
the inward direction, mimicking SF from pre-HWC-1.4. In case of
upscale where we need to create more destination pixels than incoming
ones, this chopping off can lead to quality issues, especially given
that the error magnification can be as much as 20x.
This change integerizes the source rectangle in the outward direction
which will help magnification cases. Downscale cases should be
unaffected since reduction hides errors, unlike magnification.
Change-Id: Ib72a1f8d52f4ec800387bfe2b91c9d3a65e6f557
If we call binder APIs from within the same process, the parcels
read position will not be reset at the client end. Also there is
no interface token. Reset the parcel position to zero if the
calling process is the same as the current one.
Change-Id: I6c4499f453dba3ec89b203ce9c86150edaefdbec
Validate the display ID before processing any calls from the
client. This is needed to handle only the displays which are
supported by HWC
Change-Id: I3596778b05f2998c03f83d462ca950c620fd25c8
Header lib is preferred since a set of headers can have internal
dependency to other headers which are in different directories.
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j memtrack.msm8998
Change-Id: I19b05ea960ba553eb9bbcd674eb9c50216169cef
This CL replaces all LOCAL_MODULE_PATH_* definitions for vendor shared
libraries with LOCAL_VENDOR_MODULE := true instead. This appropriately
generates sanitized versions of these libraries to /data/asan/* while
generating the stock versions in /vendor/lib* as desired.
Needed for ASAN builds to work correctly.
Bug: 37740897
Test: m -j40 && SANITIZE_TARGET="address" m -j40 # shared libs in
$ANDROID_PRODUCT_OUT/vendor/lib* do not contain asan symbols, while
the ones in $ANDROID_PRODUCT_OUT/data/asan/vendor/lib* do.
Change-Id: Ibdac125fdd8921d03d017f75ad5f1cf12501c0ef
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
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
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>
Fix MDP comp array index access in case of High Res pipe allocation.
This is already correct in case of Low Res allocation routine.
Bug: 24163261
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
Change-Id: I7eaa0711ef8998ea03edba18b74db80459daf4c7
(cherry picked from commit 08b30db524)
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)
(cherry picked from commit 17b8f5e772)