diff --git a/hardware/rockchip/hwcomposer/drmhwc2/drmhwctwo.cpp b/hardware/rockchip/hwcomposer/drmhwc2/drmhwctwo.cpp index 3a6ac5ffd0b..4e75d1a51d1 100755 --- a/hardware/rockchip/hwcomposer/drmhwc2/drmhwctwo.cpp +++ b/hardware/rockchip/hwcomposer/drmhwc2/drmhwctwo.cpp @@ -1367,7 +1367,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::GetDisplayConfigs(uint32_t *num_configs, * RK3588/RK3576:Limit to 4096x2160 if large than 2160p * Other: Limit to 1920x1080 if large than 2160p */ - bool low_ram_device = property_get_bool("ro.config.low_ram", false); + bool low_ram_device = property_get_bool("ro.boot.low_ram", false); if (low_ram_device) { if (ctx_.framebuffer_height >= 2160 && ctx_.framebuffer_width >= ctx_.framebuffer_height) { HWC2_ALOGD_IF_DEBUG("Limit framebuffer for low-ram device"); diff --git a/system/core/init/property_service.cpp b/system/core/init/property_service.cpp index c1a3fb97790..b79b06f3a7d 100644 --- a/system/core/init/property_service.cpp +++ b/system/core/init/property_service.cpp @@ -1315,9 +1315,7 @@ static void ExportKernelBootProps() { static void ExportLowRamProps() { std::string value = GetProperty("ro.boot.low_ram", "false"); if (value == "1" || value == "true" || value == "yes") { - InitPropertySet("ro.config.low_ram", "true"); InitPropertySet("ro.config.per_app_memcg", "false"); - InitPropertySet("dalvik.vm.systemservercompilerfilter", "speed-profile"); InitPropertySet("dalvik.vm.heapgrowthlimit", "128m"); InitPropertySet("dalvik.vm.heapsize", "384m"); } diff --git a/u-boot/arch/arm/mach-rockchip/board.c b/u-boot/arch/arm/mach-rockchip/board.c index a99f0e523b7..2d2cb8b541b 100644 --- a/u-boot/arch/arm/mach-rockchip/board.c +++ b/u-boot/arch/arm/mach-rockchip/board.c @@ -1369,7 +1369,8 @@ static void bootargs_add_android(bool verbose) static void bootargs_add_low_mem(void) { - if (gd->ram_size < SZ_3G) { + int low_ram = env_get_yesno("low_ram"); + if (low_ram && gd->ram_size < SZ_3G) { env_update("bootargs", "androidboot.low_ram=1"); } }