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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4CCDC433F5 for ; Fri, 25 Feb 2022 14:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241829AbiBYOgb (ORCPT ); Fri, 25 Feb 2022 09:36:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241824AbiBYOga (ORCPT ); Fri, 25 Feb 2022 09:36:30 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF3F1AE659 for ; Fri, 25 Feb 2022 06:35:58 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 174D05C0138; Fri, 25 Feb 2022 09:35:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 25 Feb 2022 09:35:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=uiveBeYnqGcqK+zu9ioOaNZW1ydXbC w+PmOS3Kp8raY=; b=BfsEUYpd4BiAiEIcB4Dt4XJil8q0OsRcLJhm6Vg3L2JuIE yDq0V3FY135nlLY9SbcTZ5tf+bhUbyjXIbj7BVW6jp6Cnu73unJ2RHLH64C3lWBz Tbhu/fBHeb/czU8aFh6bT5hztqLTiHzP97IKwHDou+8xhLP6hYLQq0sX/HXVOHoB fbnl8pPOiIPUL7g6hauKEX08pVSBMIvBxfdt1v20XlVgQTc0sKlhkG/ABjrm+eg9 6FO5sJyYJPsnFDqVjtdAHnc5sYTNiCyaDdOZoThz/eLXFZxcDYwo0dk99nEe4epw 5LaOF94MNeJePwn4uVbKw1fVzwIGSThzNlFLoigA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uiveBe YnqGcqK+zu9ioOaNZW1ydXbCw+PmOS3Kp8raY=; b=j4gb2U1+YOobIkUw1t/jHx EVQQzoJtMnp2owNYKBUmPWx7eCx4dJUs+4yhgKV/zFRnxDXAqQCNyeorWEIPBlFn TEFcjUjq+Xcf8Jo9/2vO+eKKUPtL8oXlM5jRJb0jMBQnPWSPILSIBtn+7GdwEcdl kxScdxHSrf98qAHJzzuqAPkd/RoAJGDv0v+0IBkX6JEB+dkMlCf9+dTPgHm38Jq1 vV7gaIZTKq1YILNpGcPJZ++Ds4e/imWr3Nyf1xDSJc90xl2DDNhAUkF2tvq+Cjng DvBab47l/UVWXGVvCF0WH1WjniiMHiTYgQYtZGOKOUmX8REbVEiQigfhtKdutNmQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeggdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Feb 2022 09:35:57 -0500 (EST) From: Maxime Ripard To: Mike Turquette , Stephen Boyd Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, Maxime Ripard Subject: [PATCH v7 11/12] drm/vc4: Add logging and comments Date: Fri, 25 Feb 2022 15:35:33 +0100 Message-Id: <20220225143534.405820-12-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220225143534.405820-1-maxime@cerno.tech> References: <20220225143534.405820-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The HVS core clock isn't really obvious, so let's add a bunch more comments and some logging for easier debugging. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 24de29bc1cda..6fe03fc17d73 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -389,8 +389,15 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state) 500000000, new_hvs_state->core_clock_rate); + drm_dbg(dev, "Raising the core clock at %lu Hz\n", core_rate); + + /* + * Do a temporary request on the core clock during the + * modeset. + */ clk_set_min_rate(hvs->core_clk, core_rate); } + drm_atomic_helper_commit_modeset_disables(dev, state); vc4_ctm_commit(vc4, state); @@ -416,6 +423,10 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state) drm_dbg(dev, "Running the core clock at %lu Hz\n", new_hvs_state->core_clock_rate); + /* + * Request a clock rate based on the current HVS + * requirements. + */ clk_set_min_rate(hvs->core_clk, new_hvs_state->core_clock_rate); } } -- 2.35.1