Patch "drm/meson: vclk: fix calculation of 59.94 fractional rates" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/meson: vclk: fix calculation of 59.94 fractional rates

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-meson-vclk-fix-calculation-of-59.94-fractional-r.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ffc19173a6c7c99fd215e646d2301a27491f3baa
Author: Christian Hewitt <christianshewitt@xxxxxxxxx>
Date:   Tue Jan 9 23:07:04 2024 +0000

    drm/meson: vclk: fix calculation of 59.94 fractional rates
    
    [ Upstream commit bfbc68e4d8695497f858a45a142665e22a512ea3 ]
    
    Playing 4K media with 59.94 fractional rate (typically VP9) causes the screen to lose
    sync with the following error reported in the system log:
    
    [   89.610280] Fatal Error, invalid HDMI vclk freq 593406
    
    Modetest shows the following:
    
    3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: xxxx, xxxx,
    drm calculated value -------------------------------------^
    
    Change the fractional rate calculation to stop DIV_ROUND_CLOSEST rounding down which
    results in vclk freq failing to match correctly.
    
    Fixes: e5fab2ec9ca4 ("drm/meson: vclk: add support for YUV420 setup")
    Signed-off-by: Christian Hewitt <christianshewitt@xxxxxxxxx>
    Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240109230704.4120561-1-christianshewitt@xxxxxxxxx
    Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240109230704.4120561-1-christianshewitt@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c
index 2a82119eb58ed..2a942dc6a6dc2 100644
--- a/drivers/gpu/drm/meson/meson_vclk.c
+++ b/drivers/gpu/drm/meson/meson_vclk.c
@@ -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/10)*10);
+				 FREQ_1000_1001(params[i].phy_freq/1000)*1000);
 		/* 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/10)*10) &&
+		if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/1000)*1000) &&
 		    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/10)*10) &&
+		     phy_freq == FREQ_1000_1001(params[freq].phy_freq/1000)*1000) &&
 		    (vclk_freq == params[freq].vclk_freq ||
 		     vclk_freq == FREQ_1000_1001(params[freq].vclk_freq))) {
 			if (vclk_freq != params[freq].vclk_freq)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux