Преглед на файлове

msm: camera: cpas: Smart QoS parameters upgrade

Add tuning parameters for smart QoS parameter upgrade.

CRs-Fixed: 3248165
Change-Id: I3cb4de370310923abca7ad3d5cb05cacb11bd03f
Signed-off-by: chengxue <[email protected]>
chengxue преди 3 години
родител
ревизия
666c7b9cd7
променени са 4 файла, в които са добавени 250 реда и са изтрити 50 реда
  1. 110 31
      drivers/cam_cpas/cam_cpas_hw.c
  2. 6 2
      drivers/cam_cpas/cam_cpas_hw.h
  3. 105 9
      drivers/cam_cpas/cam_cpas_soc.c
  4. 29 8
      drivers/cam_cpas/cam_cpas_soc.h

+ 110 - 31
drivers/cam_cpas/cam_cpas_hw.c

@@ -607,19 +607,23 @@ static void cam_cpas_print_smart_qos_priority(
 	int32_t reg_indx = cpas_core->regbase_index[CAM_CPAS_REG_CAMNOC];
 	char log_buf[CAM_CPAS_LOG_BUF_LEN] = {0};
 	size_t len = 0;
-	uint32_t val = 0;
+	uint32_t val_low = 0, val_high = 0;
 
 	for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++) {
 		niu_node = soc_private->smart_qos_info->rt_wr_niu_node[i];
 
-		val = cam_io_r_mb(soc_info->reg_map[reg_indx].mem_base +
+		val_high = cam_io_r_mb(soc_info->reg_map[reg_indx].mem_base +
+			niu_node->pri_lut_high_offset);
+
+		val_low = cam_io_r_mb(soc_info->reg_map[reg_indx].mem_base +
 			niu_node->pri_lut_low_offset);
 
 		len += scnprintf((log_buf + len), (CAM_CPAS_LOG_BUF_LEN - len),
-			" [%s:0x%x]", niu_node->node_name, val);
+			" [%s:high 0x%x low 0x%x]", niu_node->node_name,
+			val_high, val_low);
 	}
 
