栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

RK3288 android7.1显示屏幕修改

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

RK3288 android7.1显示屏幕修改

0.dts中配置1920x1080的分辨率
1.build.prop添加下面属性:
persist.sys.framebuffer.main=1920x600@60
2.hardware/rockchip/hwcomposer合入下面修改:

diff --git a/hwcomposer.cpp b/hwcomposer.cpp
index 0fd2177…3ad13a9 100755
— a/hwcomposer.cpp
+++ b/hwcomposer.cpp
@@ -3498,8 +3498,10 @@ static int hwc_get_display_configs(struct hwc_composer_device_1 *dev,

char framebuffer_size[PROPERTY_VALUE_MAX];
uint32_t width = 0, height = 0 , vrefresh = 0 ;

  • if (display == HWC_DISPLAY_PRIMARY)
    property_get(“persist.sys.framebuffer.main”, framebuffer_size, “use_baseparameter”);
  • else if(display == HWC_DISPLAY_EXTERNAL)
  • property_get(“persist.sys.framebuffer.aux”, framebuffer_size, “use_baseparameter”);

@@ -2298,7 +2301,8 @@ static int hwc_prepare(hwc_composer_device_1_t *dev, size_t num_displays,
hd->rel_yres = mode.v_display();
hd->v_total = mode.v_total();
hd->w_scale = (float)mode.h_display() / hd->framebuffer_width;

  • hd->h_scale = (float)mode.v_display() / hd->framebuffer_height;
  • //hd->h_scale = (float)mode.v_display() / hd->framebuffer_height;
  • hd->h_scale = 1.0;
    int fbSize = hd->framebuffer_width * hd->framebuffer_height;
    //get plane size for display
    std::vector& plane_groups = ctx->drm.GetPlaneGroups();
    @@ -3638,7 +3647,8 @@ static int hwc_set_active_config(struct hwc_composer_device_1 *dev, int display,
    return -ENOENT;
    }
    hd->w_scale = (float)mode.h_display() / hd->framebuffer_width;
  • hd->h_scale = (float)mode.v_display() / hd->framebuffer_height;
  • //hd->h_scale = (float)mode.v_display() / hd->framebuffer_height;

  • hd->h_scale = 1.0;

    c->set_current_mode(mode);
    ctx->drm.UpdateDisplayRoute();

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1018565.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号