From b00f59df0f304dfd5669361485fd681c4f488fa3 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 13 Jan 2017 14:47:23 +0800 Subject: [PATCH] graphics: add composer tests to VTS Test: vts-tradefed run vts -m HalGraphicsComposerHidlTargetTest Change-Id: I2e695787865d3bb855076acae18fa135064036ab --- graphics/composer/2.1/Android.mk | 19 + graphics/composer/2.1/IComposer.hal | 8 + graphics/composer/2.1/IComposerCallback.hal | 3 + graphics/composer/2.1/IComposerClient.hal | 24 + graphics/composer/2.1/vts/Android.mk | 19 + graphics/composer/2.1/vts/Composer.vts | 87 ++ .../composer/2.1/vts/ComposerCallback.vts | 72 ++ graphics/composer/2.1/vts/ComposerClient.vts | 906 ++++++++++++++++++ .../graphics/composer/hidl/target/Android.mk | 25 + .../composer/hidl/target/AndroidTest.xml | 30 + graphics/composer/2.1/vts/types.vts | 48 + graphics/composer/Android.mk | 19 + 12 files changed, 1260 insertions(+) create mode 100644 graphics/composer/2.1/Android.mk create mode 100644 graphics/composer/2.1/vts/Android.mk create mode 100644 graphics/composer/2.1/vts/Composer.vts create mode 100644 graphics/composer/2.1/vts/ComposerCallback.vts create mode 100644 graphics/composer/2.1/vts/ComposerClient.vts create mode 100644 graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/Android.mk create mode 100644 graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/AndroidTest.xml create mode 100644 graphics/composer/2.1/vts/types.vts create mode 100644 graphics/composer/Android.mk diff --git a/graphics/composer/2.1/Android.mk b/graphics/composer/2.1/Android.mk new file mode 100644 index 0000000000..f9e32763ff --- /dev/null +++ b/graphics/composer/2.1/Android.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := $(call my-dir) + +include $(call all-subdir-makefiles) diff --git a/graphics/composer/2.1/IComposer.hal b/graphics/composer/2.1/IComposer.hal index 771fc7d92d..553a537f04 100644 --- a/graphics/composer/2.1/IComposer.hal +++ b/graphics/composer/2.1/IComposer.hal @@ -53,6 +53,9 @@ interface IComposer { * * @return capabilities is a list of supported capabilities. */ + @entry + @exit + @callflow(next="*") getCapabilities() generates (vec capabilities); /* @@ -61,6 +64,9 @@ interface IComposer { * * @return debugInfo is a string of debug information. */ + @entry + @exit + @callflow(next="*") dumpDebugInfo() generates (string debugInfo); /* @@ -73,5 +79,7 @@ interface IComposer { * NO_RESOURCES when no more client can be created currently. * @return client is the newly created client. */ + @entry + @callflow(next="*") createClient() generates (Error error, IComposerClient client); }; diff --git a/graphics/composer/2.1/IComposerCallback.hal b/graphics/composer/2.1/IComposerCallback.hal index a8ca1683c7..541d7eb872 100644 --- a/graphics/composer/2.1/IComposerCallback.hal +++ b/graphics/composer/2.1/IComposerCallback.hal @@ -44,6 +44,7 @@ interface IComposerCallback { * @param connected indicates whether the display is connected or * disconnected. */ + @callflow(next="*") onHotplug(Display display, Connection connected); /* @@ -57,6 +58,7 @@ interface IComposerCallback { * * @param display is the display to refresh. */ + @callflow(next="*") oneway onRefresh(Display display); /* @@ -68,5 +70,6 @@ interface IComposerCallback { * @param timestamp is the CLOCK_MONOTONIC time at which the vsync event * occurred, in nanoseconds. */ + @callflow(next="*") oneway onVsync(Display display, int64_t timestamp); }; diff --git a/graphics/composer/2.1/IComposerClient.hal b/graphics/composer/2.1/IComposerClient.hal index b0bd8372fd..107ac5ef55 100644 --- a/graphics/composer/2.1/IComposerClient.hal +++ b/graphics/composer/2.1/IComposerClient.hal @@ -240,6 +240,8 @@ interface IComposerClient { * * @param callback is the IComposerCallback object. */ + @entry + @callflow(next="*") registerCallback(IComposerCallback callback); /* @@ -250,6 +252,7 @@ interface IComposerClient { * * @return count is the maximum number of virtual displays supported. */ + @callflow(next="*") getMaxVirtualDisplayCount() generates (uint32_t count); /* @@ -274,6 +277,7 @@ interface IComposerClient { * @return display is the newly-created virtual display. * @return format is the format of the buffer the device will produce. */ + @callflow(next="*") createVirtualDisplay(uint32_t width, uint32_t height, PixelFormat formatHint, @@ -293,6 +297,7 @@ interface IComposerClient { * BAD_PARAMETER when the display handle which was passed in does * not refer to a virtual display. */ + @callflow(next="*") destroyVirtualDisplay(Display display) generates (Error error); /* @@ -306,6 +311,7 @@ interface IComposerClient { * time. * @return layer is the handle of the new layer. */ + @callflow(next="*") createLayer(Display display, uint32_t bufferSlotCount) generates (Error error, @@ -320,6 +326,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * BAD_LAYER when an invalid layer handle was passed in. */ + @callflow(next="*") destroyLayer(Display display, Layer layer) generates (Error error); /* @@ -336,6 +343,7 @@ interface IComposerClient { * BAD_CONFIG when no configuration is currently active. * @return config is the currently active display configuration. */ + @callflow(next="*") getActiveConfig(Display display) generates (Error error, Config config); /* @@ -357,6 +365,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * UNSUPPORTED when the given configuration is not supported. */ + @callflow(next="*") getClientTargetSupport(Display display, uint32_t width, uint32_t height, @@ -374,6 +383,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * @return modes is an array of color modes. */ + @callflow(next="*") getColorModes(Display display) generates (Error error, vec modes); @@ -393,6 +403,7 @@ interface IComposerClient { * UNSUPPORTED when attribute cannot be queried for the config. * @return value is the value of the attribute. */ + @callflow(next="*") getDisplayAttribute(Display display, Config config, Attribute attribute) @@ -408,6 +419,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * @return configs is an array of configuration handles. */ + @callflow(next="*") getDisplayConfigs(Display display) generates (Error error, vec configs); @@ -419,6 +431,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * @return name is the name of the display. */ + @callflow(next="*") getDisplayName(Display display) generates (Error error, string name); /* @@ -429,6 +442,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * @return type is the type of the display. */ + @callflow(next="*") getDisplayType(Display display) generates (Error error, DisplayType type); /* @@ -443,6 +457,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * @return support is true only when the display supports doze modes. */ + @callflow(next="*") getDozeSupport(Display display) generates (Error error, bool support); /* @@ -463,6 +478,7 @@ interface IComposerClient { * @return minLuminance is the desired content minimum luminance for this * display in cd/m^2. */ + @callflow(next="*") getHdrCapabilities(Display display) generates (Error error, vec types, @@ -479,6 +495,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * NO_RESOURCES when unable to reserve the slots. */ + @callflow(next="*") setClientTargetSlotCount(Display display, uint32_t clientTargetSlotCount) generates (Error error); @@ -495,6 +512,7 @@ interface IComposerClient { * BAD_CONFIG when the configuration handle passed in is not valid * for this display. */ + @callflow(next="*") setActiveConfig(Display display, Config config) generates (Error error); /* @@ -513,6 +531,7 @@ interface IComposerClient { * BAD_PARAMETER when mode is not a valid color mode. * UNSUPPORTED when mode is not supported on this display. */ + @callflow(next="*") setColorMode(Display display, ColorMode mode) generates (Error error); /* @@ -531,6 +550,7 @@ interface IComposerClient { * BAD_PARAMETER when mode was not a valid power mode. * UNSUPPORTED when mode is not supported on this display. */ + @callflow(next="*") setPowerMode(Display display, PowerMode mode) generates (Error error); /* @@ -545,6 +565,7 @@ interface IComposerClient { * BAD_DISPLAY when an invalid display handle was passed in. * BAD_PARAMETER when enabled was an invalid value. */ + @callflow(next="*") setVsyncEnabled(Display display, Vsync enabled) generates (Error error); /* @@ -554,6 +575,7 @@ interface IComposerClient { * @return error is NONE upon success. Otherwise, * NO_RESOURCES when failed to set the queue temporarily. */ + @callflow(next="*") setInputCommandQueue(fmq_sync descriptor) generates (Error error); @@ -566,6 +588,7 @@ interface IComposerClient { * NO_RESOURCES when failed to get the queue temporarily. * @return descriptor is the descriptor of the output command queue. */ + @callflow(next="*") getOutputCommandQueue() generates (Error error, fmq_sync descriptor); @@ -589,6 +612,7 @@ interface IComposerClient { * @param outHandles is an array of handles referenced by the output * commands. */ + @callflow(next="*") executeCommands(uint32_t inLength, vec inHandles) generates (Error error, diff --git a/graphics/composer/2.1/vts/Android.mk b/graphics/composer/2.1/vts/Android.mk new file mode 100644 index 0000000000..b9ddc6e3ee --- /dev/null +++ b/graphics/composer/2.1/vts/Android.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := $(call my-dir) + +include $(LOCAL_PATH)/functional/vts/testcases/hal/graphics/composer/hidl/target/Android.mk diff --git a/graphics/composer/2.1/vts/Composer.vts b/graphics/composer/2.1/vts/Composer.vts new file mode 100644 index 0000000000..ee5c650a4c --- /dev/null +++ b/graphics/composer/2.1/vts/Composer.vts @@ -0,0 +1,87 @@ +component_class: HAL_HIDL +component_type_version: 2.1 +component_name: "IComposer" + +package: "android.hardware.graphics.composer" + +import: "android.hardware.graphics.composer@2.1::IComposerClient" +import: "android.hardware.graphics.composer@2.1::types" + +interface: { + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposer::Capability" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "SIDEBAND_STREAM" + scalar_value: { + int32_t: 1 + } + enumerator: "SKIP_CLIENT_COLOR_TRANSFORM" + scalar_value: { + int32_t: 2 + } + } + } + + api: { + name: "getCapabilities" + return_type_hidl: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposer::Capability" + } + } + callflow: { + entry: true + } + callflow: { + exit: true + } + callflow: { + next: "*" + } + } + + api: { + name: "dumpDebugInfo" + return_type_hidl: { + type: TYPE_STRING + } + callflow: { + entry: true + } + callflow: { + exit: true + } + callflow: { + next: "*" + } + } + + api: { + name: "createClient" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_HIDL_INTERFACE + predefined_type: "IComposerClient" + is_callback: false + } + callflow: { + entry: true + } + callflow: { + next: "*" + } + } + +} diff --git a/graphics/composer/2.1/vts/ComposerCallback.vts b/graphics/composer/2.1/vts/ComposerCallback.vts new file mode 100644 index 0000000000..a5a2aa9f96 --- /dev/null +++ b/graphics/composer/2.1/vts/ComposerCallback.vts @@ -0,0 +1,72 @@ +component_class: HAL_HIDL +component_type_version: 2.1 +component_name: "IComposerCallback" + +package: "android.hardware.graphics.composer" + +import: "android.hardware.graphics.composer@2.1::types" + +interface: { + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "CONNECTED" + scalar_value: { + int32_t: 1 + } + enumerator: "DISCONNECTED" + scalar_value: { + int32_t: 2 + } + } + } + + api: { + name: "onHotplug" + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection" + } + callflow: { + next: "*" + } + } + + api: { + name: "onRefresh" + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "onVsync" + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "int64_t" + } + callflow: { + next: "*" + } + } + +} diff --git a/graphics/composer/2.1/vts/ComposerClient.vts b/graphics/composer/2.1/vts/ComposerClient.vts new file mode 100644 index 0000000000..db6b1ff777 --- /dev/null +++ b/graphics/composer/2.1/vts/ComposerClient.vts @@ -0,0 +1,906 @@ +component_class: HAL_HIDL +component_type_version: 2.1 +component_name: "IComposerClient" + +package: "android.hardware.graphics.composer" + +import: "android.hardware.graphics.common@1.0::types" +import: "android.hardware.graphics.composer@2.1::IComposerCallback" +import: "android.hardware.graphics.composer@2.1::types" + +interface: { + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "WIDTH" + scalar_value: { + int32_t: 1 + } + enumerator: "HEIGHT" + scalar_value: { + int32_t: 2 + } + enumerator: "VSYNC_PERIOD" + scalar_value: { + int32_t: 3 + } + enumerator: "DPI_X" + scalar_value: { + int32_t: 4 + } + enumerator: "DPI_Y" + scalar_value: { + int32_t: 5 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayRequest" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "FLIP_CLIENT_TARGET" + scalar_value: { + uint32_t: 1 + } + enumerator: "WRITE_CLIENT_TARGET_TO_OUTPUT" + scalar_value: { + uint32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::LayerRequest" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "CLEAR_CLIENT_TARGET" + scalar_value: { + uint32_t: 1 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "OFF" + scalar_value: { + int32_t: 0 + } + enumerator: "DOZE" + scalar_value: { + int32_t: 1 + } + enumerator: "DOZE_SUSPEND" + scalar_value: { + int32_t: 3 + } + enumerator: "ON" + scalar_value: { + int32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "ENABLE" + scalar_value: { + int32_t: 1 + } + enumerator: "DISABLE" + scalar_value: { + int32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "NONE" + scalar_value: { + int32_t: 1 + } + enumerator: "PREMULTIPLIED" + scalar_value: { + int32_t: 2 + } + enumerator: "COVERAGE" + scalar_value: { + int32_t: 3 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Composition" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "CLIENT" + scalar_value: { + int32_t: 1 + } + enumerator: "DEVICE" + scalar_value: { + int32_t: 2 + } + enumerator: "SOLID_COLOR" + scalar_value: { + int32_t: 3 + } + enumerator: "CURSOR" + scalar_value: { + int32_t: 4 + } + enumerator: "SIDEBAND" + scalar_value: { + int32_t: 5 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "INVALID" + scalar_value: { + int32_t: 0 + } + enumerator: "PHYSICAL" + scalar_value: { + int32_t: 1 + } + enumerator: "VIRTUAL" + scalar_value: { + int32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "EMPTY" + scalar_value: { + int32_t: -1 + } + enumerator: "CACHED" + scalar_value: { + int32_t: -2 + } + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Rect" + type: TYPE_STRUCT + struct_value: { + name: "left" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + struct_value: { + name: "top" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + struct_value: { + name: "right" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + struct_value: { + name: "bottom" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::FRect" + type: TYPE_STRUCT + struct_value: { + name: "left" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "top" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "right" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "bottom" + type: TYPE_SCALAR + scalar_type: "float_t" + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Color" + type: TYPE_STRUCT + struct_value: { + name: "r" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "g" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "b" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "a" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + } + + attribute: { + name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Command" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "LENGTH_MASK" + scalar_value: { + int32_t: 65535 + } + enumerator: "OPCODE_SHIFT" + scalar_value: { + int32_t: 16 + } + enumerator: "OPCODE_MASK" + scalar_value: { + int32_t: -65536 + } + enumerator: "SELECT_DISPLAY" + scalar_value: { + int32_t: 0 + } + enumerator: "SELECT_LAYER" + scalar_value: { + int32_t: 65536 + } + enumerator: "SET_ERROR" + scalar_value: { + int32_t: 16777216 + } + enumerator: "SET_CHANGED_COMPOSITION_TYPES" + scalar_value: { + int32_t: 16842752 + } + enumerator: "SET_DISPLAY_REQUESTS" + scalar_value: { + int32_t: 16908288 + } + enumerator: "SET_PRESENT_FENCE" + scalar_value: { + int32_t: 16973824 + } + enumerator: "SET_RELEASE_FENCES" + scalar_value: { + int32_t: 17039360 + } + enumerator: "SET_COLOR_TRANSFORM" + scalar_value: { + int32_t: 33554432 + } + enumerator: "SET_CLIENT_TARGET" + scalar_value: { + int32_t: 33619968 + } + enumerator: "SET_OUTPUT_BUFFER" + scalar_value: { + int32_t: 33685504 + } + enumerator: "VALIDATE_DISPLAY" + scalar_value: { + int32_t: 33751040 + } + enumerator: "ACCEPT_DISPLAY_CHANGES" + scalar_value: { + int32_t: 33816576 + } + enumerator: "PRESENT_DISPLAY" + scalar_value: { + int32_t: 33882112 + } + enumerator: "SET_LAYER_CURSOR_POSITION" + scalar_value: { + int32_t: 50331648 + } + enumerator: "SET_LAYER_BUFFER" + scalar_value: { + int32_t: 50397184 + } + enumerator: "SET_LAYER_SURFACE_DAMAGE" + scalar_value: { + int32_t: 50462720 + } + enumerator: "SET_LAYER_BLEND_MODE" + scalar_value: { + int32_t: 67108864 + } + enumerator: "SET_LAYER_COLOR" + scalar_value: { + int32_t: 67174400 + } + enumerator: "SET_LAYER_COMPOSITION_TYPE" + scalar_value: { + int32_t: 67239936 + } + enumerator: "SET_LAYER_DATASPACE" + scalar_value: { + int32_t: 67305472 + } + enumerator: "SET_LAYER_DISPLAY_FRAME" + scalar_value: { + int32_t: 67371008 + } + enumerator: "SET_LAYER_PLANE_ALPHA" + scalar_value: { + int32_t: 67436544 + } + enumerator: "SET_LAYER_SIDEBAND_STREAM" + scalar_value: { + int32_t: 67502080 + } + enumerator: "SET_LAYER_SOURCE_CROP" + scalar_value: { + int32_t: 67567616 + } + enumerator: "SET_LAYER_TRANSFORM" + scalar_value: { + int32_t: 67633152 + } + enumerator: "SET_LAYER_VISIBLE_REGION" + scalar_value: { + int32_t: 67698688 + } + enumerator: "SET_LAYER_Z_ORDER" + scalar_value: { + int32_t: 67764224 + } + } + } + + api: { + name: "registerCallback" + arg: { + type: TYPE_HIDL_CALLBACK + predefined_type: "IComposerCallback" + is_callback: true + } + callflow: { + entry: true + } + callflow: { + next: "*" + } + } + + api: { + name: "getMaxVirtualDisplayCount" + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "createVirtualDisplay" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "destroyVirtualDisplay" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "createLayer" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "destroyLayer" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getActiveConfig" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getClientTargetSupport" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::Dataspace" + } + callflow: { + next: "*" + } + } + + api: { + name: "getColorModes" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode" + } + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getDisplayAttribute" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "int32_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute" + } + callflow: { + next: "*" + } + } + + api: { + name: "getDisplayConfigs" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getDisplayName" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_STRING + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getDisplayType" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getDozeSupport" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "bool_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "getHdrCapabilities" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::Hdr" + } + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "float_t" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "float_t" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "float_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "setClientTargetSlotCount" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "setActiveConfig" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + callflow: { + next: "*" + } + } + + api: { + name: "setColorMode" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode" + } + callflow: { + next: "*" + } + } + + api: { + name: "setPowerMode" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode" + } + callflow: { + next: "*" + } + } + + api: { + name: "setVsyncEnabled" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + arg: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync" + } + callflow: { + next: "*" + } + } + + api: { + name: "setInputCommandQueue" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + arg: { + } + callflow: { + next: "*" + } + } + + api: { + name: "getOutputCommandQueue" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + } + callflow: { + next: "*" + } + } + + api: { + name: "executeCommands" + return_type_hidl: { + type: TYPE_ENUM + predefined_type: "::android::hardware::graphics::composer::V2_1::Error" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "bool_t" + } + return_type_hidl: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + return_type_hidl: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_HANDLE + } + } + arg: { + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + arg: { + type: TYPE_VECTOR + vector_value: { + type: TYPE_HANDLE + } + } + callflow: { + next: "*" + } + } + +} diff --git a/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/Android.mk b/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/Android.mk new file mode 100644 index 0000000000..bafb67f58e --- /dev/null +++ b/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/Android.mk @@ -0,0 +1,25 @@ +# +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := $(call my-dir) + +include $(call all-subdir-makefiles) + +include $(CLEAR_VARS) + +LOCAL_MODULE := HalGraphicsComposerHidlTargetTest +VTS_CONFIG_SRC_DIR := testcases/hal/graphics/composer/hidl/target +include test/vts/tools/build/Android.host_config.mk diff --git a/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/AndroidTest.xml b/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/AndroidTest.xml new file mode 100644 index 0000000000..e807f5427d --- /dev/null +++ b/graphics/composer/2.1/vts/functional/vts/testcases/hal/graphics/composer/hidl/target/AndroidTest.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/graphics/composer/2.1/vts/types.vts b/graphics/composer/2.1/vts/types.vts new file mode 100644 index 0000000000..ccbd9d8f0f --- /dev/null +++ b/graphics/composer/2.1/vts/types.vts @@ -0,0 +1,48 @@ +component_class: HAL_HIDL +component_type_version: 2.1 +component_name: "types" + +package: "android.hardware.graphics.composer" + + +attribute: { + name: "::android::hardware::graphics::composer::V2_1::Error" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "NONE" + scalar_value: { + int32_t: 0 + } + enumerator: "BAD_CONFIG" + scalar_value: { + int32_t: 1 + } + enumerator: "BAD_DISPLAY" + scalar_value: { + int32_t: 2 + } + enumerator: "BAD_LAYER" + scalar_value: { + int32_t: 3 + } + enumerator: "BAD_PARAMETER" + scalar_value: { + int32_t: 4 + } + enumerator: "NO_RESOURCES" + scalar_value: { + int32_t: 6 + } + enumerator: "NOT_VALIDATED" + scalar_value: { + int32_t: 7 + } + enumerator: "UNSUPPORTED" + scalar_value: { + int32_t: 8 + } + } +} + diff --git a/graphics/composer/Android.mk b/graphics/composer/Android.mk new file mode 100644 index 0000000000..f9e32763ff --- /dev/null +++ b/graphics/composer/Android.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := $(call my-dir) + +include $(call all-subdir-makefiles)