Commit graph

550 commits

Author SHA1 Message Date
Yifan Hong
33df4dbeb3 Merge "gralloc HAL uses "default" service name" 2017-02-24 18:21:11 +00: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
Yifan Hong
442b8933ea hwcomposer 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: I3d51429681d834f53dc5f6765e97675eafdceda4
2017-02-22 18:40:53 -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
Chia-I Wu
4339871180 graphics: composer should not die with its client
Fail elegantly when any of IComposerCallback method returns an
error.

Bug: 35334576
Test: manual
Change-Id: If84a265d3bfa01178ea7316d7fe3ba7941ad127f
2017-02-17 13:24:52 -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
TreeHugger Robot
86fa244c12 Merge "Update makefiles to use filgroup syntax." 2017-02-10 23:25:52 +00: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
Chia-I Wu
4a71a73843 graphics: use FIFO scheduler in IComposer
Make IComposer default implementation use the same process scheduler
as SurfaceFlinger does.

Bug: 35210697
Test: manual
Change-Id: Ie2ebe1d3fd26505984d9f6c33d63b5db36b0b64a
2017-02-10 12:23:45 -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
Chia-I Wu
e4b6f6a70d Merge "graphics: get rid of BINDERIZED" 2017-02-02 22:49:31 +00:00
Chia-I Wu
16624b69d6 graphics: get rid of BINDERIZED
It is always on now and all buffers be cloned and registered.
Clients (SF) should make use of the buffer caching mechanism and
pass each unique buffer once, to avoid the overhead.

Test: manual
Change-Id: I74ccbf74e110c8b413a66cfc60044b71ba3f44e3
2017-02-02 09:19:49 -08:00
Chia-I Wu
b00f59df0f graphics: add composer tests to VTS
Test: vts-tradefed run vts -m HalGraphicsComposerHidlTargetTest
Change-Id: I2e695787865d3bb855076acae18fa135064036ab
2017-02-01 15:07:29 -08:00
Chia-I Wu
fed07e87ea graphics: add basic target-side tests for IComposer
Add graphics_composer_hidl_hal_test.

Test: manual execution
Change-Id: I38c2fcd5cfb27dcd0299df389cbf84fe4056de1b
2017-02-01 15:07:29 -08:00
Daniel Nicoara
0a60e4bcbe Introduce ComposerBase interface to allow custom Hwc implementations
Decouples the ComposerClient code which deals with parsing the command buffer
messages sent by SurfaceFlinger from the Hwc code that handles the
commands.

Bug: 33297270
Test: Compiled and verified on device that hwcomposer-2-1 service can
start correctly. SurfaceFlinger can connect to the service and the
system boots up. Also verified SurfaceFlinger runs correctly without
hwcomposer-2-1.
Change-Id: I43357306caea57d262735f4756c379ba9d0138cd
2017-01-26 10:32:27 -05:00
Daniel Nicoara
bd82b81935 Rename CommandWriter to CommandWriterBase
CommandWriter will be used as a base class in extensions of HWC. Renamed
for consistency.

Bug: 33297385
Test: Compiled
Change-Id: Iabe59f37157062961b916d55108cb9f4fb792619
2017-01-23 14:57:15 -05:00
TreeHugger Robot
6b058752c5 Merge "Use MQDescriptor typedefs for cleanup" 2017-01-23 15:56:44 +00:00
Hridya Valsaraju
790db1074c Use MQDescriptor typedefs for cleanup
Test: mm
Bug: 33815422

Change-Id: I41ca833231622a5a72970014cfcac400b512e44a
2017-01-23 15:56:24 +00:00
Daniel Nicoara
3d2b8d63b5 Fix log message using undeclared variable
Bug: None
Test: Compiled with LOG_FATAL() enabled
Change-Id: Iffb709d2bc923bc7428abb1ee326f0ed147c38df
2017-01-13 10:19:00 -05:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -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
Martijn Coenen
028223775b Remove obsolete references to IPCThreadState/ProcessState.
Threadpool can now be configured/joined if needed with
configureRpcThreadpool() / joinRpcThreadpool().

Bug: 31226656
Test: mma
Change-Id: I0d7d9924cc8c8851cc2b61ebdae906204909890e
2016-12-30 14:00:31 +01:00
Hridya Valsaraju
33351dae85 Templatize MQDescriptor and rename to fmq_sync/fmq_unsync
Bug: 33948735
Test: builds, FMQ unit tests and benchmarks pass.
Change-Id: I5c3beff2c6a69e151e0cb11af299956638cc441b
2016-12-29 14:52:16 -08:00
Chia-I Wu
e4c429ccd2 Merge "graphics: replace non-const references by pointers" 2016-12-23 02:04:27 +00:00
Chia-I Wu
e176835019 graphics: replace non-const references by pointers
Pointers are preferred for output parameters in graphics code.  While at
it, initialize local variables that are for outputs.

