]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amdgpu: enable GTT fallback handling for dGPUs only
authorChristian König <christian.koenig@amd.com>
Tue, 4 Jun 2024 16:05:00 +0000 (18:05 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 12 Nov 2024 22:37:38 +0000 (17:37 -0500)
That is just a waste of time on APUs.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3704
Fixes: 216c1282dde3 ("drm/amdgpu: use GTT only as fallback for VRAM|GTT")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e8fc090d322346e5ce4c4cfe03a8100e31f61c3c)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 44819cdba7fbe8eab25df9fa2b45f253076aabc8..971419e3a9bbdf2b95a68c24b09cefb597679f75 100644 (file)
@@ -161,7 +161,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
                 * When GTT is just an alternative to VRAM make sure that we
                 * only use it as fallback and still try to fill up VRAM first.
                 */
-               if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)
+               if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM &&
+                   !(adev->flags & AMD_IS_APU))
                        places[c].flags |= TTM_PL_FLAG_FALLBACK;
                c++;
        }