From: Maxime Ripard <maxime@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> Subject: [PATCH 1/4] drm/vc4: hdmi: Replace hardcoded value by define Date: Thu, 26 Jan 2023 18:05:46 +0100 [thread overview] Message-ID: <20230126-rpi-display-fw-clk-cleanup-v1-1-d646ff6fb842@cerno.tech> (raw) In-Reply-To: <20230126-rpi-display-fw-clk-cleanup-v1-0-d646ff6fb842@cerno.tech> 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(-) 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); -- 2.39.1
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime@cerno.tech> To: Emma Anholt <emma@anholt.net>, Maxime Ripard <mripard@kernel.org>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: Maxime Ripard <maxime@cerno.tech>, dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de>, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] drm/vc4: hdmi: Replace hardcoded value by define Date: Thu, 26 Jan 2023 18:05:46 +0100 [thread overview] Message-ID: <20230126-rpi-display-fw-clk-cleanup-v1-1-d646ff6fb842@cerno.tech> (raw) In-Reply-To: <20230126-rpi-display-fw-clk-cleanup-v1-0-d646ff6fb842@cerno.tech> 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(-) 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); -- 2.39.1
next prev parent reply other threads:[~2023-01-26 17:10 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-26 17:05 [PATCH 0/4] drm/vc4: hdmi: Firmware clocks cleanup Maxime Ripard 2023-01-26 17:05 ` Maxime Ripard 2023-01-26 17:05 ` Maxime Ripard [this message] 2023-01-26 17:05 ` [PATCH 1/4] drm/vc4: hdmi: Replace hardcoded value by define Maxime Ripard 2023-02-13 12:43 ` Javier Martinez Canillas 2023-02-13 12:43 ` Javier Martinez Canillas 2023-01-26 17:05 ` [PATCH 2/4] drm/vc4: hdmi: Enable power domain before setting minimum Maxime Ripard 2023-01-26 17:05 ` Maxime Ripard 2023-02-13 12:59 ` Javier Martinez Canillas 2023-02-13 12:59 ` Javier Martinez Canillas 2023-01-26 17:05 ` [PATCH 3/4] Revert "drm/vc4: hdmi: Fix HSM clock too low on Pi4" Maxime Ripard 2023-01-26 17:05 ` Maxime Ripard 2023-02-13 13:04 ` Javier Martinez Canillas 2023-02-13 13:04 ` Javier Martinez Canillas 2023-01-26 17:05 ` [PATCH 4/4] Revert "drm/vc4: hdmi: Enforce the minimum rate at runtime_resume" Maxime Ripard 2023-01-26 17:05 ` Maxime Ripard 2023-02-13 13:05 ` Javier Martinez Canillas 2023-02-13 13:05 ` Javier Martinez Canillas 2023-02-16 9:27 ` [PATCH 0/4] drm/vc4: hdmi: Firmware clocks cleanup Maxime Ripard 2023-02-16 9:27 ` Maxime Ripard
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230126-rpi-display-fw-clk-cleanup-v1-1-d646ff6fb842@cerno.tech \ --to=maxime@cerno.tech \ --cc=airlied@gmail.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=emma@anholt.net \ --cc=linux-kernel@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.org \ --cc=tzimmermann@suse.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.