Commit graph

304 commits

Author SHA1 Message Date
Peiyong Lin
ab505aaf90 [HWC] Add setLayerFloatColor API into HAL.
This patch:

1. Adds setLayerFloatColor API into HAL to enable setting more bits of color on
ColorLayer;
2. Adds VTS tests for setLayerFloatColor.

BUG: 69970838
Test: adb shell /data/nativetest/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I439e35cb2505ee47b8e9a8dd1c19a3f3f2cf9c2f
2018-01-25 05:58:32 +00:00
TreeHugger Robot
c133b9087a Merge "Add new HWC HAL methods for Android P." 2018-01-25 05:55:38 +00:00
Courtney Goeltzenleuchter
be92bb9fae Add new HWC HAL methods for Android P.
Add new methods to support HDR, video readback mechanism and
additional power mode.

Test: adb shell /data/nativetest/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest
Bug: 71513501
Change-Id: I45596df6c5a2a726e12f524e82681aef4bcbe180
2018-01-24 17:19:55 -08:00
Chia-I Wu
887a59b301 Merge "graphics: add createDescriptor_2_1 to mapper" 2018-01-24 23:57:03 +00:00
Courtney Goeltzenleuchter
33f62da78c graphics: Add Dataspace and PixelFormats for HDR
Bug: 63710530
Test: make
Change-Id: Iea9b9cf7948567c3cb596de4f628459684aff569
2018-01-24 08:34:14 -08:00
Chia-I Wu
25416b5a1d graphics: add createDescriptor_2_1 to mapper
With new formats and buffer usage bits, we need new
createDescriptor.

Test: VTS
Change-Id: I87e39297f9c1c53377fcc62fb086629779409c16
2018-01-23 20:37:51 -08:00
Courtney Goeltzenleuchter
5ecd86aa40 Update hwcomposer include paths
In preparation of new hwcomposer interface, updating
existing includes to include specific version.
Note: IComposerCommandBuffer.h was moved, renamed and clang
formated, but otherwise had no code changes.
Bug: 71513561
Test: compile

Change-Id: If34cb6f63012592a245708109590653ace7009f5
2018-01-22 11:51:38 -08:00
Craig Donner
243da4d2b8 graphics: add graphics common 1.1 HAL with new pixel formats and usages.
Bug: 66900669
Test: Build
Change-Id: Ie8ba599230c7491aee337c8c333a96859c1ce83d
2018-01-19 10:16:22 -08:00
Chia-I Wu
e3d33876d4 graphics: use allocator HAL support library in default impl am: 699df2167a am: 4e8ce3ea5e
am: 0569d7fdec

Change-Id: Id09e0c7e8a864c350ea6f4bfa9f24b5485ce60d3
2018-01-16 18:46:36 +00:00
Chia-I Wu
aa04f5beb9 graphics: clang-format allocator default impl am: 864c9f8234 am: 0651511689
am: c11b350596

Change-Id: Iffa1203ba058201539f0bb34c910c5fddb93a66f
2018-01-16 18:46:18 +00:00
Chia-I Wu
986c62c85b graphics: make allocator default impl a static library am: b511645d99 am: 80a04eb319
am: 2876b05378

Change-Id: I9a1cb8b600a0b1846877cacf15d837a47aeaf07f
2018-01-16 18:46:01 +00:00
Chia-I Wu
dc3f02702b graphics: add allocator HAL support library am: d6daa8ddf9 am: 8615b56780
am: 53cd26c8a1

Change-Id: I8af338181cc1bf4c7740e8fa63db4d733b27d3c1
2018-01-16 18:45:39 +00:00
Chia-I Wu
7c19ef13d7 graphics: move libgralloc1-adapter am: d6695d5bdc am: a3c036bd37
am: 719bc97bff

Change-Id: I770edfe2ea29dfbce8c42a79e435c5519aae238e
2018-01-16 18:45:09 +00:00
Chia-I Wu
0569d7fdec graphics: use allocator HAL support library in default impl am: 699df2167a
am: 4e8ce3ea5e

Change-Id: I7209539b81e797f733b2aeb3a395493f64f21834
2018-01-16 18:20:26 +00:00
Chia-I Wu
c11b350596 graphics: clang-format allocator default impl am: 864c9f8234
am: 0651511689

Change-Id: I2575d33a4ee67765f34e14f29e0201e53c9b0c65
2018-01-16 18:20:10 +00:00
Chia-I Wu
2876b05378 graphics: make allocator default impl a static library am: b511645d99
am: 80a04eb319

