Commit graph

117 commits

Author SHA1 Message Date
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
73949c1d7e Update makefiles for hidl adapter.
am: 26a0bb2762

Change-Id: I3a811f5cd49bd4e81e8fcd5c8e88922115812539
2017-09-25 23:14:44 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Tri Vo
70029d3378 Merge "Graphics tests statically link to HAL definition libs." into oc-mr1-dev am: 43b3865a3d
am: ed296a8217

Change-Id: Icd03586ac54fda2b01dc1158d4e3ea804be6454c
2017-08-10 03:53:00 +00:00
Tri Vo
1b7c33562f Graphics tests statically link to HAL definition libs.
These tests now statically links to HAL def libs which are
not guaranteed to be on the device.

Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalGraphicsMapperV2_0Target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalGraphicsComposerV2_1Target
Change-Id: I83b68dafbd161f88394f67dbda14f9957ddf7232
2017-08-07 14:07:52 -07:00
Justin Yun
62b93f3f02 Manually update makefile for vndk-sp hidl libs. am: f2bd6c12a2
am: f0a51054c2

Change-Id: I008a20736fca7ad42a1932d80334fb1148e763b1
2017-08-05 02:17:41 +00:00
Justin Yun
723c2dbd43 Update make file for vndk enabled. am: 608d773ef8
am: d66371512c

Change-Id: I35b778c39c2349346278deb6dea56b8cd3701f7d
2017-08-05 02:17:38 +00:00
Justin Yun
f2bd6c12a2 Manually update makefile for vndk-sp hidl libs.
vndk-sp is not automatically tagged by hidl-gen.
For vndk-sp libs, "support_system_process: true" is manually added
in "vndk" property.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: I2b18d691411e58dc55bcdfa39ecb3659242c8437
2017-08-04 14:40:55 +09:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Tri Vo
0621d2f517 Update Android.bp HIDL makefiles am: f5d136c231
am: 7694738e26

Change-Id: I7592025d540bbe46d2e2726ae39ae34f352a1a30
2017-08-03 15:37:24 +00:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Zhuoyao Zhang
d710dd540d Add graphics test owners file.
Test: none.
Change-Id: I00c7568c8ae350edc2a442b005ab84ea6a0988e2
2017-07-28 11:25:28 -07:00
Jesse Hall
5efa773cc1 Revert "Load the gralloc module at library load"
This reverts commit 33c08a53ac. Some
gralloc implementations apparently have library initializers (executed
on dlopen) which create anonymous sockets, open device nodes, etc.
which Zygote and some other non-Zygote-child processes that use libui
don't have permissions to do. When the library initializer fails, it
crashes the process.

Reverting this until this initialization code can be made lazy (on
first use of gralloc).

Bug: 62732270
Test: boot fugu to launcher
2017-06-19 11:48:09 -07:00
Jesse Hall
33c08a53ac Load the gralloc module at library load
In the a.h.graphics.mapper default implementation, load the gralloc
module in a static constructor that runs when the library is loaded.
This causes Zygote to load the gralloc module and its dependencies
when it loads a.h.graphics.mapper, so that it doesn't have to be
loaded during each activity launch.

Bug: 62353585
Test: boot to launcher, run calculator, confirm gralloc library is in
      /proc/`pid zygote64`/maps

Change-Id: I56defd76b0ba0fba71dea48e2b0d338511563d1f
2017-06-16 00:48:36 +00:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Steven Moreland
d09cf863da Update makefiles for c++-sources and c++-headers. (2/2) am: bc71124120
am: a32ebce372

Change-Id: Ic1dd8f98e72656bc12a6e5224e541f75afb79daa
2017-05-11 01:38:14 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Mathias Agopian
d8931ac871 fix circular dependency libnativewindow <-> libui
Bug: 37647680, 37648355
Test: compile, manual
Change-Id: I2fdec8e86f6729aadd572a250b9d55d77f0d4eef
2017-05-09 16:40:51 -07:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
Steven Moreland
2cd0d42d72 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 10:17:28 -07:00
Chia-I Wu
ec74596af8 graphics: clarify importBuffer and passthrough HALs
A buffer handle recieved from a HAL is by definition raw and needs
to be imported.  But because of passthrough HALs, such a raw handle
may have been imported already.  Explicitly specify that an
implementation must accept such a raw handle.

Bug: 37540361
Test: boots on angler, ryu and marlin
Change-Id: I5ecf526e59b27cc4a8f7f5d5ec27477da0946ece
2017-04-25 12:52:50 -07:00
Chia-I Wu
78b63dc6a1 graphics: keep mapper valid during process termination
GraphicBufferMapper is valid during process termination.  IMapper
must stay valid as well.  It should not rely on global/static
objects that may have been destructed.

