Draft: drm/amd: Disable S/G for APUs when 64GB or more host memory
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2231925
Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (v6.4.11)
Conflicts:
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
commit 349a7b42bcd571670eed4f7e28caad1f355ae6cd
Author: Mario Limonciello mario.limonciello@amd.com
AuthorDate: Thu Jul 27 10:22:20 2023 -0500
Commit: Greg Kroah-Hartman gregkh@linuxfoundation.org
CommitDate: Wed Aug 16 18:32:19 2023 +0200
commit 08fffa74d9772d9538338be3f304006c94dde6f0 upstream.
Users report a white flickering screen on multiple systems that
is tied to having 64GB or more memory. When S/G is enabled pages
will get pinned to both VRAM carve out and system RAM leading to
this.
Until it can be fixed properly, disable S/G when 64GB of memory or
more is detected. This will force pages to be pinned into VRAM.
This should fix white screen flickers but if VRAM pressure is
encountered may lead to black screens. It's a trade-off for now.
Fixes: 81d0bcf99009 ("drm/amdgpu: make display pinning more flexible (v2)")
Cc: Hamza Mahfooz <Hamza.Mahfooz@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: <stable@vger.kernel.org> # 6.1.y: bf0207e172703 ("drm/amdgpu: add S/G display parameter")
Cc: <stable@vger.kernel.org> # 6.4.y
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2735
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2354
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mika Penttilä mpenttil@redhat.com