Change-Id: I35c1242805ac7fff18f36b75158e2da007f61396
2018-01-16 18:19:55 +00:00
Chia-I Wu
53cd26c8a1 graphics: add allocator HAL support library am: d6daa8ddf9
am: 8615b56780

Change-Id: Iac7b475ad6faa7179844c94c2739111ab0c3b4e6
2018-01-16 18:19:37 +00:00
Chia-I Wu
719bc97bff graphics: move libgralloc1-adapter am: d6695d5bdc
am: a3c036bd37

Change-Id: I25f42dcd297350e8eb5cc9fc1eb6992e9f9dc9d5
2018-01-16 18:19:12 +00:00
Chia-I Wu
4e8ce3ea5e graphics: use allocator HAL support library in default impl
am: 699df2167a

Change-Id: I0d3638495db0f8d120e2b96f6fa4549eadb581da
2018-01-16 18:10:21 +00:00
Chia-I Wu
0651511689 graphics: clang-format allocator default impl
am: 864c9f8234

Change-Id: I1a83cdbf10c27859649c10cf2e1c62c2974e99fa
2018-01-16 18:10:08 +00:00
Chia-I Wu
80a04eb319 graphics: make allocator default impl a static library
am: b511645d99

Change-Id: I819a76dd72a045e2b6e0f29106babc6c6785c895
2018-01-16 18:09:56 +00:00
Chia-I Wu
8615b56780 graphics: add allocator HAL support library
am: d6daa8ddf9

Change-Id: I50217b7819b51ffa8961067b0673739d31e7c299
2018-01-16 18:09:40 +00:00
Chia-I Wu
a3c036bd37 graphics: move libgralloc1-adapter
am: d6695d5bdc

Change-Id: Ia5fc06453eb0fd1dd57e13b703bb5ee07e395f06
2018-01-16 18:08:50 +00:00
Chia-I Wu
699df2167a graphics: use allocator HAL support library in default impl
Rename Gralloc0Allocator to Gralloc0Hal and make it inherit from
AllocatorHal.  Do the same to Gralloc1Allocator.  Add GrallocLoader
to load either of Gralloc[01]Hal and create a IAllocator instance.

Test: boots and VTS
Change-Id: I09ae680c0086ca9e73e412a34d7cd2f3665d3bc2
2018-01-14 21:39:38 -08:00
Chia-I Wu
864c9f8234 graphics: clang-format allocator default impl
Test: builds
Change-Id: I01cee2e7bc778f2e3e540a9856c25f1a0e390186
2018-01-14 21:39:38 -08:00
Chia-I Wu
b511645d99 graphics: make allocator default impl a static library
Convert the default impl into a static library,
android.hardware.graphics.allocator@2.0-passthrough.

Test: boots and VTS
Change-Id: I8ec8b30766462ecb3fb789af7c6dbb3c088ccf57
2018-01-14 21:39:38 -08:00
Chia-I Wu
d6daa8ddf9 graphics: add allocator HAL support library
Add a header-only library
android.hardware.graphics.allocator@2.0-hal that can be used by
implementations.  An imlpementation can

  class VendorHal : public AllocatorHal { ... };

  auto allocator = std::make_unique<Allocator>();
  allocator->init(std::make_unique<VendorHal>(...));

Or, if vendor extensions are to be added to the IAllocator,

  class AlocatorHalExt : public AllocatorHal { ... };
  class VendorHal : public AllocatorHalExt { ... };
  class AllocatorExt : public AllocatorImpl<IAllocatorExt, AllocatorHalExt> { ... };

  auto allocator = std::make_unique<AllocatorExt>();
  allocator->init(std::make_unique<VendorHal>(...));

Test: builds
Change-Id: I7cb7a4888316b871e5c49d96524b1642fc708f2d
2018-01-14 21:39:38 -08:00
Chia-I Wu
d6695d5bdc graphics: move libgralloc1-adapter
Move libgralloc1-adapter from 2.0/default/ to
2.0/utils/gralloc1-adapter/.  Fix build issues after the move.

Test: builds
Change-Id: I674fe60c724a4ffc1540c796b92209a1dbf36438
2018-01-14 21:39:38 -08:00
Lloyd Pique
2765f9d406 Fix crash on hotplug disconnect
ComposerClient destroys its internal model of the display while handling
the onHotPlug event from the Hwc. Subsequently SurfaceFlinger destroys
its model of the display, and destroys all Hwc layers associated with
the display.

This fixes the code for destroying layers to not dereference an invalid
iterator if the display does not exist, allowing destruction to
continue.

