]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates"
authorChristian Hewitt <christianshewitt@gmail.com>
Mon, 21 Apr 2025 20:12:59 +0000 (22:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:36:52 +0000 (14:36 +0200)
[ Upstream commit f37bb5486ea536c1d61df89feeaeff3f84f0b560 ]

This reverts commit bfbc68e.

The patch does permit the offending YUV420 @ 59.94 phy_freq and
vclk_freq mode to match in calculations. It also results in all
fractional rates being unavailable for use. This was unintended
and requires the patch to be reverted.

Fixes: bfbc68e4d869 ("drm/meson: vclk: fix calculation of 59.94 fractional rates")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250421201300.778955-2-martin.blumenstingl@googlemail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250421201300.778955-2-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/meson/meson_vclk.c

index 37127ba40aa97df6eb7313dfc95fce4a67f93828..0eb86943a35889e3afc9f786814cc89e07f4dcd5 100644 (file)
@@ -790,13 +790,13 @@ meson_vclk_vic_supported_freq(struct meson_drm *priv, unsigned int phy_freq,
                                 FREQ_1000_1001(params[i].pixel_freq));
                DRM_DEBUG_DRIVER("i = %d phy_freq = %d alt = %d\n",
                                 i, params[i].phy_freq,
-                                FREQ_1000_1001(params[i].phy_freq/1000)*1000);
+                                FREQ_1000_1001(params[i].phy_freq/10)*10);
                /* Match strict frequency */
                if (phy_freq == params[i].phy_freq &&
                    vclk_freq == params[i].vclk_freq)
                        return MODE_OK;
                /* Match 1000/1001 variant */
-               if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/1000)*1000) &&
+               if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/10)*10) &&
                    vclk_freq == FREQ_1000_1001(params[i].vclk_freq))
                        return MODE_OK;
        }
@@ -1070,7 +1070,7 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
 
        for (freq = 0 ; params[freq].pixel_freq ; ++freq) {
                if ((phy_freq == params[freq].phy_freq ||
-                    phy_freq == FREQ_1000_1001(params[freq].phy_freq/1000)*1000) &&
+                    phy_freq == FREQ_1000_1001(params[freq].phy_freq/10)*10) &&
                    (vclk_freq == params[freq].vclk_freq ||
                     vclk_freq == FREQ_1000_1001(params[freq].vclk_freq))) {
                        if (vclk_freq != params[freq].vclk_freq)