]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 15:48:05 +0000 (16:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 15:48:05 +0000 (16:48 +0100)
added patches:
drm-amdgpu-make-display-pinning-more-flexible-v2.patch

queue-5.4/drm-amdgpu-make-display-pinning-more-flexible-v2.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/drm-amdgpu-make-display-pinning-more-flexible-v2.patch b/queue-5.4/drm-amdgpu-make-display-pinning-more-flexible-v2.patch
new file mode 100644 (file)
index 0000000..b46556f
--- /dev/null
@@ -0,0 +1,42 @@
+From 81d0bcf9900932633d270d5bc4a54ff599c6ebdb Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 7 Dec 2022 11:08:53 -0500
+Subject: drm/amdgpu: make display pinning more flexible (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 81d0bcf9900932633d270d5bc4a54ff599c6ebdb upstream.
+
+Only apply the static threshold for Stoney and Carrizo.
+This hardware has certain requirements that don't allow
+mixing of GTT and VRAM.  Newer asics do not have these
+requirements so we should be able to be more flexible
+with where buffers end up.
+
+Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2270
+Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2291
+Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2255
+Acked-by: Luben Tuikov <luben.tuikov@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -1458,7 +1458,8 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_b
+ uint32_t amdgpu_bo_get_preferred_pin_domain(struct amdgpu_device *adev,
+                                           uint32_t domain)
+ {
+-      if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
++      if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
++          ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
+               domain = AMDGPU_GEM_DOMAIN_VRAM;
+               if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
+                       domain = AMDGPU_GEM_DOMAIN_GTT;
index f259cd3c087b152d999e1d9b015db31defe04fab..85d727e3380562b8e81f5a89af61d163d96a9056 100644 (file)
@@ -534,3 +534,4 @@ ext4-fix-inode-leak-in-ext4_xattr_inode_create-on-an-error-path.patch
 ext4-initialize-quota-before-expanding-inode-in-setproject-ioctl.patch
 ext4-avoid-unaccounted-block-allocation-when-expanding-inode.patch
 ext4-allocate-extended-attribute-value-in-vmalloc-area.patch
+drm-amdgpu-make-display-pinning-more-flexible-v2.patch