Message ID | 20230126-rpi-display-fw-clk-cleanup-v1-1-d646ff6fb842@cerno.tech |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384377wrn; Thu, 26 Jan 2023 09:10:44 -0800 (PST) X-Google-Smtp-Source: AK7set9N14wcEBE9ih3sAjHh4QX66h+3h5BWFKN/xBebgYXQlpAo65HoOpV9oPjVTzfyqMqpz51m X-Received: by 2002:a17:90b:17c2:b0:22b:fd64:c48e with SMTP id me2-20020a17090b17c200b0022bfd64c48emr8774721pjb.14.1674753043876; Thu, 26 Jan 2023 09:10:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674753043; cv=none; d=google.com; s=arc-20160816; b=D5GDgw3/0MZIJ4+R0UCXPYjPyKMvT+/duePDX6yOL0iLy0epBh/4Xf68cqK7CxQ1hb D9L7Yo9PfKDrv5p4aW2bZK2JRhXtu9B8Zgoe1zCLhhboKKqrGE8tHJieQzbIbjTJIV2O NWY2CcuTywih9r/s8hHzsHCIhe2T61onJ8tN2SIIzzttw++1Ly61HDAOP6k9MrhtOjsM a21JZWKgN1MBBjoalK9G7+FbBpA5JJW2PUgXqnzwxnzADBfLOs+BJQtNcQ9TEmmECGsM vdF3dI38tyzWgtTm8RmSgF99I6aKt8Xs90DTuz9cGQ31xg0E7ynMDqljrMEa090Ls6yu DokQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :feedback-id:dkim-signature:dkim-signature; bh=8suY9sieWgtDXWyPn8u/nfHNi/hMsHiTv3FkopfWKNo=; b=lmo6z01rPa55YxUxWemSMPvarRHu5t7tQo2zo+CXPzEoctXu0wrEGL4ZpjzVtx33Jh B7yU1IoMtMiyJwyk1GYqngdqAM2lEvS/so+9a7f/QTsvmUCg2+t+jXqXr6yINeSzIkmv 49Mt3tFy1PxU6LFZFavytNl4IykDsKybtAI/fFnmHp/DjD+Xj63d0DlFjr9beOXXCIN2 fcjB6LVMvdyBjPxU759V5OOkLluyzCdfbrkG3375pIB5x1xorKRR7exMUd0yPcTqdJvh mumJMsdSflf4CC8DdQNuJ3rKznoYPOOUNPgRC6N2KIFUuau+8m1hECMKN+CCEa34My68 l1VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=dUKWNlAy; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hwYEt41y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a17090a558c00b002294c989fafsi5615527pji.52.2023.01.26.09.10.31; Thu, 26 Jan 2023 09:10:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=dUKWNlAy; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hwYEt41y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjAZRKC (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Thu, 26 Jan 2023 12:10:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232426AbjAZRJw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Jan 2023 12:09:52 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD2776BE for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 09:09:51 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AF9605C0446; Thu, 26 Jan 2023 12:09:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 26 Jan 2023 12:09:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1674752990; x= 1674839390; bh=8suY9sieWgtDXWyPn8u/nfHNi/hMsHiTv3FkopfWKNo=; b=d UKWNlAyDqdQbnSqiaN5A8uIwzd2zIm0QTtvJqrco8xWF6qB0tPZ0tQavtX9yH4WW KUmNdH74Xr7bvXrwD3wGvw8uSDPol3LFSgSTn6WitNVmPHzG19iL2RCuxgWxbzbD 5LswMBlYXLUY+WmzixIjtlSSlQTKq7+ddD7wLbYylIyQ3waqvT11OCExe0q91lA+ Hycm+haDk7yOTuUwEORP6QrZvVMnaAh+ZgrkCvggaLwQPW2l919B8DECmhMAYCi6 jLsf4Qh//mmTO8+5yvWpzfXy5i94Za7OvegOwnInwXRR/hYE9x01sI//lOu7Ci2M MpOqJ15+loA44Zhk/xucA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id: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=fm3; t=1674752990; x= 1674839390; bh=8suY9sieWgtDXWyPn8u/nfHNi/hMsHiTv3FkopfWKNo=; b=h wYEt41yvJORumJL5Kp2VMSQLZqz7KDzKE8V2y8GBr2YC5SLvrZdeP9lRAAy5QcyB 6yoj5Us121qX452KhmtuGxDLjIQsxhTKTou3gQpggl5wU0+M9ZL2cZmcQz2891Fq fWS+pZ0ueQ/b6p7mcD5gnfL1dbMTTSoBQi8T6bxSzMwghil5EkoyoDgg2a8O504g qLYwc983KuLum4YkS0BTFIhZHPnGbNKqR/fiHMU8F+41xr4SUTm9PcJVYTAKThnC f42/Ibe7vK1mRV9ZfYKQGUc/H8knRtLWLrxYJoHLfXYKGaBv46MhKjl6uANvPABd ScrnzOVRukjMFzPnahjQw== X-ME-Sender: <xms:3bPSY3JYVZGfigVViYxWlGmXK1AmOHlYrzhoUyFn5jKvy-5a7ttDNQ> <xme:3bPSY7Iw2zvzG73kBUbzMwJPNOXN8gp2x_14hA4gZOvB2ZE6JZJiINj937cHQyl80 2Pwp1UcEKPMXyBLvwo> X-ME-Received: <xmr:3bPSY_v_i6Gq2jxJEfnnToMg0VUe3Jt9x7lb7Wt_ppnrS4iuHo22WaB2mHojyoqYJT-F1VAJyY9s0l1lP2yCNm2xLDupa93WYmEicyXUWRkLTw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvgedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepvedvleeijeegvdekffehkeehieelhfeggfffheetkeeuledvtdeuffeh teeltdffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: <xmx:3rPSYwbs3np_WpIIfysSMArx8JUltGj2FG9G9TVHyiWsYy7A-0so7g> <xmx:3rPSY-amw57pbz38k6A-TkeG5nPiZGf7TO_Zy906iN2L2mAuWl5cRA> <xmx:3rPSY0BQLzIU2ta42ynoWneHjeuhc2WNHzRloyUMm1Oc3Sz5jq6JnQ> <xmx:3rPSY-KMlP34Jp8gtpyQ1Wm_IFv6NVj5YvM0LIenOxy3bFyNgRUFAw> Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Jan 2023 12:09:49 -0500 (EST) From: Maxime Ripard <maxime@cerno.tech> Date: Thu, 26 Jan 2023 18:05:46 +0100 Subject: [PATCH 1/4] drm/vc4: hdmi: Replace hardcoded value by define MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230126-rpi-display-fw-clk-cleanup-v1-1-d646ff6fb842@cerno.tech> References: <20230126-rpi-display-fw-clk-cleanup-v1-0-d646ff6fb842@cerno.tech> In-Reply-To: <20230126-rpi-display-fw-clk-cleanup-v1-0-d646ff6fb842@cerno.tech> To: Emma Anholt <emma@anholt.net>, Maxime Ripard <mripard@kernel.org>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Maxime Ripard <maxime@cerno.tech> X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1066; i=maxime@cerno.tech; h=from:subject:message-id; bh=0qIZDkNiRrqLNfFTmO5XDGD2w7YMondxv9DscAkZRD4=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMmXNn3cKH4+7eYavcXG15VEY+d2NH65fc/t7paYNSocv3O0 I7VvdZSyMIhxMciKKbLECJsviTs163UnG988mDmsTCBDGLg4BWAiynYM/9Orfxn6M/0Ol0o5Xtuw6P CutK2b9PY6368riYuTjj+s+5PhnyWX/rPu97qF1rvEjJxyrxuKn35y8UGX54LwTVXZp3jFWAE= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756105847484597770?= X-GMAIL-MSGID: =?utf-8?q?1756105847484597770?= |
Series | drm/vc4: hdmi: Firmware clocks cleanup | |
Commit Message
Maxime Ripard
Jan. 26, 2023, 5:05 p.m. UTC
The 120MHz value hardcoded in the call to max_t to compute the HSM rate
is defined in the driver as HSM_MIN_CLOCK_FREQ, let's switch to it so
that it's more readable.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 1/26/23 18:05, Maxime Ripard wrote: > The 120MHz value hardcoded in the call to max_t to compute the HSM rate > is defined in the driver as HSM_MIN_CLOCK_FREQ, let's switch to it so > that it's more readable. > > Signed-off-by: Maxime Ripard <maxime@cerno.tech> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 14628864487a..98fa306dbd24 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1482,7 +1482,9 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, * Additionally, the AXI clock needs to be at least 25% of * pixel clock, but HSM ends up being the limiting factor. */ - hsm_rate = max_t(unsigned long, 120000000, (tmds_char_rate / 100) * 101); + hsm_rate = max_t(unsigned long, + HSM_MIN_CLOCK_FREQ, + (tmds_char_rate / 100) * 101); ret = clk_set_min_rate(vc4_hdmi->hsm_clock, hsm_rate); if (ret) { DRM_ERROR("Failed to set HSM clock rate: %d\n", ret);