Skip to content

Commit 216eae7

Browse files
effective-lightgregkh
authored andcommitted
Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory"
commit 169ed4e upstream. This reverts commit 70e64c4. 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: [email protected] # 6.1+ Acked-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 98ea94f commit 216eae7

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
12661266
void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
12671267
int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12681268
bool amdgpu_device_need_post(struct amdgpu_device *adev);
1269-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
12701269
bool amdgpu_device_pcie_dynamic_switching_supported(void);
12711270
bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
12721271
bool amdgpu_device_aspm_support_quirk(void);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,32 +1336,6 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
13361336
return true;
13371337
}
13381338

1339-
/*
1340-
* On APUs with >= 64GB white flickering has been observed w/ SG enabled.
1341-
* Disable S/G on such systems until we have a proper fix.
1342-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2354
1343-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2735
1344-
*/
1345-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev)
1346-
{
1347-
switch (amdgpu_sg_display) {
1348-
case -1:
1349-
break;
1350-
case 0:
1351-
return false;
1352-
case 1:
1353-
return true;
1354-
default:
1355-
return false;
1356-
}
1357-
if ((totalram_pages() << (PAGE_SHIFT - 10)) +
1358-
(adev->gmc.real_vram_size / 1024) >= 64000000) {
1359-
DRM_WARN("Disabling S/G due to >=64GB RAM\n");
1360-
return false;
1361-
}
1362-
return true;
1363-
}
1364-
13651339
/*
13661340
* Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
13671341
* speed switching. Until we have confirmation from Intel that a specific host

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
16341634
}
16351635
break;
16361636
}
1637-
if (init_data.flags.gpu_vm_support)
1638-
init_data.flags.gpu_vm_support = amdgpu_sg_display_supported(adev);
1637+
if (init_data.flags.gpu_vm_support &&
1638+
(amdgpu_sg_display == 0))
1639+
init_data.flags.gpu_vm_support = false;
16391640

16401641
if (init_data.flags.gpu_vm_support)
16411642
adev->mode_info.gpu_vm_support = true;

0 commit comments

Comments
 (0)