Bug: 37480313
Test: libgui_test
Change-Id: Icb8079153306f2465c26c0f1ce812895ad83f21b
2017-04-19 11:47:25 -07:00
Steven Moreland
17f0c0dde7 Merge changes from topic 'hidl-vendor-available' into oc-dev
* changes:
  Update makefiles (2/2).
  Update makefiles.
2017-04-12 22:13:58 +00:00
Steven Moreland
fed12441ac libgrallocmapperincludes: as header lib and vendor
Bug: 33241851
Test: links
Test: try build with BOARD_VNDK_VERSION current, no errors related to
  this module
Test: (sanity) YouTube

Change-Id: Ia2c3922bf8bf1ab51396a8c8c5fa8d909c442994
2017-04-12 09:57:32 -07:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
Chia-I Wu
79d13ff0f5 graphics: revise gralloc interfaces
Revise IAllocator and IMapper to reduce IPC and to support gralloc0
devices.

Specifically, IAllocator is trimmed down to have essentially only

    allocate(BufferDescriptor descriptor, uint32_t count)
        generates (Error error,
                   uint32_t stride,
                   vec<handle> buffers);

The ability to allocate buffers with shared backing store is
removed.  ProducerUsage and ConsumerUsage are moved to the
graphics.common package and are merged and renamed to BufferUsage.
BufferUsage's bits follow gralloc0.

IMapper gains

    typedef vec<uint32_t> BufferDescriptor;
    createDescriptor(BufferDescriptorInfo descriptorInfo)
          generates (Error error,
                     BufferDescriptor descriptor);

where BufferDescriptor is an implementation-defined blob.  lockFlex
is replaced by lockYCbCr.  All getters are removed.

Reference counting with retain/release is replaced by
importBuffer/freeBuffer.

Most if not all gralloc1 features are not used by the runtime yet.
There is also not too much test written for them.  As such, they
tend to behave differently between implementations and cannot be
used reliably.

Bug: 36481301
Test: builds and boots on Pixel
Change-Id: I1d31105120517ea2c128c7a19297acf3bfd312bb
2017-04-10 11:15:54 -07:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Yuexi Ma
ed2bb4e8f8 Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I95f10ad7a66f261c9030357edd411fe6d94150e8
2017-03-10 21:14:48 +00:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Chia-I Wu
d412d7b1d2 graphics: initialize count to 0 in initCapabilities
Be more defensive against HALs that do not initialize count.

Test: manual
Change-Id: I8b70454a1a3134c01d225be504579fc2e81ca88b
2017-03-07 14:45:33 -08:00
Chia-I Wu
c2e949ec5f graphics: add a basic test for IMapper::lockFlex
Bug: 32023011
Test: manual
Change-Id: Iae143d11056f6ab169d1068fdaa62e889051b16e
2017-03-07 12:26:03 -08:00
Chia-I Wu
89d09ddb0a graphics: clean up mapper VTS tests
Add libVtsHalGraphicsMapperUtils which provides a wrapper to
IMapper.  Port tests to be based on libVtsHalGraphicsMapperUtils.

Test: manual
Change-Id: I0639df178fd0a94153b48733930bb13f2d0aa930
2017-03-07 12:24:26 -08:00
Yuexi Ma
50d7e27b3c change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
2017-02-28 22:27:28 +00:00
TreeHugger Robot
2653620a61 Merge "Remove viral dependency on libhwbinder. (2/2)" 2017-02-24 23:25:26 +00:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Chris Phoenix
c8e3295842 gralloc HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: Ic3859ccf21e7ee5177f47cb06e3e0c93dd572bf6
2017-02-23 11:28:54 -08:00
Tri Vo
d94a7d2df9 Remove .vts spec files
Test: mmma hardware/interfaces
Change-Id: Idae97ce60a6368cfa685ae6b2d71b9ad163e8605
2017-02-22 12:53:52 -08:00
Zhuoyao Zhang
8422f6aa04 Update the test binary and source file name on master.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: I845da64085253cd02480465479618308045a52ed
2017-02-21 20:47:18 -08:00
Ryan Campbell
2caf0a60f3 Remove coverage flags from tests.
Remove unnecessary coverage flags from HAL tests.

Bug: 32749731
Test: none
Change-Id: I7e4e3bce2d9d444bfa8475c140bce2ee7e3b0c0d
2017-02-14 16:50:34 -08:00
Zhuoyao Zhang
f008f8fdc4 Merge "Update .vts files on master based on the latest .hal file and hidl-gen" 2017-02-14 18:51:27 +00:00
Zhuoyao Zhang
3bef939f94 Update .vts files on master based on the latest .hal file and hidl-gen
Test: mma
Change-Id: I9558f300505db83e26f7c241c5cf729cd005a07b
2017-02-13 18:03:06 -08:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Keun Soo Yim
7b9b6ca18f move VTS stub files and non-functional tests
Test: mma
Bug: 34976004
Change-Id: I20273bdc3a05e2986fcf921f65d2afd6d72781e4
2017-02-04 02:45:25 +00:00
Zhuoyao Zhang
e9b43bbe2d Update Andriod.bp for hals.
* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
2017-02-03 10:03:01 -08:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -08:00
Yifan Hong
d0461a4992 Add missing dependencies in graphics mapper vts test.
graphics_mapper_hidl_hal_test is using types from
android.hardware.graphics.common@1.0, but common@1.0 was
not added as a dependency in Android.bp.

