android: minor fix for handling of androidboot.low_ram

Signed-off-by: hmz007 <hmz007@gmail.com>
master
hmz007 6 months ago
parent 4e08191edd
commit e3bedd7641

@ -1367,7 +1367,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::GetDisplayConfigs(uint32_t *num_configs,
* RK3588/RK3576Limit 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");

@ -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");
}

@ -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");
}
}

Loading…
Cancel
Save