2.1 multi-card配置
以QCM61*5为例,说明配置card信息;
下面配置:sde_card1的接口是DSI,并且分配了4个plane;sde_card2的接口是DP1,分配了2个plane。实际使用场景可以根据对现实的需求分配。
+
+
+ sde_card1: qcom,sde-kms-lease@0 {
+ compatible = "qcom,sde-kms-lease";
+ qcom,dev-name = "msm_drm1";
+ qcom,lease-connectors = "DSI-1";
+ qcom,lease-planes = "plane-0","plane-1","plane-2","plane-5";
+ };
+
+ sde_card2: qcom,sde-kms-lease@1 {
+ compatible = "qcom,sde-kms-lease";
+ qcom,dev-name = "msm_drm2";
+
+ qcom,lease-connectors = "DP-1";
+ qcom,lease-planes ="plane-3","plane-4";
+ };
+};
+&sde_dp {
+ status = "okay";
+ qcom,dp-hpd-gpio = <&tlmm 100 0>;
+ qcom,dp-low-power-hw-hpd;
};
2.2 移植msm-lease
将适合该平台的msm-lease文件放到target_ap/vendor/qcom/opensource/display-drivers/路径下,并在内核中增加配置。
--- a/config/trinketdisp.conf
+++ b/config/trinketdisp.conf
@@ -14,3 +14,4 @@
export CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG=y
export CONFIG_DRM_SDE_RSC=y
export CONFIG_DRM_CLIENT_BOOTSPLASH=y
+export CONFIG_DRM_MSM_LEASE=y
\ No newline at end of file
--- a/config/trinketdispconf.h
+++ b/config/trinketdispconf.h
@@ -16,3 +16,4 @@
#define CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG 1
#define CONFIG_DRM_SDE_RSC 1
#define CONFIG_DRM_CLIENT_BOOTSPLASH 1
+#define CONFIG_DRM_MSM_LEASE 1
在内核中要增加头文件:
kernel_platform/common/include/drm/drmP.h
kernel_platform/common/include/drm/drm_os_linux.h
kernel_platform/common/include/drm/drm_pci.h
kernel_platform/msm-kernel/include/drm/drmP.h
kernel_platform/msm-kernel/include/drm/drm_os_linux.h
kernel_platform/msm-kernel/include/drm/drm_pci.h
修改vendor/qcom/opensource/display-drivers/msm/msm_drv.h
vendor/qcom/opensource/display-drivers/msm/msm_drv.c ,使其调用msm_drm_register()注册drm时,调用msm_lease_drm_unregister()注册lease_drm。
移植完成,同样可以看到两个card节点,
2.3 配置信息确认
可以查看上两篇文章 中此章节内容