]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory"
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Fri, 8 Sep 2023 14:36:44 +0000 (10:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:10 +0000 (11:11 +0200)
commit 169ed4ece8373f02f10642eae5240e3d1ef5c038 upstream.

This reverts commit 70e64c4d522b732e31c6475a3be2349de337d321.

Since, we now have an actual fix for this issue, we can get rid of this
workaround as it can cause pin failures if enough VRAM isn't carved out
by the BIOS.

Cc: stable@vger.kernel.org # 6.1+
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 0c962f996aff5a1c201a15db1a776a8f0e8d9305..c46c6fbd235e88e5dbf53e8bbf5552a0c031df92 100644 (file)
@@ -1266,7 +1266,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
 int amdgpu_device_pci_reset(struct amdgpu_device *adev);
 bool amdgpu_device_need_post(struct amdgpu_device *adev);
-bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
 bool amdgpu_device_pcie_dynamic_switching_supported(void);
 bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
 bool amdgpu_device_aspm_support_quirk(void);
index 9aac9e755609d7b21e5a550037fd41a2d3287c83..5f5999cea7d2c4c2bd910d213ffa6f21e44bfd76 100644 (file)
@@ -1336,32 +1336,6 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
        return true;
 }
 
-/*
- * On APUs with >= 64GB white flickering has been observed w/ SG enabled.
- * Disable S/G on such systems until we have a proper fix.
- * https://gitlab.freedesktop.org/drm/amd/-/issues/2354
- * https://gitlab.freedesktop.org/drm/amd/-/issues/2735
- */
-bool amdgpu_sg_display_supported(struct amdgpu_device *adev)
-{
-       switch (amdgpu_sg_display) {
-       case -1:
-               break;
-       case 0:
-               return false;
-       case 1:
-               return true;
-       default:
-               return false;
-       }
-       if ((totalram_pages() << (PAGE_SHIFT - 10)) +
-           (adev->gmc.real_vram_size / 1024) >= 64000000) {
-               DRM_WARN("Disabling S/G due to >=64GB RAM\n");
-               return false;
-       }
-       return true;
-}
-
 /*
  * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
  * speed switching. Until we have confirmation from Intel that a specific host
index c8e562dcd99d052f77839f8e64f905d9d740af97..208eeff503906ce26d762c1cc73d247909491779 100644 (file)
@@ -1634,8 +1634,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
                }
                break;
        }
-       if (init_data.flags.gpu_vm_support)
-               init_data.flags.gpu_vm_support = amdgpu_sg_display_supported(adev);
+       if (init_data.flags.gpu_vm_support &&
+           (amdgpu_sg_display == 0))
+               init_data.flags.gpu_vm_support = false;
 
        if (init_data.flags.gpu_vm_support)
                adev->mode_info.gpu_vm_support = true;