Ver Fonte

disp: msm: sde: update worst case time to execute one tcs vote for rsc

1.add worst case time to execute one tcs vote for new rsc version 5.
2.define V3 duration as 930us for code readability.
3.add explicitly "ns" unit for "single_tcs_execution".

Change-Id: Ib62fe6217cf4f97a9c45f003b98b1bdf55354e27
Signed-off-by: GG Hou <[email protected]>
GG Hou há 3 anos atrás
pai
commit
ddebee0440
2 ficheiros alterados com 24 adições e 4 exclusões
  1. 21 3
      msm/sde_rsc.c
  2. 3 1
      msm/sde_rsc_priv.h

+ 21 - 3
msm/sde_rsc.c

@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
  */
 
@@ -29,6 +30,9 @@
 
 #define SINGLE_TCS_EXECUTION_TIME_V1	1064000
 #define SINGLE_TCS_EXECUTION_TIME_V2	930000
+#define SINGLE_TCS_EXECUTION_TIME_V3	930000
+#define SINGLE_TCS_EXECUTION_TIME_V4	930000
+#define SINGLE_TCS_EXECUTION_TIME_V5	650000
 
 #define RSC_MODE_INSTRUCTION_TIME	100
 #define RSC_MODE_THRESHOLD_OVERHEAD	2700
@@ -1713,10 +1717,24 @@ static int sde_rsc_probe(struct platform_device *pdev)
 	of_property_read_u32(pdev->dev.of_node, "qcom,sde-rsc-version",
 								&rsc->version);
 
-	if (rsc->version >= SDE_RSC_REV_2)
-		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V2;
-	else
+	switch (rsc->version) {
+	case SDE_RSC_REV_1:
 		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V1;
+		break;
+	case SDE_RSC_REV_2:
+		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V2;
+		break;
+	case SDE_RSC_REV_3:
+		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V3;
+		break;
+	case SDE_RSC_REV_4:
+		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V4;
+		break;
+	case SDE_RSC_REV_5:
+	default:
+		rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V5;
+		break;
+	}
 
 	if (rsc->version >= SDE_RSC_REV_3) {
 		rsc->time_slot_0_ns = rsc->single_tcs_execution_time

+ 3 - 1
msm/sde_rsc_priv.h

@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
  */
 
@@ -28,6 +29,7 @@
 #define SDE_RSC_REV_2			0x2
 #define SDE_RSC_REV_3			0x3
 #define SDE_RSC_REV_4			0x4
+#define SDE_RSC_REV_5			0x5
 
 #define SDE_RSC_HW_MAJOR_MINOR_STEP(major, minor, step) \
 	(((major & 0xff) << 16) |\
@@ -181,7 +183,7 @@ struct sde_rsc_bw_config {
  * primary_client:	A client which is allowed to make command state request
  *			and ab/ib vote on display rsc
  * single_tcs_execution_time: worst case time to execute one tcs vote
- *			(sleep/wake)
+ *			(sleep/wake), in ns
  * backoff_time_ns:	time to only wake tcs in any mode
  * mode_threshold_time_ns: time to wake TCS in mode-0, must be greater than
  *			backoff time