Commit Graph

923 Commits

Author SHA1 Message Date
Kyle Harrison d585e60cc4 hwc: Update dependencies for S
ld.lld: error: undefined symbol: SkFILEWStream::SkFILEWStream(char const*)
ld.lld: error: undefined symbol: SkEncodeImage(SkWStream*, SkPixmap const&, SkEncodedImageFormat, int)
ld.lld: error: undefined symbol: SkFILEWStream::~SkFILEWStream()

Change-Id: Ib77f379859c6af9acf787b98fdd848959a54c69f
Change-Id: I9f27e0f1c9629983f818de4a25e86d2ed0a41020
2023-02-16 20:28:50 +01:00
Subash Chander 3474fcedfa Gralloc: Validate buffer parameters during importBuffer call
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>
2023-01-26 11:42:09 +01:00
followmsi 6bf1f75a9f libvirtual: Fix IAudioPolicyService include address
IAudioPolicyService changed to aidl in 12

Change-Id: I22f89061686a9e2fce24440e23b6e39c77e5f04e
2023-01-26 11:31:36 +01:00
followmsi 03ae13762c Remove include <media/IAudioPolicyService.h>
Add AudioSessionInfo still missing

Change-Id: I939093cc7a993899704fc6f78f7cf1029336f95f
2021-11-22 19:56:50 +01:00
Arne Coucheron 51325414db display: Add display headers lib
LOCAL_COPY_HEADERS is deprecated. Replace with
headers lib to avoid build warnings.

Change-Id: I5512cec25ad8f93cbdf97ab817e608e8628d45ff
2020-11-15 10:01:07 +01:00
Christopher Wiley 3324351504 libvirtual should depend on libmedia
This library's source code includes libmedia headers.

Bug: 27804373
Change-Id: I5379455d6a10022e1e0b4fcf4efce11022c0301e
Test: Compiles
2020-11-04 11:09:18 +01:00
Arne Coucheron 41b6123499 Revert "Don't force GPU composite for older devices"
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
2020-09-24 00:12:59 +02:00
Vinu Deokaran bbea02bdf3 hwc: wait for commit finish when unset overlay
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
2020-04-22 00:15:12 +02:00
Vinu Deokaran 3777210ecc hardware: display: fix KW issues
Fix KW banned function issues.

Change-Id: I964685a32df49bce91886debc51a914af1108274
2020-04-22 00:15:12 +02:00
Neti Ravi Kumar 12e7c39ab3 hwc: Skip panel reset sequence if panel is already off
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
2020-02-05 01:28:38 +01:00
Ramkumar Radhakrishnan 21f7b8dcdb hwc: Remove external only feature related code
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.

Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
2020-01-13 01:07:22 +01:00
Naseer Ahmed 3bf99a4723 hwc: Handle DOZE_SUSPEND properly
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
2020-01-13 01:07:14 +01:00
Arne Coucheron 15ffbb044d hwc: Put some bits in the right places
Fixup "hwc: Validate display ID in hwc interfaces"

Change-Id: I5e06b968e47683788317cdd9675242450f6cb28d
2020-01-11 00:22:20 +01:00
Arne Coucheron d9308fd3c8 hwc: Iterate through numDisplays in reset function
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
2020-01-11 00:13:45 +01:00
Arne Coucheron a263268280 memtrack: Fix hal_api_version
Change-Id: I4bc8d4e03a12ebe78d764386b1d22ac1aa4ddd27
2019-11-28 00:59:51 +01:00
Arne Coucheron 5306421bba display: Fix compiler warnings
Change-Id: I38846a7ef0ce0cf426318ec6ef76c1ce0d6c5423
2019-11-28 00:59:51 +01:00
Valerie Hau 9d142785a4 Modify gralloc0 implementation
Add validateBufferSize and getTransportSize

Bug: 131089111
Test: build, boot
Change-Id: Ib518d095a3421e1b2c1ebbc7c64c641652102f78
2019-10-08 12:33:59 +02:00
Dan Pasanen dadb58de17 libexternal: fix switch fall through
* 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
2019-10-07 11:05:36 -05:00
Alessandro Astone 87ef5de8dd display: inform compilers of deliberate switch fallthrough
Change-Id: Ibecb6c5d61e09e3d1c999e611eb7d07c5c785ab3
2019-10-07 10:59:34 -05:00
Naseer Ahmed 28d76d195b copybit: Export c2d header
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
2018-12-04 00:32:36 +01:00
Arne Coucheron fbbaaa4965 display: Use generated kernel headers
Change-Id: Ia1e22dc714f055c966c9ca297523ed33a8c92c8e
2018-11-16 00:43:49 +01:00
Naseer Ahmed ced0a4f6e2 gralloc: Fix gralloc protected allocations
Protected allocations need to be uncached and don't need the MM
heap flag set

Change-Id: Ib64169e601af1c70a951a06266e70b4e18fc88f5
2018-11-16 00:43:49 +01:00
Dileep Marchya 5923eec027 gralloc: Use getpagesize() in place of PAGE_SIZE.
- Use getpagesize() function from unistd.h to get page size
  in place of PAGE_SIZE macro.
