当前位置:   article > 正文

rk3568 android 11.0 双屏异显方向控制_vendor.hwc.device.extend

vendor.hwc.device.extend

功能: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 //设置副屏是否满屏

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/303474
推荐阅读
相关标签
  

闽ICP备14008679号