赞
踩
功能:rk3568 android 11.0 默认支持双屏异显,根据屏幕对主副屏的方向进行设置
hardware/rockchip/hwcomposer/drmhwc2/drm/drmdevice.cpp
void DrmDevice::ConfigurePossibleDisplays(){
char primary_name[PROPERTY_VALUE_MAX];
char extend_name[PROPERTY_VALUE_MAX];
int primary_length, extend_length;
int default_display_possible = 0;
std::string conn_name;
char acConnName[50];
char buf[32];
int fd = open("/sys/tes_storage/display", O_RDONLY);
if (fd < 0) {
ALOGI("rocktech reading rocktech_display");
}
else
{
read(fd, buf, 32);
ALOGI("tes display:%s", buf);
if(strstr(buf,"edp")!=NULL){
property_set("vendor.hwc.device.primary", "eDP");
property_set("vendor.hwc.device.extend", "HDMI-A");
property_set("persist.sys.rotation.einit-1", "0");
property_set("persist.sys.rotation.efull-1", "true");
}else if(strstr(buf,"lvds-1")!=NULL){
property_set("vendor.hwc.device.primary", "DSI");
property_set("vendor.hwc.device.extend", "HDMI-A");
property_set("persist.sys.rotation.einit-1", "0");
property_set("persist.sys.rotation.efull-1", "true");
}else if(strstr(buf,"lvds")!=NULL){
property_set("vendor.hwc.device.primary", "DSI");
property_set("vendor.hwc.device.extend", "HDMI-A");
property_set("persist.sys.rotation.einit-1", "0");
property_set("persist.sys.rotation.efull-1", "true");
}else if(strstr(buf,"mipi")!=NULL){
property_set("vendor.hwc.device.primary", "DSI");
property_set("vendor.hwc.device.extend", "HDMI-A");
property_set("persist.sys.rotation.einit-1", "0");
property_set("persist.sys.rotation.efull-1", "true");
}else if(strstr(buf,"dual")!=NULL){
property_set("vendor.hwc.device.primary", "DSI");
property_set("vendor.hwc.device.extend", "DSI");
property_set("persist.sys.rotation.einit-1", "3");
property_set("persist.sys.rotation.efull-1", "true");
}
}
primary_length = property_get("vendor.hwc.device.primary", primary_name, NULL);
extend_length = property_get("vendor.hwc.device.extend", extend_name, NULL);
vendor.hwc.device.primary //设置主屏的接口
vendor.hwc.device.extend //设置副屏的接口
persist.sys.rotation.einit-1 //设置副屏的方向
persist.sys.rotation.efull-1 //设置副屏是否满屏
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。