[Patch v1 3/5] drm/amdkfd: Introduce debugfs option to disable baco

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


Hi Alex


Thanks for your time and feedback!


On 1/28/2020 3:22 PM, Alex Deucher wrote:
> [CAUTION: External Email]
>
> On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj
> <rajneesh.bhardwaj at amd.com> wrote:
>> When BACO is enabled by default, sometimes it can cause additional
>> trouble to debug KFD issues. This debugfs override allows to temporarily
>> disable BACO for debug purpose without having to reboot the machine.
>>
>> However, in some cases one suspend-resume cycle might be needed if
>> the device is already runtime suspended.
>>
>> e.g
>>
>> sudo rtcwake -m < mem or freeze > -s 15
>>
>> or
>>
>> by triggering autosuspend event from user space, by doing something
>> like:
>>
>> echo 6000 > /sys/bus/pci/devices/0000\:03\:00.0/power/autosuspend_delay_ms
>>
>>      Usage:
>>
>> echo 0 > /sys/kernel/debug/kfd/enable_baco and run
>> cat /sys/kernel/debug/kfd/baco_status to verify whether BACO is
>> enabled or disabled by kfd driver.
>>
>> It should be noted that while enabling baco again via kfd override, we
>> must do the following steps:
>>
>> 1. echo 0 > /sys/kernel/debug/kfd/enable_baco
>> 2. sudo rtcwake -m < mem > -s 15
>>
>> In this case, we need GPU to be fully reset which is done by BIOS. This
>> is not possible in case of S2idle i.e. freeze so we must use mem for
>> sleep.
>>
> I think we can drop this patch in favor of just using the standard
> runtime pm control.  E.g.,
> /sys/class/drm/card0/device/power/control


Sure, i was using the /sys/bus/pci way to do it and found it was not 
easy. Since this sysfs exists, will drop the patch.


Regards

Rajneesh


>> _______________________________________________
>> 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%7Cfdaaf630ee6548c6bd9108d7a42fe314%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637158397891190611&sdata=3jE9jZbbw9IiCu7geMeCCsTC4u4tTdippeWYeSnX3oE%3D&reserved=0


More information about the amd-gfx mailing list