From 48286db5dc9b09f03e3a65265497cd49a24c2105 Mon Sep 17 00:00:00 2001 From: l60050612 Date: Fri, 7 Feb 2025 17:21:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?interface=20display=20composer=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: l60050612 --- .../include/display_vdi_adapter_interface.h | 3 +++ display/composer/v1_2/IDisplayComposer.idl | 15 ++++++++++++++- .../v1_2/hdi_impl/display_composer_hdi_impl.h | 8 +++++++- .../v1_2/include/idisplay_composer_interface.h | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/display/composer/common/include/display_vdi_adapter_interface.h b/display/composer/common/include/display_vdi_adapter_interface.h index 4dbe6373..b37e3431 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 23df9a95..73b26198 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 cd1fa427..6ff9559b 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,13 @@ 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 23aae31e..a57b9d26 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; }; -- Gitee From ed41c8636ffe1586ee574dd0c50f4fc1ae7c8117 Mon Sep 17 00:00:00 2001 From: l60050612 Date: Sat, 8 Feb 2025 02:21:58 +0000 Subject: [PATCH 2/2] update display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h. Signed-off-by: l60050612 --- display/composer/v1_2/hdi_impl/display_composer_hdi_impl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 6ff9559b..c5a845cc 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 @@ -180,10 +180,11 @@ 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 + 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)); + COMPOSER_CHECK_NULLPTR_RETURN(hdi_v1_2_); + return ToDispErrCode(hdi_v1_2_->GetDisplayIdentificationData(devId, portId, edidData)); } protected: -- Gitee