Commit graph

782 commits

Author SHA1 Message Date
Jooyung Han
7bcb89317d Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Exempt-From-Owner-Approval: cherry-pick from aosp

Bug: 152655956
Test: m
Merged-In: Ifea5ed988fad2e0d29271e6e9cbf0e12100b37d9
Change-Id: Ifea5ed988fad2e0d29271e6e9cbf0e12100b37d9
(cherry picked from commit a395c8d9aa)
2020-05-11 08:33:49 +00:00
Sundong Ahn
f7f7cde49d Change to using sysprop for vrflinger_test
The configstore service was deprecated. So change to use sysprop
instead of configstore.

Bug: 124531214
Test: m -j
Change-Id: I5367b5715c797facd37736eee84651addbaa230d
Merged-In: I5367b5715c797facd37736eee84651addbaa230d
(cherry picked from commit 8e852f5231)
2020-04-27 10:42:19 +09:00
Chih-Hung Hsieh
27c12feea5 Fix bugprone-use-after-move warnings
Bug: 150783499
Test: TreeHugger
Change-Id: I930cbe4b421913a58d7886fbf845a77f94387ff5
Merged-In: I930cbe4b421913a58d7886fbf845a77f94387ff5
2020-04-21 19:59:34 -07:00
Peiyong Lin
afa0f5706a Plumb getClientTargetProperty API.
getClientTargetProperty will give hardware composer the ability to request some
properties of the client target that hardware composer wants. Prior to this
API, the client will does its best to produce the client target of which the
properties are pretty much fixed.

This patch implements the parsing of SET_CLIENT_TARGET_PROPERTY command in
order to get the client target property from hardware composer.

BUG: b/145968912
Test: m -j32
Change-Id: I3e738b2617e4472c7876aa283c0964e2240b144b
2020-01-13 16:41:08 -08:00
Ady Abraham
b0433bc72b SurfaceFlinger: plumb composer 2.4 onSeamlessPossible
Plumb onSeamlessPossible callback to SurfaceFlinger.

Test: rev up composer to 2.4
Bug: 141329414
Change-Id: I2166b8ea066002c76781aacbcc985f85f7c255a8
2020-01-09 22:49:04 +00:00
Automerger Merge Worker
8a5092d0bb Merge "Link libvndksupport dynamically instead of statically." am: 185ce28850 am: f06fa5ff30 am: af5c1aaef7
Change-Id: I6386d1e11d9eb0a07f386ca87a5b15781f23edc8
2019-12-19 18:35:27 +00:00
Automerger Merge Worker
c072e3eab1 Merge "Add patplunkett@google.com to vr OWNERS" am: e52810eae0 am: b7d1c8868c am: 3bd0373422
Change-Id: I1cf416a0e4b2f387b83beae53af48c05f18e7221
2019-12-19 17:43:13 +00:00
Peter Collingbourne
185ce28850 Merge "Link libvndksupport dynamically instead of statically." 2019-12-19 17:27:37 +00:00
Pat Plunkett
6c5892a21d Add patplunkett@google.com to vr OWNERS
Test: N/A

Change-Id: I9a5dd81b4c476bfc9af409a75a2250dafbdec0d1
2019-12-18 15:44:33 -08:00
Peter Collingbourne
19de208f9d Link libvndksupport dynamically instead of statically.
Bug: 146456667
Change-Id: I94cfefaac4fbd6c5914af151399a5be35c582d7b
2019-12-17 20:17:30 -08:00
Ady Abraham
7159f5799f SurfaceFlinger: add composer 2.4 vsync api to DisplayHardware
Add the new functions to DisplayHardware wrappers. The following CLs
will do something useful with the new functionality.

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: Iaf98d0abc56dd393845b16c87dd92b0bad582c0f
2019-11-20 01:30:28 +00:00
Marco Nelissen
14a85b0188 Merge "Remove unnecessary link library" am: f5e2c5d0f8 am: bbeb7f3a1a
am: 61bd6224a7

