All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] radeon: Add option to disable dpm quirks
@ 2015-08-08 15:09 Adel Gadllah
  2015-08-08 15:09 ` Adel Gadllah
  0 siblings, 1 reply; 6+ messages in thread
From: Adel Gadllah @ 2015-08-08 15:09 UTC (permalink / raw)
  To: dri-devel; +Cc: alexander.deucher, Adel Gadllah, christian.koenig

This allows to test whether a specific quirk
is (still) need on a particular hardware combination.

Adel Gadllah (1):
  radeon: Add option to disable dpm quirks

 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(-)

-- 
2.4.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] radeon: Add option to disable dpm quirks
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Adel Gadllah @ 2015-08-08 15:09 UTC (permalink / raw)
  To: dri-devel; +Cc: alexander.deucher, Adel Gadllah, christian.koenig

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@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 &&
-- 
2.4.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] radeon: Add option to disable dpm quirks
  2015-08-08 15:09 ` Adel Gadllah
@ 2015-08-08 19:10   ` Christian König
  2015-08-08 19:21     ` Adel Gadllah
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2015-08-08 19:10 UTC (permalink / raw)
  To: Adel Gadllah, dri-devel; +Cc: alexander.deucher, christian.koenig

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] radeon: Add option to disable dpm quirks
  2015-08-08 19:10   ` Christian König
@ 2015-08-08 19:21     ` Adel Gadllah
  2015-08-09 19:06       ` Christian König
  2015-08-10  1:39       ` Alex Deucher
  0 siblings, 2 replies; 6+ messages in thread
From: Adel Gadllah @ 2015-08-08 19:21 UTC (permalink / raw)
  To: Christian König, dri-devel; +Cc: alexander.deucher, christian.koenig

Am 08.08.2015 um 21:10 schrieb Christian König:
> 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.
OK this seems to be indeed true for the quirks in radeon_pm.c but not for the ones in  si_dpm.c ... or am I missing 
something? (If that's the case we should use radeon_dpm = 1 there as well for consistency).

Regards
Adel

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] radeon: Add option to disable dpm quirks
  2015-08-08 19:21     ` Adel Gadllah
@ 2015-08-09 19:06       ` Christian König
  2015-08-10  1:39       ` Alex Deucher
  1 sibling, 0 replies; 6+ messages in thread
From: Christian König @ 2015-08-09 19:06 UTC (permalink / raw)
  To: Adel Gadllah, dri-devel; +Cc: alexander.deucher, christian.koenig

On 08.08.2015 21:21, Adel Gadllah wrote:
> Am 08.08.2015 um 21:10 schrieb Christian König:
>> 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.
> OK this seems to be indeed true for the quirks in radeon_pm.c but not 
> for the ones in  si_dpm.c ... or am I missing something? (If that's 
> the case we should use radeon_dpm = 1 there as well for consistency).

As far as I know those where explicitly added because of missing support 
for factory overclocked boards to prevent people from accidentally 
turning on DPM on such hardware.

So giving anybody the possibility to override those is probably not a 
good idea. If Alex implements the necessary changes he will surely 
remove those restrictions.

Regards,
Christian.

>
> Regards
> Adel
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] radeon: Add option to disable dpm quirks
  2015-08-08 19:21     ` Adel Gadllah
  2015-08-09 19:06       ` Christian König
@ 2015-08-10  1:39       ` Alex Deucher
  1 sibling, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2015-08-10  1:39 UTC (permalink / raw)
  To: Adel Gadllah
  Cc: Deucher, Alexander, Christian Koenig, Maling list - DRI developers

On Sat, Aug 8, 2015 at 3:21 PM, Adel Gadllah <adel.gadllah@gmail.com> wrote:
> Am 08.08.2015 um 21:10 schrieb Christian König:
>>
>> 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.
>
> OK this seems to be indeed true for the quirks in radeon_pm.c but not for
> the ones in  si_dpm.c ... or am I missing something? (If that's the case we
> should use radeon_dpm = 1 there as well for consistency).

The quirks in si_dpm just limit the clocks on some boards where the
highest clocks are not stable; It doesn't disable dpm.  When we sort
out the root cause for those boards we can remove the quirks.  Adding
a module option to manually disable them is not really useful.

Alex

>
> Regards
> Adel
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-10  1:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-08-08 19:21     ` Adel Gadllah
2015-08-09 19:06       ` Christian König
2015-08-10  1:39       ` Alex Deucher

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.