From patchwork Fri Nov 20 14:42:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 11923335 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E4E4EC56202 for ; Sat, 21 Nov 2020 11:35:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A68AB20B1F for ; Sat, 21 Nov 2020 11:35:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A68AB20B1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7DB96E9A2; Sat, 21 Nov 2020 11:35:22 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75B046E8C3 for ; Fri, 20 Nov 2020 14:42:52 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 2A53A580138; Fri, 20 Nov 2020 09:42:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 20 Nov 2020 09:42:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:content-type:mime-version :content-transfer-encoding; s=fm1; bh=Bo7KYS9fpAd1Zw2XHHokXqO42Y l7WpYwHsAC3B4IDWE=; b=lL6PmvybpSvpUcmz0vXvR21DfOSBlNIBL4u3gmvn1y Ozmuo6gLdUjsWX+Huz2JWinWIIuJAmyQuShnzKeodjvP1uxl/8SAVk8u02uxLXJh uDKSY8oXKNX+lEgFWyKw3En0Y/XwweFwnEyD/e7t9PgqidLxw76wXRlOAk4qf8nB xGsa4mMxydXOHPZa974ydxWSst5E+JTQDus7hPvFJLzs8m0jK5WO/Gkr6voglgjA v3tVKqOVB3pxG1+6LdvkPp+Uj8t46Gy64755OsQrCIycDk8qzlwmMvta3mwMWKkQ E/2qvBp9BfFKHptorIGxP+4UUx/SdALWVDOIV1jlAFoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Bo7KYS 9fpAd1Zw2XHHokXqO42Yl7WpYwHsAC3B4IDWE=; b=Om0ef64BGYatTYRNn50C8D M/OztkBBzqEOa+z0k4/HsylgpMEOv8hadEItazlxekO1SiQr5tUdH2ovggpAIxGI LIvGbPiZrrs4fiGwK27jmwPHsBWutBsiHUntkiEsYhgKvR9DGyLxGLX08Gpb5OG/ O/QN8o7ZDeoOKXisDhbw+dE/tTf11qpa7TVfJPIvwz7CVAMDJu2nbFA9bKCinD+e YR8kP5H/kivTVyibHg5YledTYAB68T5s7NQoAyTRnwS2pwoFWwlBuOrkbWe8g2st BgKrm2cMthEi7fwAsSNI1Dj6ElaqtmkTh0LmS9N60TZvEONQQoLZqneH66QgcEhQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudegtddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffotggggfesthhqredtredtjeenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeetieekgfffkeegkeeltdehudetteejgfekueevhffhteegudfgkedtueegfffg feenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh 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 0A41D328005E; Fri, 20 Nov 2020 09:42:46 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH v4 0/2] drm/vc4: Rework the HVS muxing code Date: Fri, 20 Nov 2020 15:42:43 +0100 Message-Id: <20201120144245.398711-1-maxime@cerno.tech> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 21 Nov 2020 11:34:30 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , dri-devel@lists.freedesktop.org, Hoegeun Kwon , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Here's a second attempt at fixing the current issues we have with the muxing code that results in a PV muxing its HVS muxing when only another CRTC is modified by a state, or vblank timeouts when trying to wait for a vblank on a single CRTC while another one is inactive but enabled. Let me know what you think, Maxime Changes from v3: - Pulled some patches from the atomic_helper_commit series that reorder / cleanup some code added here - s/needs_muxing/update_muxing/, and some cleanups suggested by Thomas - Removed the patches already applied Changes from v1: - Dropped the code trying to access all the CRTCs (whether in the state or not) state - Added Hoegeun Kwon's tags - Fixed a build bisection error - Cleaned up the private state using drmm_add_action_or_reset - Rebased on current linux next Maxime Ripard (2): drm/vc4: kms: Store the unassigned channel list in the state drm/vc4: kms: Don't disable the muxing of an active CRTC drivers/gpu/drm/vc4/vc4_drv.h | 4 + drivers/gpu/drm/vc4/vc4_kms.c | 199 ++++++++++++++++++++++++---------- 2 files changed, 146 insertions(+), 57 deletions(-)