From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FE883EEAEF for ; Wed, 20 May 2026 14:44:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779288291; cv=none; b=sa4IPPq/Ifw2RDxeTxk2+W3+M8R7wA5O6cR4eNFT5zlZs+bpmK6cKBafjN8wmCzEiEauvlD8pxh/zRhk9xm9XhvyCvU2qNee3tc2s3RXStJdmB1ejIo1xVpTpKDbEsEZ1zQYOW+ct9bwUeolR7+rVpr/LxF1wLwUtQ5HztzZmww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779288291; c=relaxed/simple; bh=BWDgrp7aESrJNyeD2w8fhppTlyybn0tSzOuGHnaXICo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XE9Qd1nndOTPCku3jKndD4+c2zeDuj6L+QP3+yp4PGrPAPLOIN3E82plgKP5+o/EciyMUvAZa7lhPiqVimnU+A42p8cSrZ/KQ1YbxdrbwHFvhf0dikCZkDGQzEyU5HZp+7uDlriIkqts1G2yq7hDDtpWrWiQKP1GqDbKJo8OmqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D6uB3Syz; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=kxVHOUbU; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D6uB3Syz"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="kxVHOUbU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779288289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cJ50i4VAT7koucsYp09rCZ4i+eT1/vUOKhdV9aKMINU=; b=D6uB3SyzhBAjOZFJceDKM9+U5n8oH295wUZqHz4dlr2doj7YDy31UspPpLnqvU1oy9xh2Z PoSjNJs9ekdQVF+KGuIWw9v1swbDJoemKU0Mml0bGutR2wMoB0cVoligp4WnIbaGX186Fq +/iaDidQdaEi78D2eEIUwSof+agImdQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-Sii0P4ycPyqlDerKo-12VA-1; Wed, 20 May 2026 10:44:43 -0400 X-MC-Unique: Sii0P4ycPyqlDerKo-12VA-1 X-Mimecast-MFC-AGG-ID: Sii0P4ycPyqlDerKo-12VA_1779288282 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-48fda34ed0aso19705815e9.1 for ; Wed, 20 May 2026 07:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779288281; x=1779893081; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cJ50i4VAT7koucsYp09rCZ4i+eT1/vUOKhdV9aKMINU=; b=kxVHOUbUGNbTehA86nfSeQTBNskrbrJmJ0B58lnUdZ6va+pxpGRW3k4/B6+dVTQAZo Xhzx7kKTrDTXhX/B/v4f0cHx0A8oHmDMJlk6v3QgnQHRBDGIxGLBWVM+ZIT0qQDegvOo dj2BqQkDx3gUwud1lqGRICEe1Ja70hqON+zTzUFVF9Ed7MO/Jz57a+F1JCfTmp84Azbc fMwnx49UdfLytOEQSlGD2jPhGKnKPWXWwdaU1D9JAstR0WPwWB9zmBZ9Y3YzEgp5ZWhb MRALira8R+3t6uhxMwEb6IVyq3xQBWHny4DdDB9/ABTDcWj6dUNiMoA0DipH9uuDNc25 wzgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779288281; x=1779893081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cJ50i4VAT7koucsYp09rCZ4i+eT1/vUOKhdV9aKMINU=; b=QkMJPNci3Xna2bFIv+ZrNzsBOL9F7TxbQR0ZcNlHrAad/Db3W7veMWDgVLhQisYo1e QR39VQNJtvU16bPBagkUe3jKQUMieBiBjadpUCzna7AIbidxMa2gVv7CQfMVGWwJw5cW QXumENFl6786tHzH98LAcnawMZeJGyq6moGRQlWElUZW5yk/Y45vWgHbgo2euZLjahLK v4MrRjBBw9VLYNhT18wByI4Rs0fOr+Oj7RyervrHynbV4Se8F38R8N+Muqk4dGBZZapB UNL2WaKu7QZyD+J373ryTuzO80ctaKfOBjeAW+8dyMA+BS6bhq8gfkd5ZlGRQqXzjF73 qg4g== X-Gm-Message-State: AOJu0Yw4krVQbwR2SeLiyRnJPcEkuoxw9Xl4klrDUnpX/PRoUBdeOB4g dvpjGbn3AN8OJMss6NZ+NNUx1rki8HPYKm2Z4Znw0zHAonsAzQuSEfNaamPotUfSce7wD5+CMPq a/pqPYsd5vDScOX+VmUL14cFGa4BK4okhgYJvTI9Quikr+KJZ39D+JFs0ARkFzYkjdNvRQxj1Cy YQqbzFN3CVqIILaK+W6lVZlyusAAifjn/AVr3f2GG/ZZ3SSme1 X-Gm-Gg: Acq92OEI6kGWNv7dkN33HHjttfaWxst9hk0oJubfq0Q/4ecGhKN7CsxL7dVFO3n/mKV WrOgeRNhhjyyuz1Z65bvpNV6QayymteYrhgdhKYZb7KgU4mCLcHvjfqkW4DqGodEl/o8gN6tV49 KwTCnVJyGdKoI0YrUfHmD//8YPpGvwWDKT+/R1EGDpQ6jXWxPhvdSrXbqHSD3+2d97N6OM7Ss3C AnXEtO2MGug9K3o2BCd4NkiavB0j/sKCFjGFvX9Dfyp+6F5lY71Nwh+dwwbwhCgm57i98s+uAQe Dl91wGS/ybIi+HfR9XtZBzeiW2bwphVDVb2lxErDVsCrAWI0FXkbL5kdxmG31Z3//r2bSnoYOPl Mz9QrtwCeCSrm39h4g9sDsqTJC+3oOPl72UUcwxAP3oJXJZo= X-Received: by 2002:a05:600c:a30a:b0:48a:568f:ae8a with SMTP id 5b1f17b1804b1-48fe5fda35fmr290659195e9.8.1779288281137; Wed, 20 May 2026 07:44:41 -0700 (PDT) X-Received: by 2002:a05:600c:a30a:b0:48a:568f:ae8a with SMTP id 5b1f17b1804b1-48fe5fda35fmr290658585e9.8.1779288280584; Wed, 20 May 2026 07:44:40 -0700 (PDT) Received: from localhost (62-151-111-63.jazzfree.ya.com. [62.151.111.63]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe57944c1sm439641105e9.7.2026.05.20.07.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 07:44:39 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Maxime Ripard , Alain Volmat , David Airlie , Maarten Lankhorst , Raphael Gallais-Pou , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v2 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Date: Wed, 20 May 2026 16:43:41 +0200 Message-ID: <20260520144424.1633354-6-javierm@redhat.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520144424.1633354-1-javierm@redhat.com> References: <20260520144424.1633354-1-javierm@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace the 340000000 and 165000000 magic numbers with the shared constants defined in the header. Suggested-by: Maxime Ripard Signed-off-by: Javier Martinez Canillas --- (no changes since v1) drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c index d25ecd4f4b67..4fe0c54a096f 100644 --- a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c +++ b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c @@ -4,6 +4,8 @@ * Author: Vincent Abriou for STMicroelectronics. */ +#include + #include #include "sti_hdmi_tx3g4c28phy.h" @@ -102,7 +104,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi) tmdsck = ckpxpll; pllctrl |= 40 << PLL_CFG_NDIV_SHIFT; - if (tmdsck > 340000000) { + if (tmdsck > HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ) { DRM_ERROR("output TMDS clock (%d) out of range\n", tmdsck); goto err; } @@ -135,7 +137,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi) HDMI_SRZ_CFG_EN_BIASRES_DETECTION | HDMI_SRZ_CFG_EN_SINK_TERM_DETECTION); - if (tmdsck > 165000000) + if (tmdsck > HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ) val |= HDMI_SRZ_CFG_EN_SRC_TERMINATION; /* -- 2.54.0