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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE2C3C433EF for ; Mon, 15 Nov 2021 11:31:28 +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 3A48E61C32 for ; Mon, 15 Nov 2021 11:31:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3A48E61C32 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FB246E899; Mon, 15 Nov 2021 11:31:22 +0000 (UTC) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE66A6E899 for ; Mon, 15 Nov 2021 11:31:20 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 070642B0117B; Mon, 15 Nov 2021 06:31:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 15 Nov 2021 06:31:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=bRug0ICmI+Wdt 0kBZwW8x1INoKSiQQc5SfE6Hgm8vw4=; b=b8+KrE7JDGvZbn35Nw2pUQuwN0Wlv ZzAjsoA+WqkuQ+jNiTmYL7bfzrUwU5lYly72s+fedF9o108FSj2TwOK4+0R2QCUb 4VOmJVLU2Ao9N7rvazGOK0UiNfH97+2bCk9I8SXfSfTf4UrFWJnxuqOB/4k/X7mh rzKV7y9ezQolKdnIoWyUM9LBi/Eu7StjWftil+qbZtfP3ax/9FpzFwcFL/q/vPOh BDxrAO9XdwiQlIOWImTDfAB8qyvrYnXy1sl7kdEUl11+0zLo7RfozMQpYC6J5F/O /3l5+/NXQ9PUxWauP8CFZa6NE28MPeIhKEJPnAHnmnky8EOlzXSgxTPJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=bRug0ICmI+Wdt0kBZwW8x1INoKSiQQc5SfE6Hgm8vw4=; b=ii54UgO4 ztIxopMvYCl6AQ/3Zbgbu6Rmq+XYpnShNQYTpYvzKFkWRztL4j45j5XGOaEIPS5h u0ydWpr5Y273gCQ7aF60fOS6YlLySepti6crPHl6lPrtcYOhTipXHx+ZlMLmULmy dS7jl2BoU0rZWzL0/sinLtCtEaWFXApCbZX7Jl/tEsJGkMG2UaXaTdm7JwtpE7lK /PBG9U5oNuZc4LCEToerhW/cjckxQFab/00yhYnsDLLv1yzTEuPR8k4VtZb9UIjH QY7A90m6BPtIVJgHwtUTa8Tl78M0YnPXjG18rUZ2wsi1P20ZsLSKcRn0PNSJERQ3 Hjz/GINLXZoy8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfedtgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Nov 2021 06:31:19 -0500 (EST) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH 3/6] drm/vc4: kms: Add missing drm_crtc_commit_put Date: Mon, 15 Nov 2021 12:31:02 +0100 Message-Id: <20211115113105.103275-4-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115113105.103275-1-maxime@cerno.tech> References: <20211115113105.103275-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Dom Cobley , Tim Gover , Dave Stevenson , Jian-Hong Pan , dri-devel@lists.freedesktop.org, Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit 9ec03d7f1ed3 ("drm/vc4: kms: Wait on previous FIFO users before a commit") introduced a global state for the HVS, with each FIFO storing the current CRTC commit so that we can properly synchronize commits. However, the refcounting was off and we thus ended up leaking the drm_crtc_commit structure every commit. Add a drm_crtc_commit_put to prevent the leakage. Fixes: 9ec03d7f1ed3 ("drm/vc4: kms: Wait on previous FIFO users before a commit") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 3f780c195749..4847d1af399a 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -372,6 +372,8 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state) ret = drm_crtc_commit_wait(old_hvs_state->fifo_state[channel].pending_commit); if (ret) drm_err(dev, "Timed out waiting for commit\n"); + + drm_crtc_commit_put(commit); } if (vc4->hvs->hvs5) -- 2.33.1