Commit graph

129 commits

Author SHA1 Message Date
Jesse Hall
66ee1771a6 Use gralloc usage conversion library
Converting from ..graphics.allocator@2.0 usage to gralloc0 usage isn't
quite as simple as ORing and truncating, which is what the default
implementation was doing. Switch to using library functions that do it
correctly.

Test: boot bullhead
Change-Id: I40ae00e9aad92b374f281569207972b7461a3e55
2017-03-28 08:23:21 -07:00
Steven Moreland
c8e2b3f7c5 Remove viral readproc group dependency.
This has been copy pasted and isn't actually required.

Test: all hals manually tested to work on internal marlin (which have them binderized).
  Note: tv hals not tested (and they never have been). Filed b/36562029
  Note: for thermal hal, could only run VTS/check logs for errors.
Test: lshal outputs proper stuff
Fixes: 31928447
Change-Id: Id1be584dc0fa2d70e9189b922335146bf6d1382d
2017-03-23 19:49:37 +00:00
Fabien Sanglard
9b117a4dd2 Fix library dependency, remove undeclarate deps
Remove undeclared dependency of libhwcomposer-client on Hwc.h which
created a circular dependency.

Test: Manual
Change-Id: I74d5c4e2db5d247f8b406d1ea42fece41e76659d
2017-03-21 09:43:36 -07:00
Fabien Sanglard
0d55a21044 Add graphics composer support for HWC > HWC1.1
Test: Ryu, Marlin
Change-Id: I58a7394f427534b942d64c93b1891a756c5f510c
2017-03-20 12:24:29 -07:00
TreeHugger Robot
52efd43eee Merge "Move IGraphicBufferProducer to graphics/bufferqueue." 2017-03-15 20:55:46 +00:00
Pawin Vongmasa
4a3cd13ddc Move IGraphicBufferProducer to graphics/bufferqueue.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 35442034
Change-Id: Ia1ef0eb069fcd97f7afcf42bf3bb16c8c6a752c4
2017-03-15 11:42:40 -07:00
Courtney Goeltzenleuchter
a3023d9b44 Update Display-P3 transfer function
Decided to use same transfer function that Apple is
using for their Display-P3 devices. Difference between
sRGB transfer function and Display-P3 is very small.
We will treat them an synonymous.

Test: make

Change-Id: Id4e52058f2b810b70c46821c5fe6830e623c5491
2017-03-15 08:11:25 -06: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
TreeHugger Robot
88cfac9540 Merge "graphics: fix a potential use after free" 2017-03-10 20:51:48 +00:00
TreeHugger Robot
d46602235b Merge "graphics: really reset HWC2 on SF crashes" 2017-03-10 20:42:39 +00:00
Chia-I Wu
41a1c15a40 graphics: fix a potential use after free
We cannot lookup _and_ update buffer cache entry in lookupBuffer.
The old buffer is still in use by hwcomposer2.  Add updateBuffer to
do the update after the new buffer has replaced the old buffer in
hwcomposer2.

While at it, s/BufferClone/BufferCacheEntry/g.

Bug: 36064845
Test: manual
Change-Id: I59b61c0198ad528c40020fdebbe27a6cc359226f
2017-03-10 10:53:32 -08:00
Chia-I Wu
6c84f7ee8c graphics: really reset HWC2 on SF crashes
Perform a final presentDisplay to clear the screen and get HWC2 out
of any special state (e.g., some implementations put themselves in
special states between validateDisplay and presentDisplay).  Our
only portable choice really is to abort(), but that is not an option
because we have other clients such as VTS or VR.

Bug: 35872161
Test: manual
Change-Id: I9028705607d1b86d418a379c6e90e833d638b3f5
2017-03-09 09:20:11 -08: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
8cc5a15410 graphics: clean up composer VTS tests
Add libVtsHalGraphicsComposerUtils which provides a wrapper to
IComposer.  Port tests to be based on
libVtsHalGraphicsComposerUtils.

Test: manual
Change-Id: I400c347b54702c3d45954e6cdc101d3dc1241efd
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
Chia-I Wu
69505c6842 graphics: clean up allocator VTS tests
Add libVtsHalGraphicsAllocatorUtils which provides a wrapper to
IAllocator.  Port tests to be based on
libVtsHalGraphicsAllocatorUtils.

Test: manual
Change-Id: I6d56160dc4fa6e5106cc55e75cdd923f15635317
2017-03-07 12:23:25 -08:00
Courtney Goeltzenleuchter
37606f9fe9 Add dataspace to match upstream EGL extension
EGL's EGL_EXT_gl_colorspace_bt2020_pq extension
supports a bt2020 color space with a ST2084
transfer function (Dolby Perceptual Quantizer)
Test: make

Change-Id: I3de03b91ee24880a4b2dab14c0f07185a53bf067
2017-03-02 13:50:43 -07: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
2bb6dc745e Merge "hwcomposer HAL uses "default" service name" 2017-02-25 02:40:45 +00:00
Yifan Hong
69ab674dce 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: I0c7987ffa7b22bb7386a4a1320242b3248e434e4
2017-02-24 16:55:20 -08: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
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
TreeHugger Robot
a9e8d15a46 Merge "graphics: use FIFO scheduler in IComposer" 2017-02-10 22:47:13 +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
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20: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
Courtney Goeltzenleuchter
1b2a09e5c9 Merge "Add enums for 10bit color formats" 2017-01-30 15:49:52 +00:00
TreeHugger Robot
0bf271e2b4 Merge "Add dataspace definition for sensor direct report" 2017-01-28 01:56:52 +00: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
Courtney Goeltzenleuchter
0d955c185b Add enums for 10bit color formats
To improve wide-color behavior it's useful to have more bits
per color component. This defines 10:10:10:2 and 10:10:10:X
for that use.
This can be used for any color space / dataspace that is
compatible with unsigned integer components, e.g. Display-P3,
BT2020, etc.
Test: TBD

Change-Id: I69647f6bb2d5b0666a0819b10ee42705361e267d
2017-01-25 10:38:08 -07:00