Test: make vts compiles
Change-Id: I0d1333e69e63f915df4e99c76173f32fb2c89093
2017-01-09 15:27:33 -08:00
Chia-I Wu
939e4018c2 graphics: rewrite libgralloc1-adapter
Rewrite libgralloc1-adapter to be based on Gralloc1On0Adapter.
Previously, the adapter targeted maximum portability and maximum
performance.  The rewritten adapter targets ease of use instead.

This also fixes a bug in the adapter's GRALLOC1_FUNCTION_RELEASE.  The
function does not imply native_handle_close/native_handle_delete.  As a
result, IMapper and IComposer are also fixed to close/delete handles.

Test: builds and boots
Change-Id: I5c071453dc950583087ae07967bca2c22866c538
2017-01-06 12:31:26 +08:00
Chia-I Wu
c7b1fa17cf graphics: add gralloc tests to VTS
Test: vts-tradefed run vts -m HalGraphicsAllocatorHidlTargetTest
Test: vts-tradefed run vts -m HalGraphicsMapperHidlTargetTest
Change-Id: I35e03b42e693da1bd3cfc6beac2a64771e0b8ed9
2017-01-05 09:32:30 +08:00
Chia-I Wu
98f99cf4df graphics: add basic target-side tests for IMapper
Add graphics_mapper_hidl_hal_test.

Test: manual execution
Change-Id: Ieb8be74fad1b35f69d74f6f3a93dfa4289fee91d
2017-01-05 09:32:30 +08:00
Chia-I Wu
158d5302f5 graphics: HIDLize IMapper
Test: builds and boots
Change-Id: I37503ae4826c3e864d7457fd688c2d5f5dd652a3
2016-12-23 07:39:57 +08:00
Chia-I Wu
0b855f81c8 Merge "graphics: remove duplicated types" 2016-11-21 02:52:34 +00:00
Yifan Hong
6b920e43d3 Split libhidl into base and transport.
Bug: 32756130

Test: mma
Change-Id: Id21cf23abe2910f26bb7895511862443b93dc112
2016-11-18 00:00:54 -08:00
Chia-I Wu
1c45727b5d graphics: remove duplicated types
Remove duplicated types from allocator@2.0 and composer@2.1.  Those types
are now in common@1.0.

Bug: 32238126
Test: builds and boots
Change-Id: Ibdb907e47969f5a5a98a14a2e2b77a9c5880beff
2016-11-18 08:03:31 +08:00
Craig Donner
0b00adf391 Add layered image support to gralloc1 hal.
Bug: 31686534
Test: manual
Change-Id: I6442413072cef2a19abd3aacddf964ca1f4e7481
2016-11-11 11:35:06 -08:00
Colin Cross
ded9852531 Stop using genrule to copy headers
There is no need to use a genrule to copy headers, just move them into
an appropriate directory in the source tree and export them directly.

Bug: 31948427
Test: mmma -j frameworks/native/libs/ui
Change-Id: I9c5f385e29c78d47479c77a546cfc737e4dd40f8
2016-11-04 22:49:15 -07:00
Chia-I Wu
0f215c5a33 graphics: add a default implementation to IMapper
The default implementatoin is built on top of conventional gralloc1.

Test: make android.hardware.graphics.mapper.hallib
Change-Id: I8647dc69dbb1637a141d36358d5769f450422ac1
2016-10-12 06:59:26 -07:00
Chia-I Wu
9af67ec5f8 graphics: add IMapper to complement IAllocator
IMapper is loaded in-process and is defined in C++ instead of HIDL.  To
guarantee binary compability, the interface is a struct of function
pointers instead of a class of pure virtual member functions.  The
functions pointed to by the function pointers must also have C-linkage and
have all of their parameters PODs.

Implementations are expected to be installed to

  /oem/lib/hw/android.hardware.graphics.mapper.hallib.so
  /vendor/lib/hw/android.hardware.graphics.mapper.hallib.so
  /system/lib/hw/android.hardware.graphics.mapper.hallib.so
  (lib64 instead of lib for 64-bit implementations)

The loader will look for the symbol "HALLIB_FETCH_Interface" and use it to
fetch the interface.

Test: make android.hardware.graphics.mapper@2.0
Change-Id: I3a2c7a6ce18a90adda6df2d89559c957a122fdf0
2016-10-12 06:59:26 -07:00