From b749468a5add48e9f20fd3913dbae9243e2bb035 Mon Sep 17 00:00:00 2001 From: Gopi Botlagunta Date: Thu, 17 Apr 2025 18:23:49 +0530 Subject: [PATCH] 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);