[Patch v1 1/5] drm/amdgpu: always enable runtime power management

Bhardwaj, Rajneesh rajneesh.bhardwaj at amd.com
Thu Jan 30 19:06:12 UTC 2020


On 1/28/2020 3:14 PM, Alex Deucher wrote:
> [CAUTION: External Email]
>
> On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj
> <rajneesh.bhardwaj at amd.com> wrote:
>> This allows runtime power management to kick in on amdgpu driver when
>> the underlying hardware supports either BOCO or BACO. This can still be
>> avoided if boot arg amdgpu.runpm = 0 is supplied.
>>
>>          BOCO: Bus Off, Chip Off
>>          BACO: Bus Alive, Chip Off
>>
>> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj at amd.com>
> This patch should be the last one in the series, otherwise we'll
> enable runpm on BACO capable devices before the KFD code is in place.
> Also, it's only supported on VI and newer asics, so we should use this
> patch instead:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fpatch%2F335402%2F&data=02%7C01%7Crajneesh.bhardwaj%40amd.com%7C01f67fc720d3423ee6b908d7a42eb68d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637158392852429503&sdata=aU07GE56Vfb0JTSDsVDdyCdhxUkjHEVMAHiBaBC4V7g%3D&reserved=0
>
> Alex

Thanks, Will fix in v2.


>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 ++++-----
>>   1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> index 3a0ea9096498..7958d508486e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> @@ -169,11 +169,10 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
>>                  goto out;
>>          }
>>
>> -       if (amdgpu_device_supports_boco(dev) &&
>> -           (amdgpu_runtime_pm != 0)) /* enable runpm by default */
>> -               adev->runpm = true;
>> -       else if (amdgpu_device_supports_baco(dev) &&
>> -                (amdgpu_runtime_pm > 0)) /* enable runpm if runpm=1 */
>> +       /* always enable runtime power management except when amdgpu.runpm=0 */
>> +       if ((amdgpu_device_supports_boco(dev) ||
>> +                       amdgpu_device_supports_baco(dev))
>> +                       && (amdgpu_runtime_pm != 0))
>>                  adev->runpm = true;
>>
>>          /* Call ACPI methods: require modeset init
>> --
>> 2.17.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Crajneesh.bhardwaj%40amd.com%7C01f67fc720d3423ee6b908d7a42eb68d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637158392852429503&sdata=%2BXwHkoDeyA9Q%2FwnSyaND6QOc1SxpGuAHkZ4JdaTM3wU%3D&reserved=0


More information about the amd-gfx mailing list