Forráskód Böngészése

disp: msm: dp: avoid register access when lclk is off

Sometimes the link clock is not getting locked when dp
display is resumed from PM suspend. This is causing NOC
error when registers in link clock domain are accessed
without proper checks.

The set_colorspace, config_hdr and update_pps connector
ops are accessing the registers in link clock domain
without checking if the necessary clocks are enabled.
These changes will ensure the DP stream clocks are not
enabled when link clock enable fails and prevents the
connector ops from accessing the registers whose clocks
are not enabled.

Change-Id: If89d2552ee0ce96493ee8c1666d7677221705d9a
Signed-off-by: Sankeerth Billakanti <[email protected]>
Signed-off-by: Tatenda Chipeperekwa <[email protected]>
Sankeerth Billakanti 5 éve
szülő
commit
ba8d20f98e
1 módosított fájl, 18 hozzáadás és 0 törlés
  1. 18 0
      msm/dp/dp_display.c

+ 18 - 0
msm/dp/dp_display.c

@@ -2646,6 +2646,11 @@ static int dp_display_config_hdr(struct dp_display *dp_display, void *panel,
 		return -EINVAL;
 	}
 
+	if (!dp_display_state_is(DP_STATE_ENABLED)) {
+		dp_display_state_show("[not enabled]");
+		return 0;
+	}
+
 	/*
 	 * In rare cases where HDR metadata is updated independently
 	 * flush the HDR metadata immediately instead of relying on
@@ -2667,12 +2672,20 @@ static int dp_display_setup_colospace(struct dp_display *dp_display,
 		u32 colorspace)
 {
 	struct dp_panel *dp_panel;
+	struct dp_display_private *dp;
 
 	if (!dp_display || !panel) {
 		pr_err("invalid input\n");
 		return -EINVAL;
 	}
 
+	dp = container_of(dp_display, struct dp_display_private, dp_display);
+
+	if (!dp_display_state_is(DP_STATE_ENABLED)) {
+		dp_display_state_show("[not enabled]");
+		return 0;
+	}
+
 	dp_panel = panel;
 
 	return dp_panel->set_colorspace(dp_panel, colorspace);
@@ -3005,6 +3018,11 @@ static int dp_display_update_pps(struct dp_display *dp_display,
 		return -EINVAL;
 	}
 
+	if (!dp_display_state_is(DP_STATE_ENABLED)) {
+		dp_display_state_show("[not enabled]");
+		return 0;
+	}
+
 	dp_panel = sde_conn->drv_panel;
 	dp_panel->update_pps(dp_panel, pps_cmd);
 	return 0;