Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: dsDisplay: Updated interface file to support the AIDL #29

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/pages/ds-display_halSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The `caller` is expected to have complete control over the life cycle of the `HA

1. Initialize the interface using: `dsDisplayInit()` before making any other `API` calls. If `dsDisplayInit()` call fails, the `HAL` must return the respective error code, so that the `caller` can retry the operation.

2. The `caller` can call `dsGetEDID()`, `dsGetDisplayAspectRatio()` and `dsGetEDIDBytes()` to query the information of connected display device. This interface is also used to notify `HDCP` Protocol changes of display device to the `caller`.
2. The `caller` can call `dsGetEDID()`, `dsGetDisplayAspectRatio()` `dsGetEDIDBytesSize()` and `dsGetEDIDBytes()` to query the information of connected display device. This interface is also used to notify `HDCP` Protocol changes of display device to the `caller`.

3. De-initialize the HAL using `dsDisplayTerm()`.

Expand All @@ -181,6 +181,11 @@ The `caller` is expected to have complete control over the life cycle of the `HA
HAL->>Driver:Getting the handle for connected display device
Driver-->>HAL:return
HAL-->>Caller:return
Caller->>HAL:dsGetEDIDBytesSize()
Note over HAL: Gets the maximum EDID buffer size
HAL->>Driver:Get the maximum EDID buffer size
Driver-->>HAL:return
HAL-->>Caller:return
Caller->>HAL:dsGetEDID()
Note over HAL: Gets the EDID Information from connected display device
HAL->>Driver:Getting the EDID Info from HDMI/DVI display device
Expand Down
32 changes: 28 additions & 4 deletions include/dsDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,39 @@ dsError_t dsDisplayInit();

dsError_t dsGetEDID(intptr_t handle, dsDisplayEDID_t *edid);

/**
* @brief Gets the maximum EDID buffer length of connected display device.
*
* This function is used to get the EDID buffer size of the connected display corresponding to
* the specified display device handle.
*
* @param[in] handle - Handle of the display device
* @param[out] maxEDIDSize - length of the EDID buffer data. Min value is 0
*
* @return dsError_t - Status
* @retval dsERR_NONE - Success
* @retval dsERR_INVALID_PARAM - Parameter passed to this function is invalid
* @retval dsERR_NOT_INITIALIZED - Module is not initialised
* @retval dsERR_OPERATION_NOT_SUPPORTED - The attempted operation is not supported
* @retval dsERR_GENERAL - Underlying undefined platform error
*
* @pre dsDisplayInit() and dsGetDisplay() must be called before calling this API
*
* @warning This API is Not thread safe
*
*/

dsError_t dsGetEDIDBytesSize(intptr_t handle, unsigned int *pMaxEDIDSize);

/**
* @brief Gets the EDID buffer and EDID length of connected display device.
*
* This function is used to get the EDID buffer and EDID size of the connected display corresponding to
* the specified display device handle.
*
* @param[in] handle - Handle of the display device
* @param[out] edid - Pointer to raw EDID buffer
* @param[out] length - length of the EDID buffer data. Min value is 0
* @param[in] handle - Handle of the display device
* @param[out] edid - Pointer to raw EDID buffer
* @param[in] maxEDIDSize - length of the EDID buffer data. Min value is 0
*
* @note Caller is responsible for allocating memory for edid( please refer ::MAX_EDID_BYTES_LEN ) and freeing the EDID buffer
*
Expand All @@ -220,7 +244,7 @@ dsError_t dsGetEDID(intptr_t handle, dsDisplayEDID_t *edid);
*
*/

dsError_t dsGetEDIDBytes(intptr_t handle, unsigned char *edid, int *length);
dsError_t dsGetEDIDBytes(intptr_t handle, unsigned char *edid, unsigned int maxEDIDSize);

/**
* @brief Gets the aspect ratio of connected display device.
Expand Down