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

Commit f790b88c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Use proportional UB slicing and 7 WM"

parents 1880bd42 9c2ec496
Loading
Loading
Loading
Loading
+10 −9
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/qcom_iommu.h>
#include <linux/qcom_iommu.h>
#include <linux/ratelimit.h>
#include <linux/ratelimit.h>

#include <asm/div64.h>
#include "msm_isp40.h"
#include "msm_isp40.h"
#include "msm_isp_util.h"
#include "msm_isp_util.h"
#include "msm_isp_axi_util.h"
#include "msm_isp_axi_util.h"
@@ -37,8 +37,8 @@
#define VFE40_8x26V2_VERSION 0x20010014
#define VFE40_8x26V2_VERSION 0x20010014
#define VFE40_8916_VERSION 0x10030000
#define VFE40_8916_VERSION 0x10030000


#define VFE40_BURST_LEN 3
#define VFE40_BURST_LEN 1
#define VFE40_STATS_BURST_LEN 2
#define VFE40_STATS_BURST_LEN 1
#define VFE40_UB_SIZE 1536
#define VFE40_UB_SIZE 1536
#define VFE40_EQUAL_SLICE_UB 190
#define VFE40_EQUAL_SLICE_UB 190
#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx)
#define VFE40_WM_BASE(idx) (0x6C + 0x24 * idx)
@@ -1068,7 +1068,6 @@ static void msm_vfe40_cfg_axi_ub_equal_default(
	uint8_t num_used_wms = 0;
	uint8_t num_used_wms = 0;
	uint32_t prop_size = 0;
	uint32_t prop_size = 0;
	uint32_t wm_ub_size;
	uint32_t wm_ub_size;
	uint32_t delta;


	for (i = 0; i < axi_data->hw_info->num_wm; i++) {
	for (i = 0; i < axi_data->hw_info->num_wm; i++) {
		if (axi_data->free_wm[i] > 0) {
		if (axi_data->free_wm[i] > 0) {
@@ -1080,9 +1079,11 @@ static void msm_vfe40_cfg_axi_ub_equal_default(
		axi_data->hw_info->min_wm_ub * num_used_wms;
		axi_data->hw_info->min_wm_ub * num_used_wms;
	for (i = 0; i < axi_data->hw_info->num_wm; i++) {
	for (i = 0; i < axi_data->hw_info->num_wm; i++) {
		if (axi_data->free_wm[i]) {
		if (axi_data->free_wm[i]) {
			delta =
			uint64_t delta = 0;
				(axi_data->wm_image_size[i] *
			uint64_t temp = (uint64_t)axi_data->wm_image_size[i] *
					prop_size)/total_image_size;
					(uint64_t)prop_size;
			do_div(temp, total_image_size);
			delta = temp;
			wm_ub_size = axi_data->hw_info->min_wm_ub + delta;
			wm_ub_size = axi_data->hw_info->min_wm_ub + delta;
			msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1),
			msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1),
				vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10);
				vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10);
@@ -1109,7 +1110,7 @@ static void msm_vfe40_cfg_axi_ub_equal_slicing(
static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev)
static void msm_vfe40_cfg_axi_ub(struct vfe_device *vfe_dev)
{
{
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
	struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
	axi_data->wm_ub_cfg_policy = MSM_WM_UB_EQUAL_SLICING;
	axi_data->wm_ub_cfg_policy = MSM_WM_UB_CFG_DEFAULT;
	if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING)
	if (axi_data->wm_ub_cfg_policy == MSM_WM_UB_EQUAL_SLICING)
		msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev);
		msm_vfe40_cfg_axi_ub_equal_slicing(vfe_dev);
	else
	else
@@ -1397,7 +1398,7 @@ static void msm_vfe40_get_error_mask(
}
}


static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = {
static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = {
	.num_wm = 6,
	.num_wm = 7,
	.num_comp_mask = 3,
	.num_comp_mask = 3,
	.num_rdi = 3,
	.num_rdi = 3,
	.num_rdi_master = 3,
	.num_rdi_master = 3,
+2 −2
Original line number Original line Diff line number Diff line
@@ -24,8 +24,8 @@
static DEFINE_MUTEX(bandwidth_mgr_mutex);
static DEFINE_MUTEX(bandwidth_mgr_mutex);
static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr;
static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr;


#define MSM_ISP_MIN_AB 300000000
#define MSM_ISP_MIN_AB 450000000
#define MSM_ISP_MIN_IB 450000000
#define MSM_ISP_MIN_IB 900000000


#define VFE40_8974V2_VERSION 0x1001001A
#define VFE40_8974V2_VERSION 0x1001001A