diff --git a/display/composer/common/include/display_vdi_adapter_interface.h b/display/composer/common/include/display_vdi_adapter_interface.h index 4dbe63735c6e83fdf3f09392b06ecdceb61b28ba..b37e343131d54e55d9cb1dd7a6ee0ccc28480bb0 100644 --- a/display/composer/common/include/display_vdi_adapter_interface.h +++ b/display/composer/common/include/display_vdi_adapter_interface.h @@ -94,6 +94,7 @@ struct DisplayComposerVdiAdapter { const std::vector& inHandles); int32_t (*ClearDisplayClientBuffer)(uint32_t devId); int32_t (*ClearLayerBuffer)(uint32_t devId, uint32_t layerId); + int32_t (*GetDisplayIdentificationData)(uint32_t devId, uint8_t& portId, std::vector& edidData); }; using LoadVdiImplFunc = int32_t (*)(); @@ -159,6 +160,8 @@ using FastPresentFunc = int32_t (*)(uint32_t devId, const PresentParam& param, const std::vector& inHandles); using ClearDisplayClientBufferFunc = int32_t (*)(uint32_t devId); using ClearLayerBufferFunc = int32_t (*)(uint32_t devId, uint32_t layerId); +using GetDisplayIdentificationDataFunc = int32_t (*)(uint32_t devId, uint8_t& portId, std::vector& edidData); + } // namespace Composer } // namespace Display diff --git a/display/composer/v1_2/IDisplayComposer.idl b/display/composer/v1_2/IDisplayComposer.idl index 23df9a95c21b07890d645a3125f15bea10c5f8b8..73b2619856ea3924050be47ab1fe151ea5002a5a 100644 --- a/display/composer/v1_2/IDisplayComposer.idl +++ b/display/composer/v1_2/IDisplayComposer.idl @@ -106,7 +106,7 @@ interface IDisplayComposer extends ohos.hdi.display.composer.v1_1.IDisplayCompos * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 - * @version 1.2 + * @version 1.0 */ SetDisplayActiveRegion([in] unsigned int devId, [in] struct IRect rect); @@ -122,4 +122,17 @@ interface IDisplayComposer extends ohos.hdi.display.composer.v1_1.IDisplayCompos * @version 1.0 */ FastPresent([in] unsigned int devId, [in] struct PresentParam param, [in] NativeBuffer[] inHandles); + + /** + * @brief the function to GetDisplayIdentificationData. + * + * @param devId Indicates which device, portId Indicates which port, + * edidData Indicates the edid value. + * + * @return Returns 0 if the operation is successful; returns an error code defined + * in {@link DispErrCode} otherwise. + * @since 5.0 + * @version 1.0 + */ + GetDisplayIdentificationData([in] unsigned int devId, [out] unsigned char portId, [out] unsigned char[] edidData); } diff --git a/display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h b/display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h index cd1fa4278cf5595985786ec7af87112bcd62f1e4..c5a845cc93ba618395d4adb49ac98d5300a03e44 100644 --- a/display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h +++ b/display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h @@ -179,7 +179,14 @@ public: { return ToDispErrCode(req_v1_2_->SetLayerPerFrameParameterSmq(devId, layerId, key, value)); } - + + virtual int32_t GetDisplayIdentificationData(uint32_t devId, uint8_t& portId, + std::vector& edidData) override + { + COMPOSER_CHECK_NULLPTR_RETURN(hdi_v1_2_); + return ToDispErrCode(hdi_v1_2_->GetDisplayIdentificationData(devId, portId, edidData)); + } + protected: using BaseType1_1 = V1_1::DisplayComposerHdiImpl; using BaseType1_1::WAIT_TIME_INTERVAL; diff --git a/display/composer/v1_2/include/idisplay_composer_interface.h b/display/composer/v1_2/include/idisplay_composer_interface.h index 23aae31ea2bbf92718839e8fbf38d4d81d335803..a57b9d26a6c35c7ce5ad640b2853661697cd185c 100644 --- a/display/composer/v1_2/include/idisplay_composer_interface.h +++ b/display/composer/v1_2/include/idisplay_composer_interface.h @@ -77,6 +77,8 @@ public: virtual int32_t FastPresent(uint32_t devId, const PresentParam& param, const std::vector inHandles) = 0; + virtual int32_t GetDisplayIdentificationData(uint32_t devId, uint8_t& portId, std::vector& edidData) = 0; + virtual int32_t SetLayerPerFrameParameterSmq(uint32_t devId, uint32_t layerId, const std::string& key, const std::vector& value) = 0; };