diff mbox

[3/3] drm/radeon: enable bapm by default on desktop TN/RL boards

Message ID 1403123114-9962-3-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher June 18, 2014, 8:25 p.m. UTC
bapm enabled the GPU and CPU to share TDP headroom.  It was
disabled by default since some laptops hung when it was enabled
in conjunction with dpm.  It seems to be stable on desktop
boards and fixes hangs on boot with dpm enabled on certain
boards, so enable it by default on desktop boards.

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=72921

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/trinity_dpm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Lucas Stach June 23, 2014, 4:57 p.m. UTC | #1
Am Mittwoch, den 18.06.2014, 16:25 -0400 schrieb Alex Deucher:
> bapm enabled the GPU and CPU to share TDP headroom.  It was
> disabled by default since some laptops hung when it was enabled
> in conjunction with dpm.  It seems to be stable on desktop
> boards and fixes hangs on boot with dpm enabled on certain
> boards, so enable it by default on desktop boards.
> 
Do you have any idea on why it fails on mobile parts? If there is any
hint I can retest on my failing laptop. It would be nice to be able to
enbale this on the mobile parts, too.

Regards,
Lucas

> bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=72921
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/radeon/trinity_dpm.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
> index 2a2822c..20da6ff 100644
> --- a/drivers/gpu/drm/radeon/trinity_dpm.c
> +++ b/drivers/gpu/drm/radeon/trinity_dpm.c
> @@ -1874,7 +1874,15 @@ int trinity_dpm_init(struct radeon_device *rdev)
>  	for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)
>  		pi->at[i] = TRINITY_AT_DFLT;
>  
> -	pi->enable_bapm = false;
> +	/* There are stability issues reported on latops with
> +	 * bapm installed when switching between AC and battery
> +	 * power.  At the same time, some desktop boards hang
> +	 * if it's not enabled and dpm is enabled.
> +	 */
> +	if (rdev->flags & RADEON_IS_MOBILITY)
> +		pi->enable_bapm = false;
> +	else
> +		pi->enable_bapm = true;
>  	pi->enable_nbps_policy = true;
>  	pi->enable_sclk_ds = true;
>  	pi->enable_gfx_power_gating = true;
Alex Deucher June 23, 2014, 5:27 p.m. UTC | #2
On Mon, Jun 23, 2014 at 12:57 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Mittwoch, den 18.06.2014, 16:25 -0400 schrieb Alex Deucher:
>> bapm enabled the GPU and CPU to share TDP headroom.  It was
>> disabled by default since some laptops hung when it was enabled
>> in conjunction with dpm.  It seems to be stable on desktop
>> boards and fixes hangs on boot with dpm enabled on certain
>> boards, so enable it by default on desktop boards.
>>
> Do you have any idea on why it fails on mobile parts? If there is any
> hint I can retest on my failing laptop. It would be nice to be able to
> enbale this on the mobile parts, too.

The problem seems to be related to switching between battery and AC.
There is code in the driver to en/disable bapm on plug/unplug events,
but it only fixed it for some users.

Alex


>
> Regards,
> Lucas
>
>> bug:
>> https://bugs.freedesktop.org/show_bug.cgi?id=72921
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>  drivers/gpu/drm/radeon/trinity_dpm.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
>> index 2a2822c..20da6ff 100644
>> --- a/drivers/gpu/drm/radeon/trinity_dpm.c
>> +++ b/drivers/gpu/drm/radeon/trinity_dpm.c
>> @@ -1874,7 +1874,15 @@ int trinity_dpm_init(struct radeon_device *rdev)
>>       for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)
>>               pi->at[i] = TRINITY_AT_DFLT;
>>
>> -     pi->enable_bapm = false;
>> +     /* There are stability issues reported on latops with
>> +      * bapm installed when switching between AC and battery
>> +      * power.  At the same time, some desktop boards hang
>> +      * if it's not enabled and dpm is enabled.
>> +      */
>> +     if (rdev->flags & RADEON_IS_MOBILITY)
>> +             pi->enable_bapm = false;
>> +     else
>> +             pi->enable_bapm = true;
>>       pi->enable_nbps_policy = true;
>>       pi->enable_sclk_ds = true;
>>       pi->enable_gfx_power_gating = true;
>
> --
> Pengutronix e.K.             | Lucas Stach                 |
> Industrial Linux Solutions   | http://www.pengutronix.de/  |
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
index 2a2822c..20da6ff 100644
--- a/drivers/gpu/drm/radeon/trinity_dpm.c
+++ b/drivers/gpu/drm/radeon/trinity_dpm.c
@@ -1874,7 +1874,15 @@  int trinity_dpm_init(struct radeon_device *rdev)
 	for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)
 		pi->at[i] = TRINITY_AT_DFLT;
 
-	pi->enable_bapm = false;
+	/* There are stability issues reported on latops with
+	 * bapm installed when switching between AC and battery
+	 * power.  At the same time, some desktop boards hang
+	 * if it's not enabled and dpm is enabled.
+	 */
+	if (rdev->flags & RADEON_IS_MOBILITY)
+		pi->enable_bapm = false;
+	else
+		pi->enable_bapm = true;
 	pi->enable_nbps_policy = true;
 	pi->enable_sclk_ds = true;
 	pi->enable_gfx_power_gating = true;