From 95cae124f2d96e55b0af317f90ff68d292490660 Mon Sep 17 00:00:00 2001 From: Prahlad Valluru Date: Thu, 8 May 2025 12:08:42 +0530 Subject: [PATCH 1/2] 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, From b749468a5add48e9f20fd3913dbae9243e2bb035 Mon Sep 17 00:00:00 2001 From: Gopi Botlagunta Date: Thu, 17 Apr 2025 18:23:49 +0530 Subject: [PATCH 2/2] disp: msm: sde: get_modes from connector if not present In case of external bridges, modes are not available for setting splash_mode. Add support to get modes supported by the external bridges. Change-Id: Ib17e17bcf1ec91b582da2e0cf5d648b9c366b292 Signed-off-by: Gopi Botlagunta --- msm/sde/sde_kms.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_kms.c b/msm/sde/sde_kms.c index 43c436d6ba3a..7dfad7d8d194 100644 --- a/msm/sde/sde_kms.c +++ b/msm/sde/sde_kms.c @@ -3489,11 +3489,20 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms, mutex_unlock(&dev->mode_config.mutex); return -EINVAL; } - mutex_unlock(&dev->mode_config.mutex); crtc->state->encoder_mask = (1 << drm_encoder_index(encoder)); + /* get supported modes in case of external bridge panels*/ + if (!dsi_display->panel->num_timing_nodes) { + connector->funcs->fill_modes(connector, + dev->mode_config.max_width, + dev->mode_config.max_height); + drm_mode = list_first_entry(&connector->modes, + struct drm_display_mode, head); + } + else + drm_mode = _sde_kms_get_splash_mode(sde_kms, connector, state); - drm_mode = _sde_kms_get_splash_mode(sde_kms, connector, state); + mutex_unlock(&dev->mode_config.mutex); if (!drm_mode) { SDE_ERROR("drm_mode not found; handoff_type:%d\n", sde_kms->splash_data.type);