]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Apr 2025 10:47:41 +0000 (11:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Apr 2025 10:47:41 +0000 (11:47 +0100)
added patches:
drm-amd-display-check-denominator-crb_pipes-before-used.patch

queue-6.1/drm-amd-display-check-denominator-crb_pipes-before-used.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-amd-display-check-denominator-crb_pipes-before-used.patch b/queue-6.1/drm-amd-display-check-denominator-crb_pipes-before-used.patch
new file mode 100644 (file)
index 0000000..6465549
--- /dev/null
@@ -0,0 +1,37 @@
+From ea79068d4073bf303f8203f2625af7d9185a1bc6 Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@amd.com>
+Date: Tue, 18 Jun 2024 16:19:48 -0600
+Subject: drm/amd/display: Check denominator crb_pipes before used
+
+From: Alex Hung <alex.hung@amd.com>
+
+commit ea79068d4073bf303f8203f2625af7d9185a1bc6 upstream.
+
+[WHAT & HOW]
+A denominator cannot be 0, and is checked before used.
+
+This fixes 2 DIVIDE_BY_ZERO issues reported by Coverity.
+
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Jerry Zuo <jerry.zuo@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: Cliff Liu <donghua.liu@windriver.com>
+Signed-off-by: He Zhe <Zhe.He@windriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
+@@ -1772,7 +1772,7 @@ static int dcn315_populate_dml_pipes_fro
+                               bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
+                                               || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
+-                              if (remaining_det_segs > MIN_RESERVED_DET_SEGS)
++                              if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
+                                       pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
+                                                       (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
+                               if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
index 8760f0ac6df4dde64a4afc01d2240783dcc66745..58229fd1f1e340e01cf85ecfc58312c9f69a5fc7 100644 (file)
@@ -4,3 +4,4 @@ atm-fix-null-pointer-dereference.patch
 arm-9350-1-fault-implement-copy_from_kernel_nofault_allowed.patch
 arm-9351-1-fault-add-cut-here-line-for-prefetch-aborts.patch
 arm-remove-address-checking-for-mmuless-devices.patch
+drm-amd-display-check-denominator-crb_pipes-before-used.patch