Skip to content

Commit 169ed4e

Browse files
effective-lightalexdeucher
authored andcommitted
Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory"
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: 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>
1 parent ef06418 commit 169ed4e

3 files changed

Lines changed: 3 additions & 29 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
12931293
void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
12941294
int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12951295
bool amdgpu_device_need_post(struct amdgpu_device *adev);
1296-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
12971296
bool amdgpu_device_pcie_dynamic_switching_supported(void);
12981297
bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
12991298
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
@@ -1244,32 +1244,6 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
12441244
return true;
12451245
}
12461246

1247-
/*
1248-
* On APUs with >= 64GB white flickering has been observed w/ SG enabled.
1249-
* Disable S/G on such systems until we have a proper fix.
1250-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2354
1251-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2735
1252-
*/
1253-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev)
1254-
{
1255-
switch (amdgpu_sg_display) {
1256-
case -1:
1257-
break;
1258-
case 0:
1259-
return false;
1260-
case 1:
1261-
return true;
1262-
default:
1263-
return false;
1264-
}
1265-
if ((totalram_pages() << (PAGE_SHIFT - 10)) +
1266-
(adev->gmc.real_vram_size / 1024) >= 64000000) {
1267-
DRM_WARN("Disabling S/G due to >=64GB RAM\n");
1268-
return false;
1269-
}
1270-
return true;
1271-
}
1272-
12731247
/*
12741248
* Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
12751249
* 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
@@ -1644,8 +1644,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
16441644
}
16451645
break;
16461646
}
1647-
if (init_data.flags.gpu_vm_support)
1648-
init_data.flags.gpu_vm_support = amdgpu_sg_display_supported(adev);
1647+
if (init_data.flags.gpu_vm_support &&
1648+
(amdgpu_sg_display == 0))
1649+
init_data.flags.gpu_vm_support = false;
16491650

16501651
if (init_data.flags.gpu_vm_support)
16511652
adev->mode_info.gpu_vm_support = true;

0 commit comments

Comments
 (0)