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

Commit f798810b authored by Raviteja Tamatam's avatar Raviteja Tamatam
Browse files

msm: sde: Update rotator OT settings for sdm660



Added changes to update rotator OT settings for
sdm660 based on QOS recommendation

Change-Id: Ia950232269dcfa082666faefbda54217790e15df
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent 83dbf65a
Loading
Loading
Loading
Loading
+29 −9
Original line number Diff line number Diff line
/* Copyright (c) 2012, 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012, 2015-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
@@ -76,7 +76,10 @@ u32 sde_apply_comp_ratio_factor(u32 quota,

#define RES_1080p		(1088*1920)
#define RES_UHD		(3840*2160)
#define RES_WQXGA		(2560*1600)
#define XIN_HALT_TIMEOUT_US	0x4000
#define MDSS_MDP_HW_REV_320	0x30020000  /* sdm660 */
#define MDSS_MDP_HW_REV_330	0x30030000  /* sdm630 */

static int sde_mdp_wait_for_xin_halt(u32 xin_id)
{
@@ -174,15 +177,32 @@ u32 sde_mdp_get_ot_limit(u32 width, u32 height, u32 pixfmt, u32 fps, u32 is_rd)
	SDEROT_DBG("w:%d h:%d fps:%d pixfmt:%8.8x yuv:%d res:%d rd:%d\n",
		width, height, fps, pixfmt, is_yuv, res, is_rd);

	if (!is_yuv)
		goto exit;

	switch (mdata->mdss_version) {
	case MDSS_MDP_HW_REV_320:
	case MDSS_MDP_HW_REV_330:
		if ((res <= RES_1080p) && (fps <= 30) && is_yuv)
			ot_lim = 2;
		else if ((res <= RES_1080p) && (fps <= 60) && is_yuv)
			ot_lim = 4;
		else if ((res <= RES_UHD) && (fps <= 30) && is_yuv)
			ot_lim = 8;
		else if ((res <= RES_WQXGA) && (fps <= 60) && is_yuv)
			ot_lim = 4;
		else if ((res <= RES_WQXGA) && (fps <= 60))
			ot_lim = 16;
		break;
	default:
		if (is_yuv) {
			if ((res <= RES_1080p) && (fps <= 30))
				ot_lim = 2;
			else if ((res <= RES_1080p) && (fps <= 60))
				ot_lim = 4;
			else if ((res <= RES_UHD) && (fps <= 30))
				ot_lim = 8;
		}
		break;
	}


exit:
	SDEROT_DBG("ot_lim=%d\n", ot_lim);