It also fixes a similar issue which could occur if a HWC layer is being
created for a display at around the same time as the disconnect event.

Test: hotplug disconnect no longer crashes
Bug: 38464421
Change-Id: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
2018-01-11 13:04:50 -08:00
Chia-I Wu
e3c695c8e6 Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" am: f43ab227a5 am: 8e1ec23a5d
am: a72e80eafa

Change-Id: I40e32ddcb9646f08e1cb0b7a0eaa137ea4b6b94b
2017-12-21 17:40:56 +00:00
Chia-I Wu
a72e80eafa Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" am: f43ab227a5
am: 8e1ec23a5d

Change-Id: I856a4bfc708f34a331f83e1466e689a2fa5427b7
2017-12-21 07:30:24 +00:00
Chia-I Wu
8e1ec23a5d Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support"
am: f43ab227a5

Change-Id: Ief20e5b035a25b77fe714b0ace4d3d4fa543380d
2017-12-21 07:28:39 +00:00
Chia-I Wu
f43ab227a5 Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" 2017-12-21 06:54:22 +00:00
Jiyong Park
e514a4b8a8 android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

Unmark the 'support_system_process' property to exclude the lib from
VNDK-SP.

This commit re-lands I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd because
it was reverted during O-MR1 push to AOSP-master.

Bug: 69480083
Test: walleye boots to the UI
Change-Id: I0af8115dceb9711c6c451ffaeedda6c823ec2905
Merged-In: I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd
(cherry picked from commit ec44d18dbe)
2017-12-13 11:58:24 +08:00
Chia-I Wu
cdc287ba06 graphics: improve PRESENT_OR_VALIDATE_DISPLAY support
There is no cap defined for PRESENT_OR_VALIDATE_DISPLAY in HIDL so
it must always work.  Make sure it does not call HWC2 presentDisplay
when the underlying HWC2 does not support
HWC2_CAPABILITY_SKIP_VALIDATE.

Bug: 70407085
Test: boots
Change-Id: I54a4400e09e669c5064f05739f595ed978dcc713
2017-12-12 09:37:19 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
8b76a6b90d Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:55 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Jiyong Park
ec44d18dbe android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

Unmark the 'support_system_process' property to exclude the lib from
VNDK-SP.

Bug: 69480083
Test: walleye boots to the UI
Change-Id: I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd
2017-11-21 10:45:29 +09:00
Zhuoyao Zhang
164cfb73d9 Convert GraphicsMapper Hal test to test against each of the service names. am: 94b11ca19f am: c8c5001b00
am: 3b9ea1cd62

Change-Id: I35fe24a6b990daf5244a276b250d22d034398461
2017-11-15 02:31:15 +00:00
Zhuoyao Zhang
3b9ea1cd62 Convert GraphicsMapper Hal test to test against each of the service names. am: 94b11ca19f
am: c8c5001b00

Change-Id: Iec2365f86d51388a2fdcb69eba35e8d746d1ba78
2017-11-15 01:47:25 +00:00
Zhuoyao Zhang
c8c5001b00 Convert GraphicsMapper Hal test to test against each of the service names.
am: 94b11ca19f

Change-Id: I067c835282bdd84571f3e57ab61073ed2fd54b15
2017-11-15 01:35:13 +00:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Zhuoyao Zhang
94b11ca19f Convert GraphicsMapper Hal test to test against each of the service
names.

Bug:64203181
Test: vts-tradefed run vts -m VtsHalGraphicsMapperV2_0Target
Change-Id: Icbef0f0575183033c069d8ec097ab774207c40de
2017-11-13 17:10:25 -08:00
Steven Moreland
c2f829a1d2 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 11:39:07 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Chia-I Wu
d4bb253b18 graphics: add OWNERS file to default implementations am: e3b1836d90 am: d9c63996ce
am: eb4eba96c9

Change-Id: Ieef144876dfa608ddf34de391ce40e8fd8d6c7c4
2017-11-07 19:12:52 +00:00
Chia-I Wu
eb4eba96c9 graphics: add OWNERS file to default implementations am: e3b1836d90
am: d9c63996ce

Change-Id: I3b582fba337306fe2fb32b5b480ccef7d763a97d
2017-11-07 19:00:29 +00:00
Chia-I Wu
23dbc0f5ab graphics: support FB HAL using HWC2OnFbAdapter am: 16e8ed254d am: 20b073fe6c
am: 85ade632ce

Change-Id: I6f020f5fbe0ecd04d5115e1553169b23bf3d196f
2017-11-07 18:23:51 +00:00