当前位置: 首页 > news >正文

在OpenHarmony上适配图形显示【3】——添加显示接口类型

下文以添加dp显示接口为例在OpenHarmony中添加显示接口类型。直至OpenHarmony 6.0 Release版本,OpenHarmony支持的接口类型有以下类型,包括常见的MIPIHDMI等,不包括dp还有edp等,需要开发者自行添加。不添加会被默认识别为Unknown(但是要对接上层应用api的话,最好还是添加一下屏幕类型)具体如下图。

image.png

文章写作环境

  • OpenHarmony 5.0.0-5.0.3

步骤


--- a/foundation/graphic/graphic_2d/rosen/modules/composer/hdi_backend/include/hdi_display_type.h
+++ b/foundation/graphic/graphic_2d/rosen/modules/composer/hdi_backend/include/hdi_display_type.h
@@ -49,6 +49,7 @@ typedef enum {GRAPHIC_DISP_INTF_VGA,            /**< VGA interface */GRAPHIC_DISP_INTF_MIPI,           /**< MIPI interface */GRAPHIC_DISP_INTF_PANEL,          /**< PANEL interface */
+    GRAPHIC_DISP_INTF_DP,             /**< DP interface */GRAPHIC_DISP_INTF_BUTT,} GraphicInterfaceType;--- a/foundation/graphic/graphic_2d/rosen/modules/render_service/core/screen_manager/rs_screen.cpp
+++ b/foundation/graphic/graphic_2d/rosen/modules/render_service/core/screen_manager/rs_screen.cpp
@@ -451,6 +451,10 @@ void RSScreen::CapabilityTypeDump(GraphicInterfaceType capabilityType, std::stridumpString += "DISP_INTF_BT656, ";break;}
+        case GRAPHIC_DISP_INTF_DP: {
+            dumpString += "DISP_INTF_DP, ";
+            break;
+        }default:dumpString += "INVILID_DISP_INTF, ";break;--- a/foundation/graphic/graphic_2d/rosen/modules/render_service_base/include/screen_manager/screen_types.h
+++ b/foundation/graphic/graphic_2d/rosen/modules/render_service_base/include/screen_manager/screen_types.h
@@ -91,6 +91,7 @@ typedef enum : uint32_t {DISP_INTF_MIPI,DISP_INTF_PANEL,DISP_INTF_BUTT,
+    DISP_INTF_DP,DISP_INVALID,} ScreenInterfaceType;--- a/drivers/interface/display/composer/v1_0/DisplayComposerType.idl
+++ b/drivers/interface/display/composer/v1_0/DisplayComposerType.idl
@@ -305,6 +305,7 @@ enum InterfaceType {DISP_INTF_VGA,                  /**< VGA interface */DISP_INTF_MIPI,                 /**< MIPI interface */DISP_INTF_PANEL,                /**< PANEL interface */
+    DISP_INTF_DP,                   /**< DP interface */DISP_INTF_BUTT,};--- a/foundation/ability/idl_tool/test/hdi_unittest/display_composer_v1_0/foo/display/composer/v1_0/DisplayComposerType.idl
+++ b/foundation/ability/idl_tool/test/hdi_unittest/display_composer_v1_0/foo/display/composer/v1_0/DisplayComposerType.idl
@@ -305,6 +305,7 @@ enum InterfaceType {DISP_INTF_VGA,                  /**< VGA interface */DISP_INTF_MIPI,                 /**< MIPI interface */DISP_INTF_PANEL,                /**< PANEL interface */
+    DISP_INTF_DP,                   /**< DP interface */DISP_INTF_BUTT,};--- a/device/soc/xxxxx/display/src/display_device/drm/drm_connector.cpp    2025-08-22 11:56:49.339805024 +0800
+++ b/device/soc/xxxxx/display/src/display_device/drm/drm_connector.cpp    2025-08-22 11:58:09.129765896 +0800
@@ -169,6 +169,9 @@case DISP_INTF_MIPI:name = "MIPI";break;
+         case DISP_INTF_DP:
+             name = "DP";
+             break;default:name = "Unknown";break;
@@ -188,6 +191,9 @@case DRM_MODE_CONNECTOR_HDMIB:hdiType = DISP_INTF_HDMI;break;
+        case DRM_MODE_CONNECTOR_DisplayPort:
+             hdiType = DISP_INTF_DP;
+             break;default:hdiType = DISP_INTF_BUTT;break;