Change-Id: Ic4452bef526aa133eaf292d22a098e84135bfadd
2019-11-11 12:57:46 -08:00
Marco Nelissen
844812cd5d Remove unnecessary link library
Test: build
Change-Id: If0c2e86623b8b7ee316949c656977e1b935f5d33
2019-11-08 13:43:24 -08:00
Marco Nelissen
6a1f9276ce Merge "Remove unnecessary link libraries from libbufferhub" am: b611217c46 am: e48f92aa2f
am: 4129b8b543

Change-Id: Id67e9823b9ae08ba2635e5051cc2638bc2c64f8f
2019-10-31 16:08:56 -07:00
Marco Nelissen
86dbbf914f Remove unnecessary link libraries from libbufferhub
Test: build
Change-Id: I0bca8292fa93eb35c894ff97d2b6686e448a8b24
2019-10-31 08:56:00 -07:00
Dominik Laskowski
25a4e7da75 SF: Upgrade to Composer HAL 2.4
Add plumbing for getDisplayCapabilities and getDisplayConnectionType.
The only functional change is that getDisplayType is no longer called
on hotplug.

Bug: 135929065
Bug: 134771872
Test: Rev HAL to 2.4 on crosshatch
Test: libsurfaceflinger_unittest
Change-Id: Ib2c0383397acef9cde860dd64182213ae7cbb286
2019-09-24 11:02:54 -07:00
mamik
913cc1303c EDID support for external display hotplug
The hardware_composer caches the edid when a new hotplug event fires
(connected and disconnected). The display services uses this cached edid
when the edid is requested.

Bug: 141007548
Test: Manual, ran on mtp device with wave optics plugged in and
unplugged and verified edid with: "adb shell dumpsys SurfaceFlinger --display-id"

Change-Id: I4556e1d8a3f8677b1d9301d9afbc40d514c86e27
2019-09-13 15:08:03 -07:00
Steven Moreland
83cc45b1e7 Merge "Remove libhwbinder/libhidltransport deps" am: 0b2cf30522 am: b19d15b55c am: f425ab1e9c
am: d65d71b076

Change-Id: Ia6e27a36a34cc247929866f0566b83f6471cc090
2019-09-09 19:24:34 -07:00
Steven Moreland
7a10a4f543 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iec1802ce9226570d3a02cc5242f7ca72e1370635
2019-09-09 10:46:17 -07:00
Steven Moreland
7d30c177df Merge "Stop relying on kernel binder headers." am: 8f82e1240f am: b358d73c43 am: 86071b334c
am: 53dc67599a

Change-Id: I47afd5e83bb2ebfaec1eed19c06b1b14da225687
2019-09-08 18:05:20 -07:00
Mike Ma
1ba4b2517b Merge "Update external display property in hardware_composer." 2019-09-06 14:49:47 +00:00
Steven Moreland
322e0e8a23 Stop relying on kernel binder headers.
Since they are no longer being exported, instead using the name of the
constant as exported by libbinder.

Bug: 124524556
Test: TH
Change-Id: Id525d8b6dea527c26c92981624d4780e1ff4a62f
2019-09-05 16:18:37 -07:00
mamik
94e91f62bb Rev up vr_hwc to composer@2.3
Fix for issue: "[GSI XR] VrFlinger doesn't work on GSI/MTP845."

The flow that causes the issue is:
SurfaceFlinger gets an hotplug event and adds a display id of the
internal display (For instance, display id of 19260371107735809). This
display id gets added to the HWComposer through the hotplug event.

When updateVrFlinger() is eventually called in SurfaceFlinger, a new
HWComposer is created which has no display ids being tracked in
HWComposer. Another hotplug event starts from vr_hwc.cpp, which has a
display id of 0. SurfaceFlinger receives this hot plug event so
SurfaceFlinger has an display ids of [19260371107735809, 0]. HWComposer
only has display id 0.

