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

Commit 18d059dc authored by Venkat Chinta's avatar Venkat Chinta Committed by vhajeri
Browse files

msm: camera: isp: Fix HFR when IFE output is set to UBWC



Frame increment between each image in a batch is calculated
properly for UBWC mode.

Change-Id: I7b49a42f419c316fa2f452dd76c42198e464e514
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent e5c3238b
Loading
Loading
Loading
Loading
+16 −3
Original line number Original line Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -2569,8 +2569,21 @@ static int cam_vfe_bus_update_wm(void *priv, void *cmd_args,
		CAM_DBG(CAM_ISP, "WM %d image address 0x%x",
		CAM_DBG(CAM_ISP, "WM %d image address 0x%x",
			wm_data->index, reg_val_pair[j-1]);
			wm_data->index, reg_val_pair[j-1]);


		if (wm_data->en_ubwc) {
			frame_inc = ALIGNUP(io_cfg->planes[i].plane_stride *
			    io_cfg->planes[i].slice_height, 4096);
			frame_inc += io_cfg->planes[i].meta_size;
			CAM_DBG(CAM_ISP,
				"WM %d frm %d: ht: %d stride %d meta: %d",
				wm_data->index, frame_inc,
				io_cfg->planes[i].slice_height,
				io_cfg->planes[i].plane_stride,
				io_cfg->planes[i].meta_size);
		} else {
			frame_inc = io_cfg->planes[i].plane_stride *
			frame_inc = io_cfg->planes[i].plane_stride *
				io_cfg->planes[i].slice_height;
				io_cfg->planes[i].slice_height;
		}

		CAM_VFE_ADD_REG_VAL_PAIR(reg_val_pair, j,
		CAM_VFE_ADD_REG_VAL_PAIR(reg_val_pair, j,
			wm_data->hw_regs->frame_inc, frame_inc);
			wm_data->hw_regs->frame_inc, frame_inc);
		CAM_DBG(CAM_ISP, "WM %d frame_inc %d",
		CAM_DBG(CAM_ISP, "WM %d frame_inc %d",