Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1294d4a3 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon: add a module parameter to disable aspm



Can cause hangs when enabled in certain motherboards.
Set radeon.aspm=0 to disable aspm.

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d1ce3d54
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5515,6 +5515,9 @@ void evergreen_program_aspm(struct radeon_device *rdev)
	 */
	bool fusion_platform = false;

	if (radeon_aspm == 0)
		return;

	if (!(rdev->flags & RADEON_IS_PCIE))
		return;

+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ extern int radeon_msi;
extern int radeon_lockup_timeout;
extern int radeon_fastfb;
extern int radeon_dpm;
extern int radeon_aspm;

/*
 * Copy from radeon_drv.h so we don't have to include both and have conflicting
+4 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ int radeon_msi = -1;
int radeon_lockup_timeout = 10000;
int radeon_fastfb = 0;
int radeon_dpm = -1;
int radeon_aspm = -1;

MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
module_param_named(no_wb, radeon_no_wb, int, 0444);
@@ -225,6 +226,9 @@ module_param_named(fastfb, radeon_fastfb, int, 0444);
MODULE_PARM_DESC(dpm, "DPM support (1 = enable, 0 = disable, -1 = auto)");
module_param_named(dpm, radeon_dpm, int, 0444);

MODULE_PARM_DESC(aspm, "ASPM support (1 = enable, 0 = disable, -1 = auto)");
module_param_named(aspm, radeon_aspm, int, 0444);

static struct pci_device_id pciidlist[] = {
	radeon_PCI_IDS
};
+8 −6
Original line number Diff line number Diff line
@@ -1763,6 +1763,7 @@ void rv6xx_setup_asic(struct radeon_device *rdev)
{
	r600_enable_acpi_pm(rdev);

	if (radeon_aspm != 0) {
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_ASPM_L0s)
			rv6xx_enable_l0s(rdev);
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_ASPM_L1)
@@ -1770,6 +1771,7 @@ void rv6xx_setup_asic(struct radeon_device *rdev)
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1)
			rv6xx_enable_pll_sleep_in_l1(rdev);
	}
}

void rv6xx_dpm_display_configuration_changed(struct radeon_device *rdev)
{
+8 −6
Original line number Diff line number Diff line
@@ -2099,6 +2099,7 @@ void rv770_dpm_setup_asic(struct radeon_device *rdev)

	rv770_enable_acpi_pm(rdev);

	if (radeon_aspm != 0) {
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_ASPM_L0s)
			rv770_enable_l0s(rdev);
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_ASPM_L1)
@@ -2106,6 +2107,7 @@ void rv770_dpm_setup_asic(struct radeon_device *rdev)
		if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1)
			rv770_enable_pll_sleep_in_l1(rdev);
	}
}

void rv770_dpm_display_configuration_changed(struct radeon_device *rdev)
{
Loading