Next processDisplayChangesLocked() is called in SurfaceFlinger and a new
FramebufferSurface is created with display id 19260371107735809.
In the FramebufferSurface it tries to call getActiveConfig() in
HWComposer with the display id of 19260371107735809, which HWComposer
does not know about. This results in a crash.

The display id is created from the edid data and display port.

The fix is to have the vr_hwc return the same edid data and display port
as the internal display. This will make the display id originating
from vr_hwc be the same as the internal display id. SurfaceFlinger
will now only have the display id of 19260371107735809, since it does not
overwrite the same display id on the hotplug events. HWComposer will only
have display id of 19260371107735809. The SurfaceFlinger and HwComposer
display ids match the code works correctly now.

This is accomplished by creating a version 2.0 of the vr_composer_client
and having vr_hwc inherit from version 2.3 instead of version 2.1 of the
composer hal. These changes are required to be able to pass through the
edid data. The display port and edid data is retrieved by vr_hwc via the
display_client.

The other required changes needed for this to work is:
ag/9215156
ag/9226524

Bug: 137325030
Bug: 138938154
Bug: 137448042

Test: manual - ran through modified unit test to make sure the edid data
was returned on the MTP 845.

Change-Id: I1c54e6cfda348260cf1013d6dca0dda58acb3b3c
2019-09-03 11:54:31 -07:00
mamik
a4f14de792 Update external display property in hardware_composer.
This change removes the "persist.vr.use_external_display" property and
updates the code path to always allow external displays.

Bug: 140287770
Test: Manual, ran on device and verified that it works
Change-Id: I8bedeb18c93b2a9dc3815177aa9a6a897b63c81e
2019-09-03 16:09:32 +00:00
mamik
a08194b008 Updating ConfigurationDataGet api to include edid data.
Bug: 138398637

Test: manual - ran through modified unit test to make sure the edid data was returned on the MTP
845.

Change-Id: I171cf90d005a09a9cb6ee1081efee653cce47c4a
2019-07-31 17:53:51 +00:00
Steven Moreland
2212645bd8 Merge "libbufferhubqueue: remove unused deps" am: 6955914221 am: 8909e3ab34 am: a2a145865b
am: cf0575a2dd

Change-Id: I4d3be3576b211e5818c2728684d10152795f46ee
2019-07-12 13:16:37 -07:00
Steven Moreland
8909e3ab34 Merge "libbufferhubqueue: remove unused deps"
am: 6955914221

Change-Id: I150115090c923ed0f6446c1548ca899a6ae2ff65
2019-07-12 12:32:38 -07:00
Steven Moreland
e1403dceb4 libbufferhubqueue: remove unused deps
Bug: 137311188
Test: library still builds
Change-Id: Iea3359315b3eb2db17e438e88150dbd1c3d10d0d
2019-07-11 15:21:49 -07:00
Tianyu Jiang
1eafe08a93 Reduce debug level log from libbufferhub
Logs that indicates possible racing between consumers and producers of
a buffer are removed because they are expected to race each other.
Log that indicates possible racing in bufferhubd is moved from info
level to verbose level.

Test: vega runs without libbufferhub log spam
Bug: 129544259
Change-Id: I9307602797ff9c1bbc774264682a83bf4ddd0240
(cherry picked from commit b9d077f9be584114c39ac8417452cd20817c0236)
2019-05-22 17:23:06 +00:00
TreeHugger Robot
c5429c8d94 Merge "Skip tests in DvrDisplayManagerTest test case for boot.vr devices." 2019-03-29 23:37:17 +00:00
Tianyu Jiang
51ecd25f65 Skip tests in DvrDisplayManagerTest test case for boot.vr devices.
Previously, SurfaceAttributeTypes was not skipped if device boots to VR.
However, currently, display manager client cannot be created on devices
boots to VR, and thus, SurfaceAttributeTypes should also be skipped.

Test: dvr_api-test on walleye_xr
Change-Id: I7231808de1c0c6c67528d496711494627ac98df2
Fix: 121329335
2019-03-28 15:43:03 -07:00
Tianyu Jiang
2e6ead3279 Opt in libcrt
Bufferhubd, its client libraries and tests were failing due to
libcrt change. However, they no longer fails on master branch TOT now.
This change removes the libcrt switch that were introduced in b/117565638.

