Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64f2f875 authored by Srinu Gorle's avatar Srinu Gorle
Browse files

msm: vidc: Amend condition related to power save mode



Currently, instance load checking against
firmware populated capabilities of power saving mode
to trigger power saving mode.
If instance load is greater than max capabilities populated
by firmware then power saving mode is not set.
Remove max condition to enable low power mode even
when instance load is greater than max capabilities.

CRs-Fixed: 2010929
Change-Id: Ib5531f8d7bb06a91444a54567ce5709573721a12
Signed-off-by: default avatarSrinu Gorle <sgorle@codeaurora.org>
parent edc93d8c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1720,11 +1720,15 @@ static inline int msm_venc_power_save_mode_enable(struct msm_vidc_inst *inst)
	power_save_min = inst->capability.mbs_per_sec_power_save.min;
	power_save_max = inst->capability.mbs_per_sec_power_save.max;

	dprintk(VIDC_DBG,
		"Power Save Mode min mb's %d max mb's %d inst load %d\n",
		power_save_min, power_save_max, inst_load);

	if (!power_save_min || !power_save_max)
		return rc;

	hdev = inst->core->device;
	if (inst_load >= power_save_min && inst_load <= power_save_max) {
	if (inst_load >= power_save_min) {
		prop_id = HAL_CONFIG_VENC_PERF_MODE;
		venc_mode = HAL_PERF_MODE_POWER_SAVE;
		pdata = &venc_mode;