After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented
Bug: 130669566
Test: build, boot
Change-Id: I445cb6122107a514bc0bf433a9e140dbe3122573
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I53e5bf67a0d314e1b10c0ba0c7172a7af358ddcc
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
Update IMapper to use usage and format from
android.hardware.graphics.common@1.2. This enables support for
the usage HW_IMAGE_ENCODER and the format HSV_888 which is
already being defined and used.
Test: IMapper VTS tests
Bug: 79465976
Change-Id: I680beb6e5b1cd246c28d17f855f5c76a5831ce06
Existing Android framework code (and transitively, CTS test) require
that an accessRegion of (0,0,0,0) is treated the same as an
accessRegion covering the entire buffer, when calling lock() or
lockYCbCr().
Document this so that there is no confusion about this going forward,
since this requirement pre-dates the HIDL HALs.
Bug: 119440345
Test: Builds
Change-Id: Id16831d3da4ec3dc74dbdca18447581a50ee1193
Add a function to the mapper hal that checks if a BufferDescriptorInfo
is ever supported on a device. This value can be cached by the client.
The client can use this information to make decisions on what type of
buffers should attempt to allocate.
Bug: 120493579
Test: vts
Change-Id: I6bd7909e40d6462524bf49cf0d4e7af721e701ed
Require mapper to return more information when locking a buffer.
Opaque vendor formats make it difficult to manipulate a locked
buffer. The pointer to the buffer's data is always at the top
left hand corner of the buffer. It can be impossible to know
where the locked region begins.
The mapper now must return the bytes per pixel and bytes
per stride of a locked buffer when the values are consistent
and known.
Bug: 120493579
Test: vts
Change-Id: Id0921f191f1e388d4950ecef73acab6a34010dc4
Update the locking documentation to require all 1D buffers
"lock in place". Previously, the framework was able to get 1D
buffers that locked in place via ion. The ion interface is no
longer directly accessible. Some framework use cases still need
1D buffers that lock in place so add the requirement to mapper.
Bug: 120493579
Test: N/A
Change-Id: Ib903efdbeeb8c44ed70c3c6022d6792d05df1a63
GPU_CUBE_MAP and GPU_MIPMAP_COMPLETE both do not exist in gralloc1,
so don't try to allocate buffers that have those usages. Report an
error instead.
Bug: 66876469
Test: CTSNativeHardwareTestCases on Taimen
Change-Id: I1a6bd209faf5ffad93dbac0ab887bb1447a44aac
Increase IAllocator and IMapper to 3.0. This patch does not add
any new features.
Bug: 120493579
Test: vts
Change-Id: I84d9887f94d91eca1cc5d845bb11ac1d8affbf62
With olv@ no longer on the graphics team we need to update the
owners file to remove him and add new owners.
For composer the new owners are: lpy@ and vhau@
For allocator/mapper the new owner is: marissaw@
Test: N/A
Change-Id: Ied297e9446d480629155e1d9a96575ee518c2135
Add calls to the new gralloc1 functions: import, validateBufferSize
and getTransportSize. These new gralloc1 functions are used for
security hardening.
Bug: 66876469
Test: Manual
Change-Id: I18e485c48e1a24352208753144d936e1117d4ccb
Previously we introduced Dataspace V1.1 and PixelFormat V1.1, thus APIs
accepting Dataspace should also be updated to accept V1_1::Dataspace and
V1_1::PixelFormat.
BUG: 77156734
Test: adb shell /data/nativetest/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I00d00749f2895b727a18a28903256128a33e8b97
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.
Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
This is for reference only. It almost only has stub implementations
for the new 2.1 methods.
Test: boots and VTS
Change-Id: I60499f3094df1975ccbbcda7b5c03d4a0dc57c39
Better include path (#include <mapper-vts/2.0/MapperVts.h>), better
library naming, and move GraphicsMapperHidlEnvironment to where
tests are defined.
Test: VTS
Change-Id: I9fbf6515993ac11852b11ca6b8194a58afe5579a
Move libVtsHalGraphicsMapperTestUtils from 2.0/vts/functional/ to
2.0/utils/vts/. Run clang-format.
Test: VTS
Change-Id: I1e87129cbdc12167160f7e2f1cd76478e88bbf41
Reimplement the default impl as a header-only library,
android.hardware.graphics.mapper@2.0-passthrough, based on the HAL
support library.
Effectively, this renames Gralloc[01]Mapper to Gralloc[01]Hal, and
make adjustments here and there to meet the requirements of the HAL
support library. This also adds GrallocLoader to load either of
Gralloc[01]Hal and create an IMapper instance.
libgrallocmapperincludes is renamed to follow the new naming and
include path conventions.
Test: boots and VTS
Change-Id: I924cadce9a10a6e544f99ceba63aadc38ec431ac
Add a header-only support library
android.hardware.graphics.mapper@2.0-hal that can be used by
implementations. There are two classes in the support library.
MapperHal is an abstract class to be implemented by implementations.
Mapper is an implementation of HIDL IMapper interface on top of
MapperHal.
An implementation can
class VendorHal : public MapperHal { ... };
auto mapper = std::make_unique<Mapper>();
mapper->init(std::make_unique<VendorHal>(...));
Or, if vendor extensions are to be added to the IMapper,
class MapperHalExt : public MapperHal { ... };
class VendorHal : public MapperHalExt { ... };
class MapperExt : public MapperImpl<IMapperExt, MapperHalExt> { ... };
auto mapper = std::make_unique<MapperExt>();
mapper->init(std::make_unique<VendorHal>(...));
Test: builds
Change-Id: Ib23c1f5977744f7e116bb93db53e882e2dad7ce3
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
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
Update the Android.bp generated with hidl-gen.
Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
Allow HAL definition libs to be static.
Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
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
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
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
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
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
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
Bug: 33241851
Test: links
Test: try build with BOARD_VNDK_VERSION current, no errors related to
this module
Test: (sanity) YouTube
Change-Id: Ia2c3922bf8bf1ab51396a8c8c5fa8d909c442994
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
Add libVtsHalGraphicsMapperUtils which provides a wrapper to
IMapper. Port tests to be based on libVtsHalGraphicsMapperUtils.
Test: manual
Change-Id: I0639df178fd0a94153b48733930bb13f2d0aa930
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
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
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
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
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
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
The default implementatoin is built on top of conventional gralloc1.
Test: make android.hardware.graphics.mapper.hallib
Change-Id: I8647dc69dbb1637a141d36358d5769f450422ac1
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