From 387cda76328a0ebd632909c53353f885a685d58a Mon Sep 17 00:00:00 2001 From: Amine Najahi Date: Mon, 9 Nov 2020 21:51:32 -0500 Subject: [PATCH] disp: msm: sde: fix invalid dual-display TVM restriction check Currently, driver enforces that a TUI session is only happening on a single display using the number of DSI displays. This check leads to an atomic check failure for the dual-display use case, since 2 DSI displays are connected at the same time. Instead of using the number of DSI display, the validation check should use the number of active displays. This change modifies the validation check to use cont_splash_enabled variable, which contains information about the interface state. Change-Id: Ie820832df812c37ebff67f6083d6922d32cbd98a Signed-off-by: Amine Najahi --- msm/sde/sde_kms.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msm/sde/sde_kms.c b/msm/sde/sde_kms.c index 302a7f4ee8..185ee4f5ff 100644 --- a/msm/sde/sde_kms.c +++ b/msm/sde/sde_kms.c @@ -4534,12 +4534,6 @@ int sde_kms_vm_trusted_resource_init(struct sde_kms *sde_kms) return -EINVAL; } - if (sde_kms->dsi_display_count != 1) { - SDE_ERROR("no. of displays not supported:%d\n", - sde_kms->dsi_display_count); - return -EINVAL; - } - dev = sde_kms->dev; priv = dev->dev_private; sde_kms->splash_data.type = SDE_VM_HANDOFF; @@ -4558,6 +4552,12 @@ int sde_kms_vm_trusted_resource_init(struct sde_kms *sde_kms) dsi_display_set_active_state(display, true); } + if (sde_kms->splash_data.num_splash_displays != 1) { + SDE_ERROR("no. of displays not supported:%d\n", + sde_kms->splash_data.num_splash_displays); + goto error; + } + ret = sde_kms_cont_splash_config(&sde_kms->base); if (ret) { SDE_ERROR("error in setting handoff configs\n");