Page MenuHomeFreeBSD

LinuxKPI: Create pm_runtime_resume_and_get function, used by new versions of amdgpu
AcceptedPublic

Authored by siri_racha.ca on Fri, Jun 5, 6:13 AM.
Tags
None
Referenced Files
F159900295: D57463.diff
Fri, Jun 19, 7:03 AM
Unknown Object (File)
Mon, Jun 15, 2:10 PM
Unknown Object (File)
Mon, Jun 15, 2:09 PM
Unknown Object (File)
Mon, Jun 15, 2:09 PM
Unknown Object (File)
Mon, Jun 15, 8:37 AM
Unknown Object (File)
Sat, Jun 13, 8:57 PM
Unknown Object (File)
Sat, Jun 13, 12:49 PM
Unknown Object (File)
Sat, Jun 13, 12:29 AM

Details

Reviewers
dumbbell
Group Reviewers
linuxkpi
Summary

pm_runtime_resume_and_get is used by new versions of amdgpu, and began use between Linux kernel version 6.12, and 6.14.
This is the specific patch where it is introduced, and used; https://racha.ca/patches/0342-drm-amd-pm-use-pm_runtime_get_if_active-for-debugfs-.patch

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

If you want these reviewed can you in the future please add linuxkpi to reviewers and not to subscribers?

siri_racha.ca removed a subscriber: linuxkpi.
In D57463#1316355, @bz wrote:

If you want these reviewed can you in the future please add linuxkpi to reviewers and not to subscribers?

Sorry, should be fixed now

dumbbell added a subscriber: dumbbell.
dumbbell added inline comments.
sys/compat/linuxkpi/common/include/linux/pm_runtime.h
57

style(9): Please put the return expression in parenthesis:

return (0);
This revision now requires changes to proceed.Sun, Jun 14, 9:16 AM
sys/compat/linuxkpi/common/include/linux/pm_runtime.h
57

I assume @siri_racha.ca just followed the existing style in this file which came from OpenBSD originally. I'd be inclined to just leave it without return parens.

I would love to re-do this file entirely as all the stuff gets defined into the void and we have no clue we might ever call it (say if getting in a new version or driver) and at some time we really should start thinking of more PM support (at least me in wifi but I assume gpu is equally munching watts) and at least having pr_debug("%s: TODO\n", func); calls in there will allow us to make these visible.

sys/compat/linuxkpi/common/include/linux/pm_runtime.h
57

You are right, I understand. I noticed other functions didn’t use parenthesis, but I didn’t see the file came from OpenBSD.

I agree with @bz about adding printed TODO when called. I’m still accepting this patch because it should be part of another review probably.

This revision is now accepted and ready to land.Mon, Jun 15, 7:54 AM

I agree with @bz about adding printed TODO when called. I’m still accepting this patch because it should be part of another review probably.

Okay, let's get this one in and then I can do a full pass over the file.