Bug: 117568153
Bug: 117565638
Test: on phone targets (blueline crosshatch taimen)
BufferHub_test BufferHubServer_test VtsHalBufferHubV1_0TargetTest

Test: on phone_xr targets (blueline_xr crosshatch_xr taimen_xr)
the above tests and the following tests:
buffer_hub-test dvr_api-test dvr_buffer_queue-test dvr_display-test
buffer_hub_queue-test buffer_hub_queue_producer-test


Change-Id: I469dd939826df30ee6893d34c510da448fba6b9e
2019-03-28 20:21:21 +00:00
Tianyu Jiang
f377a76a47 Fix code style violation in the variables in BufferHubDefs::MetadataHeader
Violation: variables should be lowerCaseCamel in the following directories:
frameworks/native/libs/ui and frameworks/native/services/bufferhub


Test: m, mma
Bug: 68273829
Change-Id: I7dc56ec17089456f98b018032f04f779b12632b2
2019-02-13 22:06:52 +00:00
Tianyu Jiang
727ede4a0f Fix non camelCase function names
Android Framework C++ Code Style Guidelines says that function names
should be camelCase: http://go/droidcppstyle

Test: m, mma in frameworks/native
Bug: 68273829
Change-Id: I2f661c06b31b2e72cd0eee3d91b95531b60ec939
2019-02-08 15:41:57 -08:00
Tianyu Jiang
ef49ca6279 Move BufferHubBase::Lock and ::Unlock from public function to private helper.
User should be using GraphicBuffer/AHardwareBuffer::Lock/Unlock to lock/unlock
for CPU access to the data in the buffer.

BufferHubBase::Lock/Unlock exist were because this legacy class has IonBuffer,
which wraps a GraphicBuffer. The dependency will be reverted in the future, where
BufferHubBuffer backs GraphicBuffer.

Bug: None
Test: m, mma, vrflinger_test
Change-Id: I3e3287529326dce3ae57e344c5c738b898c3d44d
2019-02-04 17:23:26 -08:00
TreeHugger Robot
860b569b55 Merge "Remove unused BufferHubBase::GetBlobFds method" 2019-02-05 00:50:19 +00:00
Tianyu Jiang
b75b097945 Remove BufferHubBase::Poll method
because the eventfd should not be polled directly after
Consumer/ProducerBuffer are backed by BufferHubBuffer.
The only current instances of BufferHubBase::Poll being used are in
buffer_hub-test

Bug: None
Test: m, mma, buffer_hub-test

Change-Id: Iac586086aed54510c1a8bae020e5ca24d8fd065e
2019-02-01 19:35:33 +00:00
Tianyu Jiang
8870520fdd Remove unused BufferHubBase::GetBlobFds method
This method is not used in DVR buffering system. BufferHubBuffer may
consider having it later when it meets an use case when the buffer
contains multiple fds in buffer handle, and directly have it implemented
in BufferHubBuffer class.

Test: build
Bug: None
Change-Id: I95cd71d936695eeb77bd049f43fe350fb60d9154
2019-01-31 14:25:47 -08:00
Tianyu Jiang
a8df5f30d3 Replace the use of helper function IsBufferReleased to member function
IsReleased() or is_released().

