From: "Christian König" <deathsimple@vodafone.de>
To: Adel Gadllah <adel.gadllah@gmail.com>, dri-devel@lists.freedesktop.org
Cc: alexander.deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH] radeon: Add option to disable dpm quirks
Date: Sat, 08 Aug 2015 21:10:34 +0200 [thread overview]
Message-ID: <55C6542A.9000405@vodafone.de> (raw)
In-Reply-To: <1439046567-15315-2-git-send-email-adel.gadllah@gmail.com>
On 08.08.2015 17:09, Adel Gadllah wrote:
> Allow users to disable hardware specific dpm quirks
> using a module parameter.
>
> This patch leaves quirks enabled by default.
You should read the code a bit more carefully, you can already override
the kernel quirks by specifying radeon.dpm=1 on the kernel command line.
Regards,
Christian.
>
> Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
> ---
> 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 &&
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-08 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-08 15:09 [PATCH] radeon: Add option to disable dpm quirks Adel Gadllah
2015-08-08 15:09 ` Adel Gadllah
2015-08-08 19:10 ` Christian König [this message]
2015-08-08 19:21 ` Adel Gadllah
2015-08-09 19:06 ` Christian König
2015-08-10 1:39 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C6542A.9000405@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=adel.gadllah@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.