From 95cae124f2d96e55b0af317f90ff68d292490660 Mon Sep 17 00:00:00 2001 From: Prahlad Valluru Date: Thu, 8 May 2025 12:08:42 +0530 Subject: [PATCH] disp: msm: dp: handle panel_init when host is ready Currently, panel_init is getting executed even when host is already ready. Handle panel_init such that it will be called only as part of host ready. Handle continuous splash case as well. Change-Id: Id022fed099e1e1a87282c58bead839e68f502098 Signed-off-by: Nilesh Laad Signed-off-by: Prahlad Valluru --- msm/dp/dp_display.c | 9 ++++++--- msm/dp/dp_panel.c | 7 +++++-- msm/dp/dp_panel.h | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index 788c43d1da2e..2655f9d236d7 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ @@ -1185,6 +1185,7 @@ error_ctrl: static int dp_display_panel_ready(struct dp_display_private *dp) { int rc = 0; + bool skip_op = is_skip_required(&dp->dp_display); if (dp->dp_display.is_edp) { rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_VCC_EN, true); @@ -1202,9 +1203,9 @@ static int dp_display_panel_ready(struct dp_display_private *dp) } return -ETIMEDOUT; } + + dp->panel->init(dp->panel, skip_op); } - if (!dp->dp_display.cont_splash_enabled) - dp->panel->init(dp->panel); return 0; } @@ -1248,6 +1249,8 @@ static int dp_display_host_ready(struct dp_display_private *dp) dp->ctrl->abort(dp->ctrl, false); dp->aux->init(dp->aux, dp->parser->aux_cfg, skip_op); + dp->panel->init(dp->panel, skip_op); + dp_display_state_add(DP_STATE_READY); /* log this as it results from user action of cable connection */ DP_INFO("[OK]\n"); diff --git a/msm/dp/dp_panel.c b/msm/dp/dp_panel.c index 8fc1b13c3e32..a9f65f1aba8c 100644 --- a/msm/dp/dp_panel.c +++ b/msm/dp/dp_panel.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ @@ -2381,7 +2381,7 @@ error: return rc; } -static int dp_panel_init_panel_info(struct dp_panel *dp_panel) +static int dp_panel_init_panel_info(struct dp_panel *dp_panel, bool skip_op) { int rc = 0; struct dp_panel_private *panel; @@ -2393,6 +2393,9 @@ static int dp_panel_init_panel_info(struct dp_panel *dp_panel) goto end; } + if (skip_op) + goto end; + panel = container_of(dp_panel, struct dp_panel_private, dp_panel); pinfo = &dp_panel->pinfo; diff --git a/msm/dp/dp_panel.h b/msm/dp/dp_panel.h index 3abb41297584..206b62dc32c7 100644 --- a/msm/dp/dp_panel.h +++ b/msm/dp/dp_panel.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. */ @@ -162,7 +162,7 @@ struct dp_panel { s64 fec_overhead_fp; - int (*init)(struct dp_panel *dp_panel); + int (*init)(struct dp_panel *dp_panel, bool skip_op); int (*deinit)(struct dp_panel *dp_panel, u32 flags); int (*hw_cfg)(struct dp_panel *dp_panel, bool enable); int (*read_sink_caps)(struct dp_panel *dp_panel,