]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2024 10:03:02 +0000 (12:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2024 10:03:02 +0000 (12:03 +0200)
added patches:
drm-amd-display-round-calculated-vtotal.patch

queue-5.4/drm-amd-display-round-calculated-vtotal.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/drm-amd-display-round-calculated-vtotal.patch b/queue-5.4/drm-amd-display-round-calculated-vtotal.patch
new file mode 100644 (file)
index 0000000..63051d0
--- /dev/null
@@ -0,0 +1,37 @@
+From c03fca619fc687338a3b6511fdbed94096abdf79 Mon Sep 17 00:00:00 2001
+From: Robin Chen <robin.chen@amd.com>
+Date: Fri, 23 Aug 2024 15:00:28 +0800
+Subject: drm/amd/display: Round calculated vtotal
+
+From: Robin Chen <robin.chen@amd.com>
+
+commit c03fca619fc687338a3b6511fdbed94096abdf79 upstream.
+
+[WHY]
+The calculated vtotal may has 1 line deviation. To get precisely
+vtotal number, round the vtotal result.
+
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Anthony Koo <anthony.koo@amd.com>
+Signed-off-by: Robin Chen <robin.chen@amd.com>
+Signed-off-by: Alex Hung <alex.hung@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/modules/freesync/freesync.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
++++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+@@ -131,7 +131,7 @@ static unsigned int calc_v_total_from_re
+       v_total = div64_u64(div64_u64(((unsigned long long)(
+                       frame_duration_in_ns) * (stream->timing.pix_clk_100hz / 10)),
+-                      stream->timing.h_total), 1000000);
++                      stream->timing.h_total) + 500000, 1000000);
+       /* v_total cannot be less than nominal */
+       if (v_total < stream->timing.v_total) {
index 0b8c1b8f5738ac565807762df60fcffd1fb87542..e83b89a74fa47245fd1784e8c4676438e7079adc 100644 (file)
@@ -145,3 +145,4 @@ netfilter-ctnetlink-compile-ctnetlink_label_size-wit.patch
 crypto-aead-cipher-zeroize-key-buffer-after-use.patch
 remove-.orig-pattern-from-.gitignore.patch
 soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch
+drm-amd-display-round-calculated-vtotal.patch