From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40105C6379D for ; Thu, 19 Nov 2020 14:32:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAF8B24199 for ; Thu, 19 Nov 2020 14:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbgKSOcW (ORCPT ); Thu, 19 Nov 2020 09:32:22 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:45415 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbgKSOcV (ORCPT ); Thu, 19 Nov 2020 09:32:21 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id D99435806F5; Thu, 19 Nov 2020 09:32:19 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 19 Nov 2020 09:32:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=fdeCJrw0Opv9LtMWbCk4M6wggdX HkukfGAaUbw2IQ6g=; b=t9NaJ2J/XhRdNuXdea/oz7750HrVqWDGUjgBdFH5X0Q TGh+KBJEGLBcjiibQRQpkDKdPHXnhB1TyBfw0WEoZLcjVM+A53oaLrgFApHO6EM8 N/3+KN0SUZZDoL+6AElNAxSul4scoP8mn4kleJz0xAThizx5L67x1GtOe8jnKBiG UeOmDm9ObaC5xILY6RoP8WT4Sd+zbBHIVOMCXZBIZwRIbvTahn1AbhEMMJE8XJ3H K4MQHdgUCzkQa448rUu3537SPw+Xx85cLBBaqQtBZxZmYSP2IptPX4i2pDSIp4HZ ZEsCOJDbjAt/yuCWXSNZPDcmybgcEKqXapYw58wG2WA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=fdeCJr w0Opv9LtMWbCk4M6wggdXHkukfGAaUbw2IQ6g=; b=U5bk7hAIdvzMZMWy+pxPIs r+O6qgO1DSb7SXgnQ+3bemtMPOB2ycmLIPFFPxMM1FDE8h0OeytslPREtQwoxHDh l6iDtcFSe+X5PQ7AM2rdou+9LtgCDMAebUxNwocC9AAigvOzwCk3B+y+JUEvlPhv U1e4QMLDqxLVsS4DZv3OxDp+LmibO18QUMT45+5vkbKDsMINgBvYg74IwJfq/004 C4CkrBOh1g9TA3pSgpH2/78DjGF4wQ/ckBptmxiBgeJS/U8xqQp+dD2OIJGdltIs /CVLBsxHYV7ESRp0e88Lvku+QTG8IKB+0gRtPXbf0B5yCrFW7TiqQznMyhN1e+eA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudefjedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D567A3280059; Thu, 19 Nov 2020 09:32:14 -0500 (EST) Date: Thu, 19 Nov 2020 15:32:13 +0100 From: Maxime Ripard To: Thomas Zimmermann Cc: Eric Anholt , Maarten Lankhorst , Daniel Vetter , David Airlie , Mark Rutland , Rob Herring , Frank Rowand , Hoegeun Kwon , Dave Stevenson , Phil Elwell , linux-rpi-kernel@lists.infradead.org, Tim Gover , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v3 7/7] drm/vc4: kms: Don't disable the muxing of an active CRTC Message-ID: <20201119143213.wqgvn2d3vphyeked@gilmour.lan> References: <20201105135656.383350-1-maxime@cerno.tech> <20201105135656.383350-8-maxime@cerno.tech> <2e61b179-35f3-f4b3-9ec0-c822370da663@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ywfvxmnqzpqjf2fz" Content-Disposition: inline In-Reply-To: <2e61b179-35f3-f4b3-9ec0-c822370da663@suse.de> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --ywfvxmnqzpqjf2fz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 19, 2020 at 10:12:43AM +0100, Thomas Zimmermann wrote: > Hi >=20 > Am 05.11.20 um 14:56 schrieb Maxime Ripard: > > The current HVS muxing code will consider the CRTCs in a given state to > > setup their muxing in the HVS, and disable the other CRTCs muxes. > >=20 > > However, it's valid to only update a single CRTC with a state, and in t= his > > situation we would mux out a CRTC that was enabled but left untouched by > > the new state. > >=20 > > Fix this by setting a flag on the CRTC state when the muxing has been > > changed, and only change the muxing configuration when that flag is the= re. > >=20 > > Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatic= ally") > > Reviewed-by: Hoegeun Kwon > > Tested-by: Hoegeun Kwon > > Signed-off-by: Maxime Ripard > > --- > > drivers/gpu/drm/vc4/vc4_drv.h | 1 + > > drivers/gpu/drm/vc4/vc4_kms.c | 82 ++++++++++++++++++++--------------- > > 2 files changed, 48 insertions(+), 35 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_dr= v.h > > index 014113823647..325b53ff11b3 100644 > > --- a/drivers/gpu/drm/vc4/vc4_drv.h > > +++ b/drivers/gpu/drm/vc4/vc4_drv.h > > @@ -524,6 +524,7 @@ struct vc4_crtc_state { > > struct drm_mm_node mm; > > bool feed_txp; > > bool txp_armed; > > + bool needs_muxing; >=20 > Maybe rather 'update_muxing'. >=20 > More generally, I'd separate fields that contain actual CRTC state, such > assigned_channel, from those that only contain transitional state during > update-commit, such as needs_muxing. How would you separate them? I'll use your other suggestions, thanks! Maxime --ywfvxmnqzpqjf2fz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX7aB7QAKCRDj7w1vZxhR xVTzAQCr+8IdXjnVaJWRPSPg5zJcI2nQ7fDeMLE8/dGK7/UOoAD/VPfcWb+Ve+pt QZWUFI5owJotbGGUDLCTNUcEWoYt/g0= =8pyD -----END PGP SIGNATURE----- --ywfvxmnqzpqjf2fz--