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

Commit 43dfa3a4 authored by Vara Reddy's avatar Vara Reddy Committed by Shashank Babu Chinta Venkata
Browse files

drm/msm/dsi-staging: enable debug logs during dsi state checks



During state checks in dsi control, enable state machine error
logs by default to catch rarely reproducible issues.

CRs-Fixed: 2170957
Change-Id: I1dd3afeba8bb023e427a4ed15b40d3758b53e885
Signed-off-by: default avatarVara Reddy <varar@codeaurora.org>
Signed-off-by: default avatarShashank Babu Chinta Venkata <sbchin@codeaurora.org>
parent f3c26e85
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -280,12 +280,12 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
	switch (op) {
	case DSI_CTRL_OP_POWER_STATE_CHANGE:
		if (state->power_state == op_state) {
			pr_debug("[%d] No change in state, pwr_state=%d\n",
			pr_err("[%d] No change in state, pwr_state=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if (state->power_state == DSI_CTRL_POWER_VREG_ON) {
			if (state->vid_engine_state == DSI_CTRL_ENGINE_ON) {
				pr_debug("[%d]State error: op=%d: %d\n",
				pr_err("[%d]State error: op=%d: %d\n",
				       dsi_ctrl->cell_index,
				       op_state,
				       state->vid_engine_state);
@@ -295,12 +295,12 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		break;
	case DSI_CTRL_OP_CMD_ENGINE:
		if (state->cmd_engine_state == op_state) {
			pr_debug("[%d] No change in state, cmd_state=%d\n",
			pr_err("[%d] No change in state, cmd_state=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if ((state->power_state != DSI_CTRL_POWER_VREG_ON) ||
			   (state->controller_state != DSI_CTRL_ENGINE_ON)) {
			pr_debug("[%d]State error: op=%d: %d, %d\n",
			pr_err("[%d]State error: op=%d: %d, %d\n",
			       dsi_ctrl->cell_index,
			       op,
			       state->power_state,
@@ -310,12 +310,12 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		break;
	case DSI_CTRL_OP_VID_ENGINE:
		if (state->vid_engine_state == op_state) {
			pr_debug("[%d] No change in state, cmd_state=%d\n",
			pr_err("[%d] No change in state, cmd_state=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if ((state->power_state != DSI_CTRL_POWER_VREG_ON) ||
			   (state->controller_state != DSI_CTRL_ENGINE_ON)) {
			pr_debug("[%d]State error: op=%d: %d, %d\n",
			pr_err("[%d]State error: op=%d: %d, %d\n",
			       dsi_ctrl->cell_index,
			       op,
			       state->power_state,
@@ -325,11 +325,11 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		break;
	case DSI_CTRL_OP_HOST_ENGINE:
		if (state->controller_state == op_state) {
			pr_debug("[%d] No change in state, ctrl_state=%d\n",
			pr_err("[%d] No change in state, ctrl_state=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if (state->power_state != DSI_CTRL_POWER_VREG_ON) {
			pr_debug("[%d]State error (link is off): op=%d:, %d\n",
			pr_err("[%d]State error (link is off): op=%d:, %d\n",
			       dsi_ctrl->cell_index,
			       op_state,
			       state->power_state);
@@ -337,7 +337,7 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		} else if ((op_state == DSI_CTRL_ENGINE_OFF) &&
			   ((state->cmd_engine_state != DSI_CTRL_ENGINE_OFF) ||
			    (state->vid_engine_state != DSI_CTRL_ENGINE_OFF))) {
			pr_debug("[%d]State error (eng on): op=%d: %d, %d\n",
			pr_err("[%d]State error (eng on): op=%d: %d, %d\n",
				  dsi_ctrl->cell_index,
				  op_state,
				  state->cmd_engine_state,
@@ -349,7 +349,7 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		if ((state->power_state != DSI_CTRL_POWER_VREG_ON) ||
		    (state->host_initialized != true) ||
		    (state->cmd_engine_state != DSI_CTRL_ENGINE_ON)) {
			pr_debug("[%d]State error: op=%d: %d, %d, %d\n",
			pr_err("[%d]State error: op=%d: %d, %d, %d\n",
			       dsi_ctrl->cell_index,
			       op,
			       state->power_state,
@@ -360,23 +360,23 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		break;
	case DSI_CTRL_OP_HOST_INIT:
		if (state->host_initialized == op_state) {
			pr_debug("[%d] No change in state, host_init=%d\n",
			pr_err("[%d] No change in state, host_init=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if (state->power_state != DSI_CTRL_POWER_VREG_ON) {
			pr_debug("[%d]State error: op=%d: %d\n",
			pr_err("[%d]State error: op=%d: %d\n",
			       dsi_ctrl->cell_index, op, state->power_state);
			rc = -EINVAL;
		}
		break;
	case DSI_CTRL_OP_TPG:
		if (state->tpg_enabled == op_state) {
			pr_debug("[%d] No change in state, tpg_enabled=%d\n",
			pr_err("[%d] No change in state, tpg_enabled=%d\n",
			       dsi_ctrl->cell_index, op_state);
			rc = -EINVAL;
		} else if ((state->power_state != DSI_CTRL_POWER_VREG_ON) ||
			   (state->controller_state != DSI_CTRL_ENGINE_ON)) {
			pr_debug("[%d]State error: op=%d: %d, %d\n",
			pr_err("[%d]State error: op=%d: %d, %d\n",
			       dsi_ctrl->cell_index,
			       op,
			       state->power_state,
@@ -386,7 +386,7 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl,
		break;
	case DSI_CTRL_OP_PHY_SW_RESET:
		if (state->power_state != DSI_CTRL_POWER_VREG_ON) {
			pr_debug("[%d]State error: op=%d: %d\n",
			pr_err("[%d]State error: op=%d: %d\n",
			       dsi_ctrl->cell_index, op, state->power_state);
			rc = -EINVAL;
		}