Display: Add display color AIDL

Initial AIDL interface based on the HIDL interface
vendor.display.color@1.7.

Change-Id: Ibc657a752ee709521c8afdac461cdc8a07bb0e19
This commit is contained in:
Xu Yang
2022-11-09 20:15:07 +08:00
committed by Renchao Liu
parent 2a4c372675
commit 4e8be1f553
11 changed files with 313 additions and 0 deletions

25
aidl/color/Android.bp Normal file
View File

@@ -0,0 +1,25 @@
aidl_interface {
name: "vendor.qti.hardware.display.color",
vendor_available: true,
owner: "qti",
srcs: ["vendor/qti/hardware/display/color/*.aidl"],
stability: "vintf",
backend: {
cpp: {
enabled: false,
},
java: {
enabled: true,
sdk_version: "module_current",
},
ndk: {
enabled: true,
},
},
versions_with_info: [
{
version: "1",
imports: [],
},
],
}

View File

@@ -0,0 +1 @@
423c962c634a981b3722b48ad99e9fd851a4f8e8

View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@VintfStability
interface IDisplayColor {
int init(in int flags);
vendor.qti.hardware.display.color.Result deInit(in int ctxHandle, in int flags);
void toggleSocketService(in boolean enable);
vendor.qti.hardware.display.color.Result getRenderIntentsMap(in int disp_id, out String[] render_intent_string, out int[] render_intent_enum);
vendor.qti.hardware.display.color.Result getSPRMode(in int ctxHandle, in int dispId, out vendor.qti.hardware.display.color.SprModeInfo info);
vendor.qti.hardware.display.color.Result setSPRMode(in int ctxHandle, in int dispId, in vendor.qti.hardware.display.color.SprModeInfo info);
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@Backing(type="int") @VintfStability
enum Result {
OK = 0,
PERMISSION_DENIED = -1,
NO_MEMORY = -12,
BAD_VALUE = -22,
INVALID_OPERATION = -38,
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@VintfStability
parcelable SprModeInfo {
int mode_id;
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@VintfStability
interface IDisplayColor {
int init(in int flags);
vendor.qti.hardware.display.color.Result deInit(in int ctxHandle, in int flags);
void toggleSocketService(in boolean enable);
vendor.qti.hardware.display.color.Result getRenderIntentsMap(in int disp_id, out String[] render_intent_string, out int[] render_intent_enum);
vendor.qti.hardware.display.color.Result getSPRMode(in int ctxHandle, in int dispId, out vendor.qti.hardware.display.color.SprModeInfo info);
vendor.qti.hardware.display.color.Result setSPRMode(in int ctxHandle, in int dispId, in vendor.qti.hardware.display.color.SprModeInfo info);
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@Backing(type="int") @VintfStability
enum Result {
OK = 0,
PERMISSION_DENIED = -1,
NO_MEMORY = -12,
BAD_VALUE = -22,
INVALID_OPERATION = -38,
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package vendor.qti.hardware.display.color;
@VintfStability
parcelable SprModeInfo {
int mode_id;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
package vendor.qti.hardware.display.color;
import vendor.qti.hardware.display.color.Result;
import vendor.qti.hardware.display.color.SprModeInfo;
@VintfStability
interface IDisplayColor {
/**
* Initialize a color context.
*
* Each client is expected to call init interface and acquire a context
* handle before exercising any other interface.
*
* @param flags client identifier.
* @return context handle on success or negative value if anything wrong.
*/
int init(in int flags);
/**
* De-initialize a color context.
*
* Client must free the context after use.
*
* @param ctxHandle context handle.
* @param flags reserved.
* @return OK on success or BAD_VALUE if any parameters are invalid.
*/
Result deInit(in int ctxHandle, in int flags);
/**
* Initialize the qdcm socket service.
*
* Client needs to call this function to start/stop the socket service
*/
void toggleSocketService(in boolean enable);
/**
* Get render intents map.
*
* Clients can get the render intents string and enums map for display specified by id.
*
* @param disp_id is display ID.
* @param out render_intent_string is string vector for all the render intents.
* @param out render_intent_enum is numbers for all the render intents.
* @return OK on success or BAD_VALUE if any parameters are invalid.
*/
Result getRenderIntentsMap(in int disp_id,
out String[] render_intent_string, out int[] render_intent_enum);
/**
* Get spr mode configuration.
*
* @param ctxHandle context handle.
* @param dispId display id.
* @param out info spr mode configuration.
* @return OK on success or BAD_VALUE if any parameters are invalid.
*/
Result getSPRMode(in int ctxHandle, in int dispId, out SprModeInfo info);
/**
* Set spr mode.
*
* @param ctxHandle context handle.
* @param dispId display id.
* @param cfg spr mode configuration.
* @return OK on success or error if any parameters are invalid.
*/
Result setSPRMode(in int ctxHandle, in int dispId, in SprModeInfo info);
}

View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
package vendor.qti.hardware.display.color;
/*
* Type enumerating various result codes returned from IDispColor methods
*/
@VintfStability
@Backing(type="int")
enum Result {
OK,
PERMISSION_DENIED = -1,
NO_MEMORY = -12,
BAD_VALUE = -22,
INVALID_OPERATION = -38,
}

View File

@@ -0,0 +1,14 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
package vendor.qti.hardware.display.color;
/*
* SPR mode information struct
*/
@VintfStability
parcelable SprModeInfo {
int mode_id;
}