c
Change-Id: I89405e999e4683874f4daa32188181e688a19812
CRs-Fixed: 1069351
2018-11-16 00:43:49 +01:00
Saurabh Shah 67b39ad211 gralloc: Allocate cached by default, don't use bitops on SW flags
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
2018-11-16 00:43:49 +01:00
Saurabh Shah 627418d2ca gralloc: In lock use writer info from allocation time
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
2018-11-16 00:43:49 +01:00
Saurabh Shah c9a2701fee gralloc: Optimize ION cache clean and invalidate calls
-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
2018-11-16 00:43:49 +01:00
Erik Wolsheimer c88300dd02 Make hwc_vsync thread realtime
Bug: 68395248
Change-Id: I4ac93464aa2ccf416577b4067ed658b525089983
2018-11-16 00:43:49 +01:00
Saurabh Shah 7333059fc9 hwc: Integerize in the outward direction of rectangle
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
2018-11-16 00:43:49 +01:00
Haynes Mathew George f90889955d display: Fix deprecated log warning
Change-Id: Ib3cb65ea19fa21dca6626080f5117073f0a86766
2018-11-16 00:43:49 +01:00
Alexey Polyudov 367b22e6f6 Use libhwui.so instead of libskia.so
Change-Id: Ie60ee11910f7e0b2da20e8634c38265e86b5742c
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2018-11-16 00:43:49 +01:00
Martin Brabham 687de3a6fe Include string.h
libgralloc: strerror needs string.h
libqdutils: strerror needs string.h
libcopybit: memcpy needs string.h

Bug: 72343089
Change-Id: I36226fd656d26c4d0486d1c99f2317376c0d08dd
2018-11-16 00:43:49 +01:00
Chih-Hung Hsieh 60f4b5d057 Add -Wno-error to compile with global -Werror.
Bug: 66996870
Test: normal builds.
Change-Id: Iee4ac5f95a2013c5eeac1c061889a593caf0ec36
2018-11-16 00:43:49 +01:00
Ruchi Kandoi 5054aadf9a memtrack: Make memtrack HAL compatible for HIDL passthrough mode.
Bug: 31180823
Change-Id: I0605d041f061fc3290140609fcc26c10db42fe15
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2018-11-16 00:43:49 +01:00
Naseer Ahmed c5d6f7dd9c display: Fix binder parcel position
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
2018-11-16 00:43:49 +01:00
Arun Kumar K.R 50195dbd98 hwc: Validate display ID in hwc interfaces
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
2018-11-16 00:43:49 +01:00
Steve Pfetsch eea75f908e libgralloc: Fix adding offset to the mapped base address
Bug: 63662821
Change-Id: I722ed2560efd66e2e61a3054d7db7f6241e8e911
2018-11-16 00:43:49 +01:00
Jiyong Park 3b1f25ad7e Use header lib instead of using global include path
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
2018-11-16 00:43:49 +01:00
Yifan Hong 05f0e9ce17 Fix libcutils private headers
Use cutils/android_filesystem_config.h instead.

Bug: 63135587

Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Test: mma -j
Test: BOARD_VNDK_VERSION=current mma -j

Change-Id: I4070a4c693509c569dc30c452db68c15e1386f42
2018-11-16 00:43:49 +01:00
Vishwath Mohan f9885b8c09 Remove hardcoded LOCAL_MODULE_PATHS from vendor components. (display)
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
2018-11-16 00:43:49 +01:00
Mathias Agopian 245ca22f91 fallout of splitting rect.h out of libandroid.
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
2018-11-16 00:43:49 +01:00
Jiyong Park 4bee32710e Move QCOM HALs to vendor partition
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
2018-11-16 00:43:49 +01:00
Hal Canary 8ea1b5f09a SkImageEncoder->SkEncodeImage
Test: none
Change-Id: Idec9438683b4e542dca662b958368190faece7b6
2018-11-16 00:43:49 +01:00
Adrian DC f70af97df9 libvirtual: Add libbase static library dependency
* Required to access android-base/unique_fd.h

Change-Id: Ibfe57c40ed77a3e51fe218f92d8560b11bf53129
2018-11-16 00:43:49 +01:00
Dan Austin 3ccc047184 fix const/non-const issues for libcxx rebase
Change-Id: Idac1aa4cf64608fb3a64c5bd1b9893071856ab48
(cherry picked from commit b7e1152f8c)
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2018-11-16 00:43:49 +01:00
Rahul Sharma 282a25dd7f hwc: return correct color format string while layer dump
fix the issue with returing the color format string when
dumping the layer info.

Change-Id: I1614d9a891af375678f841aaf57840b45bd1c72b
2018-11-16 00:43:49 +01:00
Alex Naidis 86eb96df99 hwcomposer: Fix regression in hwc_sync
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>
2018-11-16 00:43:49 +01:00
Arne Coucheron 8708b24a02 display: Do not use GNU old-style field designators
Improve code portability

Change-Id: I3441c6ae2c10876877e79be579a24822d3f48882
(cherry picked from commit 602d41acc6)
2018-11-16 00:43:49 +01:00
Arun Kumar K.R 52e33b9cba hwc: Fix MDP comp array index access
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)
2018-11-16 00:43:49 +01:00
Dan Willemsen a486977e24 Fix duplicate copy file rules
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)
2018-11-16 00:43:49 +01:00
Vinu Deokaran dfaf8c311c display: fix KW issues in display HAL
Fix a few KW issues in display HAL.

Change-Id: Ic790d51122f02001726b1afff408e290e0928acc
2018-11-16 00:43:49 +01:00