Allow users to disable hardware specific dpm quirks using a module parameter. This patch leaves quirks enabled by default. Signed-off-by: Adel Gadllah <adel.gadllah@xxxxxxxxx> --- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 4 ++++ drivers/gpu/drm/radeon/radeon_pm.c | 2 +- drivers/gpu/drm/radeon/si_dpm.c | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index f03b7eb..1d90f3d 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -102,6 +102,7 @@ extern int radeon_msi; extern int radeon_lockup_timeout; extern int radeon_fastfb; extern int radeon_dpm; +extern int radeon_dpm_quirks; extern int radeon_aspm; extern int radeon_runtime_pm; extern int radeon_hard_reset; diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 5751446..3530e39 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -183,6 +183,7 @@ int radeon_msi = -1; int radeon_lockup_timeout = 10000; int radeon_fastfb = 0; int radeon_dpm = -1; +int radeon_dpm_quirks = 1; int radeon_aspm = -1; int radeon_runtime_pm = -1; int radeon_hard_reset = 0; @@ -249,6 +250,9 @@ module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444); MODULE_PARM_DESC(fastfb, "Direct FB access for IGP chips (0 = disable, 1 = enable)"); module_param_named(fastfb, radeon_fastfb, int, 0444); +MODULE_PARM_DESC(dpm_quirks, "Use hardware specific DPM quirks (1 = enable (default), 0 = disable)"); +module_param_named(dpm_quirks, radeon_dpm_quirks, int, 0444); + MODULE_PARM_DESC(dpm, "DPM support (1 = enable, 0 = disable, -1 = auto)"); module_param_named(dpm, radeon_dpm, int, 0444); diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c1ba83a..5d7b25e 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -1460,7 +1460,7 @@ int radeon_pm_init(struct radeon_device *rdev) bool disable_dpm = false; /* Apply dpm quirks */ - while (p && p->chip_device != 0) { + while (radeon_dpm_quirks && p && p->chip_device != 0) { if (rdev->pdev->vendor == p->chip_vendor && rdev->pdev->device == p->chip_device && rdev->pdev->subsystem_vendor == p->subsys_vendor && diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 787cd8f..eb8ff32 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -2995,7 +2995,7 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev, struct si_dpm_quirk *p = si_dpm_quirk_list; /* Apply dpm quirks */ - while (p && p->chip_device != 0) { + while (radeon_dpm_quirks && p && p->chip_device != 0) { if (rdev->pdev->vendor == p->chip_vendor && rdev->pdev->device == p->chip_device && rdev->pdev->subsystem_vendor == p->subsys_vendor && -- 2.4.3 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel