]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jul 2023 07:35:43 +0000 (08:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jul 2023 07:35:43 +0000 (08:35 +0100)
added patches:
drm-amd-display-ensure-vmin-and-vmax-adjust-for-dce.patch
gup-avoid-stack-expansion-warning-for-known-good-case.patch

queue-6.1/drm-amd-display-ensure-vmin-and-vmax-adjust-for-dce.patch [new file with mode: 0644]
queue-6.1/gup-avoid-stack-expansion-warning-for-known-good-case.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-amd-display-ensure-vmin-and-vmax-adjust-for-dce.patch b/queue-6.1/drm-amd-display-ensure-vmin-and-vmax-adjust-for-dce.patch
new file mode 100644 (file)
index 0000000..69b87f7
--- /dev/null
@@ -0,0 +1,43 @@
+From 2820433be2a33beb44b13b367e155cf221f29610 Mon Sep 17 00:00:00 2001
+From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
+Date: Fri, 24 Feb 2023 11:35:43 -0700
+Subject: drm/amd/display: Ensure vmin and vmax adjust for DCE
+
+From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
+
+commit 2820433be2a33beb44b13b367e155cf221f29610 upstream.
+
+[Why & How]
+In the commit 32953485c558 ("drm/amd/display: Do not update DRR while
+BW optimizations pending"), a modification was added to avoid adjusting
+DRR if optimized bandwidth is set. This change was only intended for
+DCN, but one part of the patch changed the code path for DCE devices and
+caused regressions to the kms_vrr test. To address this problem, this
+commit adds a modification in which dc_stream_adjust_vmin_vmax will be
+fully executed in DCE devices.
+
+Fixes: 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending")
+Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
+Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
+Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@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/dc/core/dc.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -405,8 +405,9 @@ bool dc_stream_adjust_vmin_vmax(struct d
+        * Don't adjust DRR while there's bandwidth optimizations pending to
+        * avoid conflicting with firmware updates.
+        */
+-      if (dc->optimized_required || dc->wm_optimized_required)
+-              return false;
++      if (dc->ctx->dce_version > DCE_VERSION_MAX)
++              if (dc->optimized_required || dc->wm_optimized_required)
++                      return false;
+       stream->adjust.v_total_max = adjust->v_total_max;
+       stream->adjust.v_total_mid = adjust->v_total_mid;
diff --git a/queue-6.1/gup-avoid-stack-expansion-warning-for-known-good-case.patch b/queue-6.1/gup-avoid-stack-expansion-warning-for-known-good-case.patch
new file mode 100644 (file)
index 0000000..7f83903
--- /dev/null
@@ -0,0 +1,45 @@
+From eee9c708cc89b4600c6e6cdda5bc2b8b4dad96cb Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Thu, 29 Jun 2023 12:36:47 -0700
+Subject: gup: avoid stack expansion warning for known-good case
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit eee9c708cc89b4600c6e6cdda5bc2b8b4dad96cb upstream.
+
+In commit a425ac5365f6 ("gup: add warning if some caller would seem to
+want stack expansion") I added a temporary warning to catch any strange
+GUP users that would be impacted by the fact that GUP no longer extends
+the stack.
+
+But it turns out that the warning is most easily triggered through
+__access_remote_vm(), that already knows to expand the stack - it just
+does it *after* calling GUP.  So the warning is easy to trigger by just
+running gdb (or similar) and accessing things remotely under the stack.
+
+This just adds a temporary extra "expand stack early" to avoid the
+warning for the already converted case - not because the warning is bad,
+but because getting the warning for this known good case would then hide
+any subsequent warnings for any actually interesting cases.
+
+Let's try to remember to revert this change when we remove the warnings.
+
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/memory.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/mm/memory.c
++++ b/mm/memory.c
+@@ -5656,6 +5656,10 @@ int __access_remote_vm(struct mm_struct
+                       return 0;
+       }
++      /* Avoid triggering the temporary warning in __get_user_pages */
++      if (!vma_lookup(mm, addr) && !expand_stack(mm, addr))
++              return 0;
++
+       /* ignore errors, just check how much was successfully transferred */
+       while (len) {
+               int bytes, ret, offset;
index ded09443177daf5c16d9de5478b8ee8d78a1b6a1..59f350d086924925a36abcaf77e17123952a0e38 100644 (file)
@@ -9,3 +9,5 @@ perf-symbols-symbol-lookup-with-kcore-can-fail-if-multiple-segments-match-stext.
 scripts-tags.sh-resolve-gtags-empty-index-generation.patch
 docs-set-minimal-gtags-gnu-global-version-to-6.6.5.patch
 drm-amdgpu-validate-vm-ioctl-flags.patch
+drm-amd-display-ensure-vmin-and-vmax-adjust-for-dce.patch
+gup-avoid-stack-expansion-warning-for-known-good-case.patch