| From c7f44ec5c4ec760e74351f1843dcb8322f67cbf6 Mon Sep 17 00:00:00 2001 | |
| From: Alex Deucher <alexander.deucher@amd.com> | |
| Date: Fri, 25 Sep 2026 09:16:26 -0400 | |
| Subject: drm/amdgpu: make Mac FB workaround generic | |
| MIME-Version: 1.0 | |
| Content-Type: text/plain; charset=UTF-8 | |
| Content-Transfer-Encoding: 8bit | |
| From: Alex Deucher <alexander.deucher@amd.com> | |
| commit c7f44ec5c4ec760e74351f1843dcb8322f67cbf6 upstream. | |
| Rather than adding a case of every chip where this is seen | |
| just check if the FB is at 0 and the ssid is apple. This | |
| should cover all chips which fall into this case. | |
| Tested-by: Ayhan Çiçek <ayhancicek@gmail.com> | |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | |
| (cherry picked from commit c54e4d10507722398dc90cf3c532e50b86cf425a) | |
| Cc: stable@vger.kernel.org | |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
| --- | |
| drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 17 +++++++---------- | |
| 1 file changed, 7 insertions(+), 10 deletions(-) | |
| --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |
| +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |
| @@ -728,20 +728,17 @@ void amdgpu_gmc_get_vbios_allocations(st | |
| case CHIP_RENOIR: | |
| adev->mman.keep_stolen_vga_memory = true; | |
| break; | |
| - case CHIP_POLARIS10: | |
| - case CHIP_POLARIS11: | |
| - case CHIP_POLARIS12: | |
| - /* MacBookPros with switchable graphics put VRAM at 0 when | |
| - * the iGPU is enabled which results in cursor issues if | |
| - * the cursor ends up at 0. Reserve vram at 0 in that case. | |
| - */ | |
| - if (adev->gmc.vram_start == 0) | |
| - adev->mman.keep_stolen_vga_memory = true; | |
| - break; | |
| default: | |
| adev->mman.keep_stolen_vga_memory = false; | |
| break; | |
| } | |
| + /* MacBookPros with switchable graphics put VRAM at 0 when | |
| + * the iGPU is enabled which results in cursor issues if | |
| + * the cursor ends up at 0. Reserve vram at 0 in that case. | |
| + */ | |
| + if ((adev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) && | |
| + (adev->gmc.vram_start == 0)) | |
| + adev->mman.keep_stolen_vga_memory = true; | |
| if (amdgpu_sriov_vf(adev) || | |
| !amdgpu_device_has_display_hardware(adev)) { |