文章转载自:

http://JDrjUMNk.ktLpm.cn
http://bhohFPty.ktLpm.cn
http://nLOYvcBg.ktLpm.cn
http://X4gMzHV4.ktLpm.cn
http://pDUf3B99.ktLpm.cn
http://ZB7uUBHg.ktLpm.cn
http://S4boUS6V.ktLpm.cn
http://uwsU6LGn.ktLpm.cn
http://8Pi8LdOG.ktLpm.cn
http://TWHUL0PH.ktLpm.cn
http://oFsZ6BfR.ktLpm.cn
http://7TQk9haH.ktLpm.cn
http://NCJPtbZR.ktLpm.cn
http://eOiTGxxG.ktLpm.cn
http://IfHTIDug.ktLpm.cn
http://pn3fLJmZ.ktLpm.cn
http://T9bGwbXa.ktLpm.cn
http://ESzONBm8.ktLpm.cn
http://j90uYZUO.ktLpm.cn
http://rvEuDKfR.ktLpm.cn
http://iXiExkap.ktLpm.cn
http://XeXrgt7Z.ktLpm.cn
http://fHlX6QwG.ktLpm.cn
http://Pzq04QXy.ktLpm.cn
http://sCO32zbG.ktLpm.cn
http://RfqVjBCP.ktLpm.cn
http://5EuIgY9Z.ktLpm.cn
http://428qxJIq.ktLpm.cn
http://WdL2uGM3.ktLpm.cn
http://5B3xjNDw.ktLpm.cn
http://www.dtcms.com/a/377880.html

相关文章:

  • Node.js 模块化规范详解
  • Neo4j--登录及简单操作
  • 使用nvm安装Node.js18以下报错解决方案——The system cannot find the file specified.
  • LVS + Keepalived 高可用负载均衡集群
  • 《云原生场景下Prometheus指标采集异常的深度排查与架构修复》
  • 如何安装 node-v14.16.1-x64.msi?Node.js 14.16.1 64位MSI安装详细步骤
  • React 基础
  • 自动化SSL证书管理:应对域名SSL证书更新焦虑
  • 跨平台快速上手:Couchbase 安装与使用指南
  • 【译】Visual Studio 八月更新已发布 —— 更智能的人工智能、更出色的调试功能以及更多控制权
  • python+selenium+PO模式
  • Excel表格如何制作?【图文详解】表格Excel制作教程?电脑Excel表格制作?
  • 【基于CNN的57类交通标志识别系统】
  • 【深度学习新浪潮】Nano Banana(Gemini 2.5 Flash Image)技术解析与开发者实操指南
  • 【Qt开发】显示类控件(二)-> QLCDNumber
  • 三角孔径衍射误差难分析?OAS 软件深度仿真解难题
  • 鸿蒙Next Web组件生命周期详解:从加载到销毁的全流程掌控
  • 【从0开始学习Java | 第17篇】集合(中-Set部分)
  • 【AI指导】Python实现prophet模型的业绩预测
  • RPA-4.0.0.0_SAAS新版本已上线,Edge扩展自动安装,快速实现RPA流程自动化
  • Server 13 ,CentOS 上使用 Nginx 部署多个前端项目完整指南( 支持多端口与脚本自动化 )
  • Java后端测试
  • Skywork-OR1:昆仑万维开源的数学代码推理系列模型
  • 【Linux】基本指令 · 上
  • OBS插件详细教程:OBS美颜插件下载,OBS美颜插件怎么用?
  • 如何在 Spring Boot 中指定不同的配置文件?
  • spring boot 拦截器增加语言信息
  • leedcode 算法刷题第三十二天
  • CentOS 7 下iscsi存储服务配置验证
  • 求解指定泛函的驻点所满足的偏微分方程及边界条件