Message ID | 20240213-tidss-fixes-v1-2-d709e8dfa505@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp394157dyb; Tue, 13 Feb 2024 00:20:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXjc2D2VBSsXPd3/M39w9+wWP0WZEKzJCrspZlaBevuArBF+9yb4uHQ9fDZpe6l7w5B/UUYh3SisRVQG/YQBdXnTV0e1w== X-Google-Smtp-Source: AGHT+IE7ELFF1PS7xoEgZ/2xPTzOtJ3LqRc+19tbhIpebBzUiVOOiKKvZJK+EOSnV1EzkgH7nuCG X-Received: by 2002:a17:90a:b38a:b0:297:179c:15bb with SMTP id e10-20020a17090ab38a00b00297179c15bbmr7890069pjr.9.1707812434252; Tue, 13 Feb 2024 00:20:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707812434; cv=pass; d=google.com; s=arc-20160816; b=OBqhL3Nbdriy/uMFlJwNHKPaefnkOtjMhgZD4jppy7r8kqJ6SyCUg6X19rRckuxn4F pQP3yMHzujTzzaDRoMRSbueO3mPFu3jfZTkDwwZCYuQSCjcrS4pixfJiRi2b7B3E4NYf MqKiVnRv9N5l1YeWXTK/t2lh4m1KSSBlNiSSvxKEQBjLpSGddPZSQmAFcOaqTwqyc3Qh M1/NKfk+QutuLFsLXWUdkEJLvm0ca4flzjJ28snRnqVB6m2gLO5SXuVn+XAkzTSzLxQh 32RBfuc1y/aPd5vwRNHEOX3nXXT+aDbdR1LPEioUg4NMvKmV1w1u9MoH38wGSs6c3/74 Q0iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=MPm0/ozDXrtiuNsnL4meZydnDE31Iiejc/Zf5IteBUw=; fh=B4x1Ek+ZNqRGNVN42c+egrNkaaiT1prYFyO8HxDbYIg=; b=oPELquV2C2i7qDgmFo9R42gLczGCRgnWTMHcHauBAFHoO1dvbe/TYdua938tcAVsph HmrGtqM2qyWKCbxbkPXS0GijtvfucXYXojjG5QclSH/Nb65txR/OyxDuGv9Q4WxLgLv9 zEuNRTdDvafHZhWCKqKY1uy88IAzcL9YuTqSvIsLSBL10qgx0QNVtUAU0odjl+obrg7u forLgNcvzlZMibXlRE8cjkj/4ZDzEaeH0HrzqZNKil1BzawKVk04m+9o+qopxCChfeoh Nw0kjO8nzX4w7bOX4N1CfySEsztwmZNu8o533bZOxrauMwhdgISJXE8TuOupaKmEgYP/ h2vw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Nujxj16x; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVzgWl1932n4lcPWrwvXiPkhRcb+f7x4ISagLqRVL6Knt4+HOyqquruJLpIv7DDtp3ajZHwlq/E0v06miGgR4pEXsFe8A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y6-20020a17090aa40600b00298bc7257fasi103489pjp.27.2024.02.13.00.20.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 00:20:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Nujxj16x; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63087-ouuuleilei=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 25C99B23153 for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 08:19:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDBF224205; Tue, 13 Feb 2024 08:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Nujxj16x" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 86E95225AD for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 08:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707812233; cv=none; b=VMg/tx5mujkuEyVL2K5U2St+KY16H2XpxNKQ5/YROkC3kf/8Dt+8jte4ZjfFgCEz2nqj/SjZ/ubBSKwwbVAVchjhC/3HbkIBpXh+m+RpU7xOSoTF1wS2oYUfJ/At2NcH42V1J/VnkTcp7hhhVhexgNQ98Ou9dzAxMCzkZlrsRV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707812233; c=relaxed/simple; bh=9m5KGOCuoxEboIm7ISn1H7ymbfhZyzGAdsVPUFGEUFs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=czYvmR5Tn7KPD2brIEvZHLr7K1I/5m6+6bZz4ffvutxYsK92b4+valITZLQpFUYzb2mzm9H/7EmunlNEdYBGjL1eq8Vy0k9uaWqsHKZVI6JlTUVEGZzKnSlcmObQ8emhz1wGJtNXmD7HEgJ5RTV2SsGjQ2kC+oAEpDXIliaWMz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Nujxj16x; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from [127.0.1.1] (91-154-35-128.elisa-laajakaista.fi [91.154.35.128]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5678515C2; Tue, 13 Feb 2024 09:17:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707812225; bh=9m5KGOCuoxEboIm7ISn1H7ymbfhZyzGAdsVPUFGEUFs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Nujxj16x/71Mipo+7k7H6Vb52scs2D3vAx3kUESeoecn1+92JHEmcALH3XF+93qYm 5ygRBB6ivJ3U0qQrK0VrkyCCZ7WGYXgofo0Zn4Tu0kLwP76BQt1+lQBbJftyqLIlw9 H4fRLItjWH+lJE8LQgNuu6+An5CqbaGbl0fBhZFw= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Tue, 13 Feb 2024 10:16:37 +0200 Subject: [PATCH 2/2] drm/tidss: Fix sync-lost issue with two displays Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240213-tidss-fixes-v1-2-d709e8dfa505@ideasonboard.com> References: <20240213-tidss-fixes-v1-0-d709e8dfa505@ideasonboard.com> In-Reply-To: <20240213-tidss-fixes-v1-0-d709e8dfa505@ideasonboard.com> To: Jyri Sarha <jyri.sarha@iki.fi>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Sam Ravnborg <sam@ravnborg.org>, Devarsh Thakkar <devarsht@ti.com>, Aradhya Bhatia <a-bhatia1@ti.com>, Francesco Dolcini <francesco@dolcini.it> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2366; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=9m5KGOCuoxEboIm7ISn1H7ymbfhZyzGAdsVPUFGEUFs=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlyyV/PKaDqj8BU7nZv3kGkUVewpGZevzHN23SW 21DZri8+PGJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZcslfwAKCRD6PaqMvJYe 9URzEACrf0IrNFIbW2TM83jy0NHz052ksxO6HTVcgqRmRkG+cetyU72kmxhmeabSNtJ4ApQCT6L 9RC+qRxx+as4n/sbvTGHLzQhmcwvcZQoM3H6aGJRIijiDNAjg/EMS0oYoZuVDDgrBjrr4fm7aS3 XyK5qR8skhHz4WVi+iBXOhiWEgsXWUbyhyNxfUYFIHBvvglS0GgY6a8gBKSsWjvpN2k/+XWGkDH JypW3RqRa91dFbhMCDy1ButhP9eE4RUrhRI7lEAj0RUAZxXMp6bDj1cSUlPs3ZIlWMhQtgK2b/e vLncLDjlX4kfx00JHVHLHPenMq0yyMiz5XY5NDQdKD32af/2TLL44/V/xwRLogg6RN9jEZt8Cpn 3ZkaDFd8xDhk58bRA327qg2e5p3OPE2ipr5PETUMZ1QnN4wI8Lsq1Rhc/O6xIUoQOJldUNycGUz a7CFjKUKiQ21YA5y9kJ1j6w/dBNXAsq9LzmjtO82oRz5tHxXkRn3+tcsfyqVUXp99fs/x7ICpKh FMi//zkTr4MYqpWJw5Th2xqA8oXI21C85c6fu/JNUEU3m07r/8ClGL625lnIkSbtMSFJXKSpxHE 7HV9FCzJNQVIAInytwvwLgq76aj/d1wW9UtvWN4HX/4/EZtYOGVtp5BW1+QfRzIzdIkhqHyTQyA Bgr+FC6Vr1c+BOg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790771131001888492 X-GMAIL-MSGID: 1790771131001888492 |
Series |
drm/tidss: Fixes for zpos and multi-display
|
|
Commit Message
Tomi Valkeinen
Feb. 13, 2024, 8:16 a.m. UTC
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 <tomi.valkeinen@ideasonboard.com>
Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem")
---
drivers/gpu/drm/tidss/tidss_crtc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
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 <tomi.valkeinen@ideasonboard.com> > Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> > --- > 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, >
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,