Loading drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +15 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,21 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl, return rc; } bool dsi_ctrl_validate_host_state(struct dsi_ctrl *dsi_ctrl) { struct dsi_ctrl_state_info *state = &dsi_ctrl->current_state; if (!state) { pr_err("Invalid host state for DSI controller\n"); return -EINVAL; } if (!state->host_initialized) return true; return false; } static void dsi_ctrl_update_state(struct dsi_ctrl *dsi_ctrl, enum dsi_ctrl_driver_ops op, u32 op_state) Loading drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.h +10 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,16 @@ int dsi_ctrl_set_power_state(struct dsi_ctrl *dsi_ctrl, int dsi_ctrl_set_cmd_engine_state(struct dsi_ctrl *dsi_ctrl, enum dsi_engine_state state); /** * dsi_ctrl_validate_host_state() - validate DSI ctrl host state * @dsi_ctrl: DSI Controller handle. * * Validate DSI cotroller host state * * Return: boolean indicating whether host is not initalized. */ bool dsi_ctrl_validate_host_state(struct dsi_ctrl *dsi_ctrl); /** * dsi_ctrl_set_vid_engine_state() - set video engine state * @dsi_ctrl: DSI Controller handle. Loading drivers/gpu/drm/msm/dsi-staging/dsi_display.c +9 −1 Original line number Diff line number Diff line Loading @@ -429,9 +429,17 @@ static int dsi_display_read_status(struct dsi_display_ctrl *ctrl, struct dsi_cmd_desc *cmds; u32 flags = 0; if (!panel) if (!panel || !ctrl || !ctrl->ctrl) return -EINVAL; /* * When DSI controller is not in initialized state, we do not want to * report a false ESD failure and hence we defer until next read * happen. */ if (dsi_ctrl_validate_host_state(ctrl->ctrl)) return 1; /* acquire panel_lock to make sure no commands are in progress */ dsi_panel_acquire_panel_lock(panel); Loading Loading
drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +15 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,21 @@ static int dsi_ctrl_check_state(struct dsi_ctrl *dsi_ctrl, return rc; } bool dsi_ctrl_validate_host_state(struct dsi_ctrl *dsi_ctrl) { struct dsi_ctrl_state_info *state = &dsi_ctrl->current_state; if (!state) { pr_err("Invalid host state for DSI controller\n"); return -EINVAL; } if (!state->host_initialized) return true; return false; } static void dsi_ctrl_update_state(struct dsi_ctrl *dsi_ctrl, enum dsi_ctrl_driver_ops op, u32 op_state) Loading
drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.h +10 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,16 @@ int dsi_ctrl_set_power_state(struct dsi_ctrl *dsi_ctrl, int dsi_ctrl_set_cmd_engine_state(struct dsi_ctrl *dsi_ctrl, enum dsi_engine_state state); /** * dsi_ctrl_validate_host_state() - validate DSI ctrl host state * @dsi_ctrl: DSI Controller handle. * * Validate DSI cotroller host state * * Return: boolean indicating whether host is not initalized. */ bool dsi_ctrl_validate_host_state(struct dsi_ctrl *dsi_ctrl); /** * dsi_ctrl_set_vid_engine_state() - set video engine state * @dsi_ctrl: DSI Controller handle. Loading
drivers/gpu/drm/msm/dsi-staging/dsi_display.c +9 −1 Original line number Diff line number Diff line Loading @@ -429,9 +429,17 @@ static int dsi_display_read_status(struct dsi_display_ctrl *ctrl, struct dsi_cmd_desc *cmds; u32 flags = 0; if (!panel) if (!panel || !ctrl || !ctrl->ctrl) return -EINVAL; /* * When DSI controller is not in initialized state, we do not want to * report a false ESD failure and hence we defer until next read * happen. */ if (dsi_ctrl_validate_host_state(ctrl->ctrl)) return 1; /* acquire panel_lock to make sure no commands are in progress */ dsi_panel_acquire_panel_lock(panel); Loading