drm/panel: check panel status before send custom commands

drm/panel:
Check whether panel is ready, before send custom command.
Otherwise, try to enable dsi,but actually fail.

Change-Id: Ia34efc2a6fe386e4d713303ce52248ebeb62c5a8
Signed-off-by: wangyq13 <[email protected]>
Reviewed-on: https://gerrit.mot.com/2285035
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <[email protected]>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2022-05-31 17:41:33 +08:00 • committed by tongkun1
commit 641084c375

View file

@ -1011,6 +1011,11 @@ static int dsi_panel_send_param_cmd(struct dsi_panel *panel,
mutex_lock(&panel->panel_lock);
if (!panel->panel_initialized) {
rc = -ENODEV;
goto end;
}
if (param_info->value >= panel_param->val_max)
param_info->value = panel_param->val_max - 1;