-	CAM_INFO(CAM_CPAS, "SmartQoS [Node Pri_lut_low] %s", log_buf);
+	CAM_INFO(CAM_CPAS, "SmartQoS [Node Pri_lut] %s", log_buf);
 }
 
 static bool cam_cpas_is_new_rt_bw_lower(
@@ -667,8 +671,10 @@ static void cam_cpas_reset_niu_priorities(
 		(struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private;
 	uint8_t i;
 
-	for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++)
-		soc_private->smart_qos_info->rt_wr_niu_node[i]->applied_priority = 0x0;
+	for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++) {
+		soc_private->smart_qos_info->rt_wr_niu_node[i]->applied_priority_low = 0x0;
+		soc_private->smart_qos_info->rt_wr_niu_node[i]->applied_priority_high = 0x0;
+	}
 }
 
 static bool cam_cpas_calculate_smart_qos(
@@ -681,23 +687,25 @@ static bool cam_cpas_calculate_smart_qos(
 	uint8_t i;
 	bool needs_update = false;
 	uint64_t bw_per_kb, max_bw_per_kb = 0, remainder, ramp_val;
+	uint64_t total_bw_per_kb = 0, total_bw_ramp_val = 0;
 	int8_t pos;
-	uint32_t priority;
-	uint8_t val;
+	uint64_t priority;
+	uint8_t val, clamp_threshold;
 
 	for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++) {
 		niu_node = soc_private->smart_qos_info->rt_wr_niu_node[i];
 
 		bw_per_kb = niu_node->camnoc_bw;
 		remainder = do_div(bw_per_kb, niu_node->niu_size);
+		total_bw_per_kb += bw_per_kb;
 
 		if (max_bw_per_kb < bw_per_kb)
 			max_bw_per_kb = bw_per_kb;
 
 		CAM_DBG(CAM_PERF,
-			"NIU[%d][%s] : camnoc_bw %llu, niu_size %u, bw_per_kb %lld, remainder %lld max_bw_per_kb %lld",
+			"NIU[%d][%s]camnoc_bw %llu, niu_size %u, bw_per_kb %lld, remainder %lld, max_bw_per_kb %lld, total_bw_per_kb %lld",
 			i, niu_node->node_name, niu_node->camnoc_bw, niu_node->niu_size,
-			bw_per_kb, remainder, max_bw_per_kb);
+			bw_per_kb, remainder, max_bw_per_kb, total_bw_per_kb);
 	}
 
 	if (!max_bw_per_kb) {
@@ -711,15 +719,68 @@ static bool cam_cpas_calculate_smart_qos(
 		bw_per_kb = niu_node->camnoc_bw;
 		remainder = do_div(bw_per_kb, niu_node->niu_size); // --> dropping remainder
 
+		if ((bw_per_kb * CAM_CPAS_MAX_STRESS_INDICATOR) >
+			(total_bw_per_kb *
+			soc_private->smart_qos_info->highstress_indicator_th)) {
+			clamp_threshold = soc_private->smart_qos_info->moststressed_clamp_th;
+			CAM_DBG(CAM_PERF, "Current niu clamp_threshold=%d",
+				clamp_threshold);
+		} else {
+			ramp_val = soc_private->smart_qos_info->bw_ratio_scale_factor *
+				bw_per_kb;
+			ramp_val = ramp_val *
+				(soc_private->smart_qos_info->leaststressed_clamp_th -
+				soc_private->smart_qos_info->moststressed_clamp_th);
+
+			/*
+			 * Stress indicator threshold may have a float type value
+			 * such as 0.5 according max stress indicator value 1,
+			 * we take in percentages to avoid float type calcaulate.
+			 */
+			total_bw_ramp_val = total_bw_per_kb *
+				(soc_private->smart_qos_info->highstress_indicator_th -
+				soc_private->smart_qos_info->lowstress_indicator_th) /
+				CAM_CPAS_MAX_STRESS_INDICATOR;
+
+			CAM_DBG(CAM_PERF, "ramp_val=%lld, total_bw_ramp_val=%lld",
+				ramp_val, total_bw_ramp_val);
+
+			remainder = do_div(ramp_val, total_bw_ramp_val);
+			/* round the value */
+			if ((remainder * 2) >= total_bw_ramp_val)
+				ramp_val += 1;
+
+			val = (uint8_t)(ramp_val);
+			clamp_threshold =
+				soc_private->smart_qos_info->leaststressed_clamp_th - val;
+
+			CAM_DBG(CAM_PERF, "Current niu clamp_threshold=%d, val=%d",
+				clamp_threshold, val);
+		}
+
 		priority = 0;
 
-		for (pos = 7; pos >= 0; pos--) {
+		for (pos = 15; pos >= clamp_threshold; pos--) {
+			val = soc_private->smart_qos_info->rt_wr_priority_clamp;
+			priority = priority << 4;
+			priority |= val;
+
+			CAM_DBG(CAM_PERF, "pos=%d, val=0x%x, priority=0x%llx", pos, val, priority);
+		}
+
+		for (pos = clamp_threshold - 1; pos >= 0; pos--) {
 			if (pos == 0) {
 				val = soc_private->smart_qos_info->rt_wr_priority_min;
-			} else if (pos == 7) {
-				val = soc_private->smart_qos_info->rt_wr_priority_max;
 			} else {
 				ramp_val = pos * bw_per_kb;
+				/*
+				 * Slope factor may have a float type value such as 0.7
+				 * according max slope factor value 1,
+				 * we take in percentages to avoid float type calcaulate.
+				 */
+				ramp_val = ramp_val *
+					soc_private->smart_qos_info->rt_wr_slope_factor /
+					CAM_CPAS_MAX_SLOPE_FACTOR;
 				remainder = do_div(ramp_val, max_bw_per_kb);
 
 				CAM_DBG(CAM_PERF,
@@ -727,7 +788,7 @@ static bool cam_cpas_calculate_smart_qos(
 					pos, bw_per_kb, pos * bw_per_kb, ramp_val, remainder,
 					max_bw_per_kb);
 
-				// round the value
+				/* round the value */
 				if ((remainder * 2) >= max_bw_per_kb)
 					ramp_val += 1;
 
@@ -739,18 +800,21 @@ static bool cam_cpas_calculate_smart_qos(
 			priority = priority << 4;
 			priority |= val;
 
-			CAM_DBG(CAM_PERF, "pos=%d, val=0x%x, priority=0x%x", pos, val, priority);
+			CAM_DBG(CAM_PERF, "pos=%d, val=0x%x, priority=0x%llx", pos, val, priority);
 		}
 
-		niu_node->curr_priority = priority;
+		niu_node->curr_priority_low = (uint32_t)(priority & 0xFFFFFFFF);
+		niu_node->curr_priority_high = (uint32_t)((priority >> 32) & 0xFFFFFFFF);
 
-		if (niu_node->curr_priority != niu_node->applied_priority)
+		if ((niu_node->curr_priority_low != niu_node->applied_priority_low) ||
+			(niu_node->curr_priority_high != niu_node->applied_priority_high))
 			needs_update = true;
 
 		CAM_DBG(CAM_PERF,
-			"Node[%d][%s] : camnoc_bw=%lld, niu_size=%d, bw_per_kb %lld, Priority applied 0x%x new 0x%x needs_update %d",
-			i, niu_node->node_name, niu_node->camnoc_bw, niu_node->niu_size, bw_per_kb,
-			niu_node->applied_priority, niu_node->curr_priority,
+			"Node[%d][%s]Priority applied high 0x%x low 0x%x, new high 0x%x low 0x%x, needs_update %d",
+			i, niu_node->node_name,
+			niu_node->applied_priority_high, niu_node->applied_priority_low,
+			niu_node->curr_priority_high, niu_node->curr_priority_low,
 			needs_update);
 	}
 
@@ -758,10 +822,11 @@ static bool cam_cpas_calculate_smart_qos(
 		for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++) {
 			niu_node = soc_private->smart_qos_info->rt_wr_niu_node[i];
 			CAM_INFO(CAM_PERF,
-				"Node[%d][%s] : camnoc_bw=%lld, niu_size=%d, offset 0x%x, Priority new 0x%x applied 0x%x",
+				"Node[%d][%s]camnoc_bw=%lld, niu_size=%d, offset high 0x%x, low 0x%x, Priority new high 0x%x low 0x%x, applied high 0x%x low 0x%x",
 				i, niu_node->node_name, niu_node->camnoc_bw, niu_node->niu_size,
-				niu_node->pri_lut_low_offset,
-				niu_node->curr_priority, niu_node->applied_priority);
+				niu_node->pri_lut_high_offset, niu_node->pri_lut_low_offset,
+				niu_node->curr_priority_high, niu_node->curr_priority_low,
+				niu_node->applied_priority_high, niu_node->applied_priority_low);
 		}
 	}
 
@@ -787,11 +852,20 @@ static int cam_cpas_apply_smart_qos(
 	for (i = 0; i < soc_private->smart_qos_info->num_rt_wr_nius; i++) {
 		niu_node = soc_private->smart_qos_info->rt_wr_niu_node[i];
 
-		if (niu_node->curr_priority != niu_node->applied_priority) {
-			cam_io_w_mb(niu_node->curr_priority,
+		if (niu_node->curr_priority_high != niu_node->applied_priority_high) {
+			cam_io_w_mb(niu_node->curr_priority_high,
+				soc_info->reg_map[reg_indx].mem_base +
+				niu_node->pri_lut_high_offset);
+
+			niu_node->applied_priority_high = niu_node->curr_priority_high;
+		}
+
+		if (niu_node->curr_priority_low != niu_node->applied_priority_low) {
+			cam_io_w_mb(niu_node->curr_priority_low,
 				soc_info->reg_map[reg_indx].mem_base +
 				niu_node->pri_lut_low_offset);
-			niu_node->applied_priority = niu_node->curr_priority;
+
+			niu_node->applied_priority_low = niu_node->curr_priority_low;
 		}
 	}
 
@@ -2677,9 +2751,13 @@ static void cam_cpas_update_monitor_array(struct cam_hw_info *cpas_hw,
 			struct cam_cpas_tree_node *niu_node =
 				soc_private->smart_qos_info->rt_wr_niu_node[i];
 
-			entry->rt_wr_niu_pri_lut[i] =
+			entry->rt_wr_niu_pri_lut_high[i] =
 				cam_io_r_mb(soc_info->reg_map[reg_camnoc].mem_base +
-				niu_node->pri_lut_low_offset);
+					niu_node->pri_lut_high_offset);
+
+			entry->rt_wr_niu_pri_lut_low[i] =
+				cam_io_r_mb(soc_info->reg_map[reg_camnoc].mem_base +
+					niu_node->pri_lut_low_offset);
 		}
 	}
 }
@@ -2783,11 +2861,12 @@ static void cam_cpas_dump_monitor_array(
 					soc_private->smart_qos_info->rt_wr_niu_node[j];
 
 				len += scnprintf((log_buf + len),
-					(CAM_CPAS_LOG_BUF_LEN - len), " [%s: 0x%x]",
+					(CAM_CPAS_LOG_BUF_LEN - len), " [%s: high 0x%x low 0x%x]",
 					niu_node->node_name,
-					entry->rt_wr_niu_pri_lut[j]);
+					entry->rt_wr_niu_pri_lut_high[j],
+					entry->rt_wr_niu_pri_lut_low[j]);
 			}
-			CAM_INFO(CAM_CPAS, "SmartQoS [Node: Pri_lut_low] %s", log_buf);
+			CAM_INFO(CAM_CPAS, "SmartQoS [Node: Pri_lut] %s", log_buf);
 		}
 
 		index = (index + 1) % CAM_CPAS_MONITOR_MAX_ENTRIES;

+ 6 - 2
drivers/cam_cpas/cam_cpas_hw.h

@@ -24,6 +24,8 @@
 #define CAM_CPAS_PATH_DATA_MAX               41
 #define CAM_CPAS_TRANSACTION_MAX             2
 #define CAM_CAMNOC_FILL_LVL_REG_INFO_MAX     6
+#define CAM_CPAS_MAX_SLOPE_FACTOR            100
+#define CAM_CPAS_MAX_STRESS_INDICATOR        100
 
 #define CAM_CPAS_AXI_MIN_MNOC_AB_BW   (2048 * 1024)
 #define CAM_CPAS_AXI_MIN_MNOC_IB_BW   (2048 * 1024)
@@ -294,7 +296,8 @@ struct cam_cpas_axi_port_debug_info {
  *           monitoring registers
  * @camnoc_port_name: Camnoc port names
  * @camnoc_fill_level: Camnoc fill level register info
- * @rt_wr_niu_pri_lut: priority lut low values of RT Wr NIUs
+ * @rt_wr_niu_pri_lut_low: priority lut low values of RT Wr NIUs
+ * @rt_wr_niu_pri_lut_high: priority lut high values of RT Wr NIUs
  */
 struct cam_cpas_monitor {
 	struct timespec64   timestamp;
@@ -311,7 +314,8 @@ struct cam_cpas_monitor {
 	uint32_t            num_camnoc_lvl_regs;
 	const char          *camnoc_port_name[CAM_CAMNOC_FILL_LVL_REG_INFO_MAX];
 	uint32_t            camnoc_fill_level[CAM_CAMNOC_FILL_LVL_REG_INFO_MAX];
-	uint32_t            rt_wr_niu_pri_lut[CAM_CPAS_MAX_RT_WR_NIU_NODES];
+	uint32_t            rt_wr_niu_pri_lut_low[CAM_CPAS_MAX_RT_WR_NIU_NODES];
+	uint32_t            rt_wr_niu_pri_lut_high[CAM_CPAS_MAX_RT_WR_NIU_NODES];
 };
 
 /**

+ 105 - 9
drivers/cam_cpas/cam_cpas_soc.c

@@ -442,7 +442,14 @@ static int cam_cpas_parse_node_tree(struct cam_cpas *cpas_core,
 				rc = of_property_read_u32(curr_node, "priority-lut-low-offset",
 					&curr_node_ptr->pri_lut_low_offset);
 				if (rc) {
-					CAM_ERR(CAM_CPAS, "Invalid priority offset rc %d", rc);
+					CAM_ERR(CAM_CPAS, "Invalid priority low offset rc %d", rc);
+					return rc;
+				}
+
+				rc = of_property_read_u32(curr_node, "priority-lut-high-offset",
+					&curr_node_ptr->pri_lut_high_offset);
+				if (rc) {
+					CAM_ERR(CAM_CPAS, "Invalid priority high offset rc %d", rc);
 					return rc;
 				}
 
@@ -1227,7 +1234,7 @@ int cam_cpas_get_custom_dt_info(struct cam_hw_info *cpas_hw,
 			"enable-smart-qos");
 
 	if (soc_private->enable_smart_qos) {
-		uint32_t value1, value2;
+		uint32_t value;
 
 		soc_private->smart_qos_info = kzalloc(sizeof(struct cam_cpas_smart_qos_info),
 			GFP_KERNEL);
@@ -1238,29 +1245,118 @@ int cam_cpas_get_custom_dt_info(struct cam_hw_info *cpas_hw,
 
 		/*
 		 * If enabled, we expect min and max priority values,
+		 * clamp priority value, slope factor, least and most
+		 * stressed clamp threshold values, high and low stress
+		 * indicator threshold values, bw ratio scale factor value,
 		 * so treat as fatal error if not available.
 		 */
 		rc = of_property_read_u32(of_node, "rt-wr-priority-min",
-			&value1);
+			&value);
 		if (rc) {
 			CAM_ERR(CAM_CPAS, "Invalid min Qos priority rc %d", rc);
 			goto cleanup_clients;
 		}
+		soc_private->smart_qos_info->rt_wr_priority_min = (uint8_t)value;
 
 		rc = of_property_read_u32(of_node, "rt-wr-priority-max",
-			&value2);
+			&value);
 		if (rc) {
-			CAM_ERR(CAM_CPAS, "Invalid min Qos priority rc %d", rc);
+			CAM_ERR(CAM_CPAS, "Invalid max Qos priority rc %d", rc);
+			goto cleanup_clients;
+		}
+		soc_private->smart_qos_info->rt_wr_priority_max = (uint8_t)value;
+
+		rc = of_property_read_u32(of_node, "rt-wr-priority-clamp",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid clamp Qos priority rc %d", rc);
 			goto cleanup_clients;
 		}
+		soc_private->smart_qos_info->rt_wr_priority_clamp = (uint8_t)value;
 
-		soc_private->smart_qos_info->rt_wr_priority_min = (uint8_t)value1;
-		soc_private->smart_qos_info->rt_wr_priority_max = (uint8_t)value2;
+		rc = of_property_read_u32(of_node, "rt-wr-slope-factor",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid slope factor rc %d", rc);
+			goto cleanup_clients;
+		}
+
+		if (value > CAM_CPAS_MAX_SLOPE_FACTOR) {
+			CAM_ERR(CAM_UTIL, "Invalid slope factor value %d", value);
+			rc = -EINVAL;
+			goto cleanup_clients;
+		} else
+			soc_private->smart_qos_info->rt_wr_slope_factor = (uint8_t)value;
 
 		CAM_DBG(CAM_CPAS,
-			"SmartQoS enabled, rt_wr_priority_min=%u, rt_wr_priority_max=%u",
+			"SmartQoS enabled, priority min=%u, max=%u, clamp=%u, slope factor=%u",
 			(uint32_t)soc_private->smart_qos_info->rt_wr_priority_min,
-			(uint32_t)soc_private->smart_qos_info->rt_wr_priority_max);
+			(uint32_t)soc_private->smart_qos_info->rt_wr_priority_max,
+			(uint32_t)soc_private->smart_qos_info->rt_wr_priority_clamp,
+			(uint32_t)soc_private->smart_qos_info->rt_wr_slope_factor);
+
+		rc = of_property_read_u32(of_node, "rt-wr-leaststressed-clamp-threshold",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid leaststressed clamp threshold rc %d", rc);
+			goto cleanup_clients;
+		}
+		soc_private->smart_qos_info->leaststressed_clamp_th = (uint8_t)value;
+
+		rc = of_property_read_u32(of_node, "rt-wr-moststressed-clamp-threshold",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid moststressed clamp threshold rc %d", rc);
+			goto cleanup_clients;
+		}
+		soc_private->smart_qos_info->moststressed_clamp_th = (uint8_t)value;
+
+		CAM_DBG(CAM_CPAS,
+			"leaststressed_clamp_th=%u, moststressed_clamp_th=%u",
+			(uint32_t)soc_private->smart_qos_info->leaststressed_clamp_th,
+			(uint32_t)soc_private->smart_qos_info->moststressed_clamp_th);
+
+		rc = of_property_read_u32(of_node, "rt-wr-highstress-indicator-threshold",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid highstress indicator threshold rc %d", rc);
+			goto cleanup_clients;
+		}
+
+		if (value > CAM_CPAS_MAX_STRESS_INDICATOR) {
+			CAM_ERR(CAM_UTIL, "Invalid highstress indicator threshold value %d", value);
+			rc = -EINVAL;
+			goto cleanup_clients;
+		} else
+			soc_private->smart_qos_info->highstress_indicator_th = (uint8_t)value;
+
+		rc = of_property_read_u32(of_node, "rt-wr-lowstress-indicator-threshold",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid lowstress indicator threshold rc %d", rc);
+			goto cleanup_clients;
+		}
+
+		if (value > CAM_CPAS_MAX_STRESS_INDICATOR) {
+			CAM_ERR(CAM_UTIL, "Invalid lowstress indicator threshold value %d", value);
+			rc = -EINVAL;
+			goto cleanup_clients;
+		} else
+			soc_private->smart_qos_info->lowstress_indicator_th = (uint8_t)value;
+
+		rc = of_property_read_u32(of_node, "rt-wr-bw-ratio-scale-factor",
+			&value);
+		if (rc) {
+			CAM_ERR(CAM_CPAS, "Invalid bw ratio scale factor rc %d", rc);
+			goto cleanup_clients;
+		}
+		soc_private->smart_qos_info->bw_ratio_scale_factor = (uint8_t)value;
+
+		CAM_DBG(CAM_CPAS,
+			"highstress_indicator_th=%u, lowstress_indicator_th=%u, scale factor=%u",
+			(uint32_t)soc_private->smart_qos_info->highstress_indicator_th,
+			(uint32_t)soc_private->smart_qos_info->lowstress_indicator_th,
+			(uint32_t)soc_private->smart_qos_info->bw_ratio_scale_factor);
 	} else {
 		CAM_DBG(CAM_CPAS, "SmartQoS not enabled, use static settings");
 		soc_private->smart_qos_info = NULL;

+ 29 - 8
drivers/cam_cpas/cam_cpas_soc.h

@@ -40,9 +40,13 @@
  *     (starting from end node of cpas client)
  * @pri_lut_low_offset: Register offset value for priority lut low.
  *                           Valid only for level1 nodes (representing NIUs)
+ * @pri_lut_high_offset: Register offset value for priority lut high.
+ *                           Valid only for level1 nodes (representing NIUs)
  * @niu_size: Size of NIU that this node represents. Size in KB
- * @curr_priority: New calculated priority
- * @applied_priority: Currently applied priority
+ * @curr_priority_low:     New calculated priority lut low values
+ * @curr_priority_high:    New calculated priority lut high values
+ * @applied_priority_low:  Currently applied priority lut low values
+ * @applied_priority_high: Currently applied priority lut high values
  *
  */
 struct cam_cpas_tree_node {
@@ -63,9 +67,12 @@ struct cam_cpas_tree_node {
 	struct device_node *tree_dev_node;
 	struct cam_cpas_tree_node *parent_node;
 	uint32_t pri_lut_low_offset;
+	uint32_t pri_lut_high_offset;
 	uint32_t niu_size;
-	uint32_t curr_priority;
-	uint32_t applied_priority;
+	uint32_t curr_priority_low;
+	uint32_t curr_priority_high;
+	uint32_t applied_priority_low;
+	uint32_t applied_priority_high;
 };
 
 /**
@@ -109,14 +116,28 @@ struct cam_sys_cache_info {
 /**
  * struct cam_cpas_smart_qos_info : Smart QOS info
  *
- * @rt_wr_priority_min:   Minimum priority value for rt write nius
- * @rt_wr_priority_max:   Maximum priority value for rt write nius
- * @num_rt_wr_nius:       Number of RT Wr NIUs
- * @rt_wr_niu_node:       List of level1 nodes representing RT Wr NIUs
+ * @rt_wr_priority_min:      Minimum priority value for rt write nius
+ * @rt_wr_priority_max:      Maximum priority value for rt write nius
+ * @rt_wr_priority_clamp:    Clamp priority value for rt write nius
+ * @rt_wr_slope_factor:      Slope factor value for rt write nius
+ * @leaststressed_clamp_th:  Leaststressed clamp threshold value for rt write nius
+ * @moststressed_clamp_th:   Moststressed clamp threshold value for rt write nius
+ * @highstress_indicator_th: Highstress indicator threshold value for rt write nius
+ * @lowstress_indicator_th:  Lowstress indicator threshold value for rt write nius
+ * @bw_ratio_scale_factor:   BW ratio scale factor value for rt write nius
+ * @num_rt_wr_nius:          Number of rt write nius
+ * @rt_wr_niu_node:          List of level1 nodes representing rt write nius
  */
 struct cam_cpas_smart_qos_info {
 	uint8_t rt_wr_priority_min;
 	uint8_t rt_wr_priority_max;
+	uint8_t rt_wr_priority_clamp;
+	uint8_t rt_wr_slope_factor;
+	uint8_t leaststressed_clamp_th;
+	uint8_t moststressed_clamp_th;
+	uint8_t highstress_indicator_th;
+	uint8_t lowstress_indicator_th;
+	uint8_t bw_ratio_scale_factor;
 	uint8_t num_rt_wr_nius;
 	struct cam_cpas_tree_node *rt_wr_niu_node[CAM_CPAS_MAX_RT_WR_NIU_NODES];
 };