Test: builds and boots
Change-Id: I959706ea92949bc2f993ee9beff0c8b0c3121347
2016-12-23 07:37:50 +08:00
TreeHugger Robot
f938ff2124 Merge "Change FMQ header location" 2016-12-20 23:14:42 +00:00
Hridya Valsaraju
89b5e6b318 Change FMQ header location
Bug: 31223612 33295104
Test: make
Change-Id: Ib999317333a13fe205dfa7b198f7edbb6657734b
2016-12-20 07:34:53 -08:00
Dan Stoza
0df10c4e41 HwcClient: Fix plane alpha
Plane alpha was being sent as a float but read as unsigned, which, when
converted to a float was causing things that were supposed to be
translucent to be opaque.

Bug: 33739111
Bug: 33737738
Test: Scrim behind modal dialogs is translucent and there is no more
      glitch when rotating apps

Change-Id: I6896bdbb9928bd1aa7265b3ef25a7a96d54ee227
2016-12-19 15:22:47 -08:00
Chia-I Wu
bb61a72be7 graphics: rework IComposer
Similar to IAllocator, introduce IComposerClient to manage resources.
Rework the interface such that most state changing calls are batched in a
"command buffer" and execute together.  The goal is to reduce the number
of IPC calls needed to set up the composer.

Test: builds and boots
Change-Id: I324009243234c4d2482ca0ef2591377b11530fc9
2016-12-16 10:27:39 +08:00
Yifan Hong
501839495f Update makefiles for hidlizing IBase.
A new dependency android.hidl.base@1.0 is added for
all projects.

Test: mma

Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
2016-12-03 01:01:14 -08:00
Steven Moreland
bbff14d4bb Merge "Update makefiles for logging." 2016-11-22 17:25:36 +00:00
Martijn Coenen
70b9a15df0 Use newly introduced hidl_handle.
Bug: 32089785
Test: builds
Change-Id: I27c7d3945e1fe390661bf322987011a00fe9b3fe
2016-11-22 09:03:11 +01:00
Steven Moreland
f8d68ec855 Update makefiles for logging.
Bug: 32943424
Test: pass
Change-Id: Ic88ce6adf04e0e36db53e4cc06ac2ec5a90c011c
2016-11-21 16:28:54 -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
Yifan Hong
c2f2779d9d Update Android.bp to reexport dependent packages.
Test: mma
Change-Id: Iaca7300c366c2c9e860a29e6a111248d315cc5b4
2016-11-09 10:28:38 -08:00
Colin Cross
b785f5b82e Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.

Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
2016-11-04 22:49:15 -07:00
Steven Moreland
fcd74ebcdc Running update makefiles.
https://android-review.googlesource.com/#/c/298160/

Test: pass
Change-Id: I14fcde2d3aacc8f8cd9221f2d69e2feae9ae1226
2016-11-02 10:24:33 -07:00
Steven Moreland
69727778a7 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:04:37 +02:00
Chia-I Wu
b0b5a4de76 graphics: add IComposer service daemon
Since HALs might run binder services, we need to start thread pool for
both binder and hwbinder.

Bug: 32021609
Test: builds and boots
Change-Id: I9779e86b1e611a180b1984af36c417dafc3329bc
2016-10-19 12:04:51 +08:00
Chia-I Wu
0c6b7f42a6 graphics: fix leaks in IComposer default impl
When a layer is removed, remove its cached buffer/sidestream as well.

Test: fixed OOM
Change-Id: Ibafe18ff686ae6bcb1fc4baed30b7784d2b40529
2016-10-19 12:00:45 +08:00
Chia-I Wu
7f8d39669c graphics: add a default implementation for IComposer
The default implementatoin is built on top of conventional hwcomposer2.

Test: make
Change-Id: Ia4f13b1d682462769056679fc0aae82a75cb53d2
2016-10-13 16:40:51 -07:00
Chia-I Wu
acce69901d graphics: add HIDL definition for HW composer
This is a direct translation of hwcomposer2.h to HIDL.

Test: make
Change-Id: Id007af271b06f0d86afc8bc7c57300c588dc4081
2016-10-13 16:40:51 -07:00