Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp414793rdb; Thu, 15 Feb 2024 04:22:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXgHpZ2mkLEOzRk9P9mL5h0dB49BerM2M5R8Kv+1ULtJXhy/Ao+VL4Znyg+7x/0edYLsuCdiDycHhjZ1iz+k868VxQ8MkZ/w8f8i7/dNw== X-Google-Smtp-Source: AGHT+IHq0CC09mL94fKm4V/h7TkI4AJ+iKlxLbdT3epdw5cH5OuU3EEvTN2fdWoL4mazA4YNvnl3 X-Received: by 2002:a05:6870:2214:b0:21e:5008:cf62 with SMTP id i20-20020a056870221400b0021e5008cf62mr245041oaf.21.1707999727412; Thu, 15 Feb 2024 04:22:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707999727; cv=pass; d=google.com; s=arc-20160816; b=qnS04cYbe0PV5TSbSRT9usTDF+h43JUiPAtAr10p4QUmWLdwfKUHkYtfqN0NpVefyx eUKOySR2Btc4+gD/4lcCoGfIjVCWrv9FTfGq8pwlRtQy5Sp4NH30RTs8xh10fd6IvRNV 1wVWjn2FUWaYQ6Myfp266RIAFx9vXvaofYNHBwh7Z6w+deKOsUp15m1S7//wb5RAYUW0 OJkmZp+p9TxyYO50apB4iiqS8G+qe/YIIxGkjEfIhQ7p42Qd3xf5ogxU2eGDYdB8nEad eLHX+F5BhpT5RzaBdfPWy08tKQqZGSZqVNDtEf+dI+iKQSSm7VnnNfyxPU0hlvFF59jJ qPoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=TJ0yNevOP636XIwjw9GslgubE0f5OWjcY8GZRp0ladc=; fh=yn2+dCnPeWIn9cKA5/D3faAt9WE25Rhhh7094kQksYU=; b=yRCsxWEJFi7n0ujkn60BsWOrllZ7iqcWOvE9RTUN0gD19yscqiiSZnqVFHOaTdxpiW 8uqwqudN45EEoRy2DOiEzHzofCfXo/W+abWyvx4l9QD8t43ve+FWrd7Ap0qcrwL4mdSk KkqidS5GX4yyc5pZE/3tAyvqC6bUzvfjhDECzdm3n+omoy9lgVMrUli2YgGDVfFRcSTY ntyhrqZHWrdhlKt6rM80To7RRqJ69KUbQ2hGK39lcISuhDCCbIleRlUmOxgce+bnNJbz Y89K5FJnOs7+UHXBbH2CZj3PetB8JG3xxuO9JA4njZejSdAiRtQ3KCVO26QzwsAikPv+ kW4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vn0WNA4H; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-66866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m27-20020a63711b000000b005dc4190c756si1046588pgc.866.2024.02.15.04.22.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:22:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vn0WNA4H; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-66866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C5F3128CA6D for ; Thu, 15 Feb 2024 12:13:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4778112BF0D; Thu, 15 Feb 2024 12:13:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="vn0WNA4H" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB3C87484 for ; Thu, 15 Feb 2024 12:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707999208; cv=none; b=bwUOKQY5077oeOBhzll0al5m35+V5ZrYzS8GYljUeICrWkljmd0PO0DahgYywlZeCy0qZe4jnnSk2oji/NKWDvDLeQWz6xbxDDCR3yYittbOvuN+OmJqCP+8TKlceagGhGZ+Q/wF2U/SxOl0Eff89osKDSff6MGy3qsvvPDlpPE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707999208; c=relaxed/simple; bh=NFs89QnBgbGgSlfJvu4mQnmgXCXRYhOZW4oE1DEnSFY=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=RmQRDMAUa3sAIvdJzwMslKPDUx+ECNBG/0jReU63JFAmFNESoNct9OcxnWTLlRUbPQv0VaVASVbY1+dETkximbZO94buBu5v8G3xZ1pC2AQyUYliAEYsz+THW3c53liL4ymWhxVbqke4kfq5+qb4lqQAxxxIQRvZhUdd9A5RjdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=vn0WNA4H; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41FCD1RD110654; Thu, 15 Feb 2024 06:13:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707999181; bh=TJ0yNevOP636XIwjw9GslgubE0f5OWjcY8GZRp0ladc=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=vn0WNA4HZuuMrikuBDPLvnNW0/+LvmCmlwdntaPvMCWr0iWqMGnHA2wo6S0P5x542 QHTCFicqV0TKFot4t5NM8ckUsM4vWi/xTTOgPPEyWhql+c7p/q+SsPYd+8Mv5u56dp 0lOl31pORu3qnzZcC68ettBy4Xp5ZzafrJjmk2pQ= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41FCD14q109834 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Feb 2024 06:13:01 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Feb 2024 06:13:01 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 15 Feb 2024 06:13:01 -0600 Received: from [172.24.227.31] (uda0496377.dhcp.ti.com [172.24.227.31]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41FCC4qn059758; Thu, 15 Feb 2024 06:12:58 -0600 Message-ID: <1a056ce4-3f43-4ca7-bc29-d297cb38a1d0@ti.com> Date: Thu, 15 Feb 2024 17:42:57 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] drm/tidss: Fix sync-lost issue with two displays Content-Language: en-US To: Tomi Valkeinen , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , "Sam Ravnborg" , Devarsh Thakkar , "Francesco Dolcini" CC: Tomi Valkeinen , , References: <20240213-tidss-fixes-v1-0-d709e8dfa505@ideasonboard.com> <20240213-tidss-fixes-v1-2-d709e8dfa505@ideasonboard.com> From: Aradhya Bhatia In-Reply-To: <20240213-tidss-fixes-v1-2-d709e8dfa505@ideasonboard.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 13/02/24 13:46, Tomi Valkeinen wrote: > A sync lost issue can be observed with two displays, when moving a plane > from one disabled display to an another disabled display, and then > enabling the display to which the plane was moved to. The exact > requirements for this to trigger are not clear. > > It looks like the issue is that the layers are left enabled in the first > display's OVR registers. Even if the corresponding VP is disabled, it > still causes an issue, as if the disabled VP and its OVR would still be > in use, leading to the same VID being used by two OVRs. However, this is > just speculation based on testing the DSS behavior. > > Experimentation shows that as a workaround, we can disable all the > layers in the OVR when disabling a VP. There should be no downside to > this, as the OVR is anyway effectively disabled if its VP is disabled, > and it seems to solve the sync lost issue. > > However, there may be a bigger issue in play here, related to J721e > erratum i2097 ("DSS: Disabling a Layer Connected to Overlay May Result > in Synclost During the Next Frame"). Experimentation also shows that the > OVR's CHANNELIN field has similar issue. So we may need to revisit this > when we find out more about the core issue. > > Signed-off-by: Tomi Valkeinen > Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia > --- > drivers/gpu/drm/tidss/tidss_crtc.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c > index 5f838980c7a1..94f8e3178df5 100644 > --- a/drivers/gpu/drm/tidss/tidss_crtc.c > +++ b/drivers/gpu/drm/tidss/tidss_crtc.c > @@ -265,6 +265,16 @@ static void tidss_crtc_atomic_disable(struct drm_crtc *crtc, > > reinit_completion(&tcrtc->framedone_completion); > > + /* > + * If a layer is left enabled when the videoport is disabled, and the > + * vid pipeline that was used for the layer is taken into use on > + * another videoport, the DSS will report sync lost issues. Disable all > + * the layers here as a work-around. > + */ > + for (u32 layer = 0; layer < tidss->feat->num_planes; layer++) > + dispc_ovr_enable_layer(tidss->dispc, tcrtc->hw_videoport, layer, > + false); > + > dispc_vp_disable(tidss->dispc, tcrtc->hw_videoport); > > if (!wait_for_completion_timeout(&tcrtc->framedone_completion, >