Selaa lähdekoodia

disp: msm: sde: update uidle fal1 maximum threshold for waipio

This change provides support to have per target configuration
of the maximum value for fal1 threshold & updates value for waipio
as per qos recommendation.

Change-Id: I48df0d1c58a8de80f40200b35e406d07621a3f68
Signed-off-by: Prabhanjan Kandula <[email protected]>
Prabhanjan Kandula 4 vuotta sitten
vanhempi
sitoutus
68b83b3ffc
3 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. 5 0
      msm/sde/sde_hw_catalog.c
  2. 2 0
      msm/sde/sde_hw_catalog.h
  3. 1 2
      msm/sde/sde_plane.c

+ 5 - 0
msm/sde/sde_hw_catalog.c

@@ -150,6 +150,8 @@
 #define SDE_UIDLE_FAL10_DANGER 6
 #define SDE_UIDLE_FAL10_TARGET_IDLE 50
 #define SDE_UIDLE_FAL1_TARGET_IDLE 40
+#define SDE_UIDLE_FAL1_MAX_THRESHOLD 15
+#define SDE_UIDLE_REV102_FAL1_MAX_THRESHOLD 255
 #define SDE_UIDLE_FAL10_THRESHOLD_60 12
 #define SDE_UIDLE_FAL10_THRESHOLD_90 13
 #define SDE_UIDLE_MAX_DWNSCALE 1500
@@ -4780,6 +4782,7 @@ static void _sde_hw_setup_uidle(struct sde_uidle_cfg *uidle_cfg)
 		uidle_cfg->fal1_target_idle_time = SDE_UIDLE_FAL1_TARGET_IDLE;
 		uidle_cfg->max_dwnscale = SDE_UIDLE_MAX_DWNSCALE;
 		uidle_cfg->debugfs_ctrl = true;
+		uidle_cfg->fal1_max_threshold = SDE_UIDLE_FAL1_MAX_THRESHOLD;
 
 		if (IS_SDE_UIDLE_REV_100(uidle_cfg->uidle_rev)) {
 			uidle_cfg->fal10_threshold =
@@ -4798,6 +4801,8 @@ static void _sde_hw_setup_uidle(struct sde_uidle_cfg *uidle_cfg)
 				SDE_UIDLE_FAL10_THRESHOLD_90;
 			uidle_cfg->max_fps = SDE_UIDLE_MAX_FPS_90;
 			uidle_cfg->max_fal1_fps = SDE_UIDLE_MAX_FPS_240;
+			uidle_cfg->fal1_max_threshold =
+					SDE_UIDLE_REV102_FAL1_MAX_THRESHOLD;
 		}
 	} else {
 		pr_err("invalid uidle rev:0x%x, disabling uidle\n",

+ 2 - 0
msm/sde/sde_hw_catalog.h

@@ -981,6 +981,7 @@ struct sde_mdp_cfg {
  * @fal10_target_idle_time: fal10 targeted time in uS
  * @fal1_target_idle_time:  fal1 targeted time in uS
  * @fal10_threshold:        fal10 threshold value
+ * @fal1_max_threshold      fal1 maximum allowed threshold value
  * @max_downscale:          maximum downscaling ratio x1000.
  *	                    This ratio is multiplied x1000 to allow
  *	                    3 decimal precision digits.
@@ -1003,6 +1004,7 @@ struct sde_uidle_cfg {
 	u32 fal10_target_idle_time;
 	u32 fal1_target_idle_time;
 	u32 fal10_threshold;
+	u32 fal1_max_threshold;
 	u32 max_dwnscale;
 	u32 max_fps;
 	u32 max_fal1_fps;

+ 1 - 2
msm/sde/sde_plane.c

@@ -2915,7 +2915,6 @@ static void _sde_plane_setup_uidle(struct drm_crtc *crtc,
 	struct sde_rect *src, struct sde_rect *dst)
 {
 	struct sde_hw_pipe_uidle_cfg cfg;
-	u32 fal1_threshold_max = 15;
 
 	u32 line_time = sde_crtc_get_line_time(crtc);
 	u32 fal1_target_idle_time_ns =
@@ -2932,7 +2931,7 @@ static void _sde_plane_setup_uidle(struct drm_crtc *crtc,
 		cfg.fal10_exit_threshold = fal10_threshold + 2;
 		cfg.fal1_threshold = min(1 +
 			(fal1_target_idle_time_ns*1000/line_time*2)/1000,
-			fal1_threshold_max);
+			psde->catalog->uidle_cfg.fal1_max_threshold);
 		cfg.fal_allowed_threshold = fal10_threshold +
 			(fal10_target_idle_time_ns*1000/line_time*2)/1000;
 	} else {