Fix: 122854791
Test: BufferHub_test BufferHubServer_test VtsHalBufferHubV1_0TargetTest
buffer_hub-test buffer_hub_queue-test dvr_buffer_queue-test
on walleye_xr
Change-Id: I2431a4ddd78cb2eef9bdeafc0d9048571f7a0c61
2019-01-30 14:50:27 -08:00
Suren Baghdasaryan
dc9078de94 Add libprocessgroup dependency and fix sched_policy include
surfaceflinger, installd and libvrflinger are using set_sched_policy
which is moved into libprocessgroup. Add libprocessgroup dependency
and include required headers.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Merged-In: Iccb7c54a85ca148d44ce687fe05e89ad4369e104
Change-Id: Iccb7c54a85ca148d44ce687fe05e89ad4369e104
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-22 18:17:28 +00:00
Suren Baghdasaryan
cd829054e9 Add libprocessgroup dependency and fix sched_policy include
surfaceflinger, installd and libvrflinger are using set_sched_policy
which is moved into libprocessgroup. Add libprocessgroup dependency
and include required headers.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Change-Id: Iccb7c54a85ca148d44ce687fe05e89ad4369e104
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-18 02:36:14 +00:00
Fan Xu
83e8073eec Remove DetachedBufferRPC and BufferChannel
Both of them used to be the PDX backend of DetachedBuffer (now
BufferHubBuffer) and now not needed as we have the hwbinder backend.

Test: buffer_hub-test, BufferHub_test
Bug: 118891412
Change-Id: I000042ee6f23f98fabcdd60eb2aedda928769314
2019-01-14 11:39:24 -08:00
Fan Xu
021776e289 Refactor BufferHubBuffer to use hwbinder
Entirely move BufferHubBuffer off pdx dependency and using hwbinder
backend and rewrite test cases to fit in current behavior.

Remove duplicated test cases in buffer_hub-test. Commented out
BufferHubBuffer related parts and remove related include and using
statement.

Add hidl interface dependency to libs/gui build file to avoid compile
errors.

Test: BufferHub_test, GraphicBuffer_test, buffer_hub-test
Bug: 116681016
Change-Id: I9d8f734f681e04d3d50b7a02c27b17df8c66cbad
2019-01-11 18:28:53 +00:00
Chih-Hung Hsieh
01fc0b7ff8 Merge "Fix/suppress libs/vr google-explicit-constructor warnings" am: dc23aff2d7 am: faec550a58
am: 2521ef0890

Change-Id: I5641a5974159770baef5bbf7a489bbf816f97ca7
2019-01-09 21:37:30 -08:00
Chih-Hung Hsieh
79e7f1b5f8 Fix/suppress libs/vr google-explicit-constructor warnings
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I3631041531e3fb5cbcee246a7e7bb94fb06aa60b
2019-01-09 14:42:33 -08:00
Tianyu Jiang
e60a4ad3b5 Post to all existing and non-existing consumers of the buffer
Previously, producer only post to all current clients of the buffer
except for the producer itself. In this change, producer post to all
existing and non-existing clients of the buffer except for the producer
itself.

Fix: 120869419
Test: Vega is able to recover itself during DON after killing vrcore
or compositor process.
Test: on vega_xr and blueline_xr with the following tests
buffer_hub-test buffer_hub_queue-test dvr_buffer_queue-test
dvr_api-test libdvrtracking-test(vega only) buffer_hub_queue_producer-test

Change-Id: I29f24268b7704fbeb06a4302b11dcd89dd13c133
2019-01-08 01:16:13 +00:00
TreeHugger Robot
a5341ec91f Merge "Rename Buffer{Producer, Consumer} to {Producer, Consumer}Buffer" 2019-01-02 22:01:33 +00:00
Jiwen 'Steve' Cai
1c730240e5 Rename Buffer{Producer, Consumer} to {Producer, Consumer}Buffer
Bug: 116855254
Test: Build
Change-Id: Ief03795d2093f817f135d33eb252e1e040e150f7
2019-01-02 11:45:52 -08:00
Chih-hung Hsieh
e2a20efd12 Merge "Add libs/vr/OWNERS" am: 38f78c1061 am: c3fcbd898a
am: 8fb16295f6

Change-Id: I19cad94d960bbc34a9373903a37ab754f22d95b1
2019-01-02 08:22:32 -08:00
Chih-Hung Hsieh
51bf3824f5 Add libs/vr/OWNERS
Bug: None
Test: git uploader
Change-Id: I68feb22b1671031fca66dbc1405500119d4d65c2
2019-01-02 02:42:02 +00:00