* [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
@ 2020-08-06 16:59 bugzilla-daemon
2020-08-06 17:00 ` [Bug 208839] " bugzilla-daemon
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 16:59 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
Bug ID: 208839
Summary: AMDGPU: DPM is not enabled after hibernate and resume
for CIK/Hawaii GPUs (e.g R9 390)
Product: Drivers
Version: 2.5
Kernel Version: 5.8
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri@kernel-bugs.osdl.org
Reporter: sandy.8925@gmail.com
Regression: No
Created attachment 290801
--> https://bugzilla.kernel.org/attachment.cgi?id=290801&action=edit
Resume after suspend ftrace
After hibernating and resuming, DPM is not enabled. This remains the case even
if you test hibernate using the steps here:
https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html
I debugged the problem, and figured out that in the file hardwaremanager.c, in
the function, phm_enable_dynamic_state_management(), the check 'if
(!hwmgr->pp_one_vf && smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)
&& adev->in_suspend)' returns true for the hibernate case, and false for the
suspend case.
This means that for the hibernate case, the AMDGPU driver doesn't enable DPM
(even though it should) and simply returns from that function. In the suspend
case, it goes ahead and enables DPM, even though it doesn't need to.
I debugged further, and found out that in the case of suspend, for the
CIK/Hawaii GPUs, smum_is_dpm_running(hwmgr) returns false, while in the case of
hibernate, smum_is_dpm_running(hwmgr) returns true.
For CIK, the function ci_is_smc_ram_running() is ultimately used to determine
if DPM is currentle enabled or not, and this seems to provide the wrong answer.
I've attached ftrace traces for the resume after suspend and resume after
hibernate cases (with some functions excluded for brevity).
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
@ 2020-08-06 17:00 ` bugzilla-daemon
2020-08-06 17:42 ` bugzilla-daemon
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 17:00 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
sandy.8925@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandy.8925@gmail.com
--- Comment #1 from sandy.8925@gmail.com ---
Created attachment 290803
--> https://bugzilla.kernel.org/attachment.cgi?id=290803&action=edit
Resume after hibernate ftrace
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
2020-08-06 17:00 ` [Bug 208839] " bugzilla-daemon
@ 2020-08-06 17:42 ` bugzilla-daemon
2020-08-06 18:39 ` bugzilla-daemon
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 17:42 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
Alex Deucher (alexdeucher@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alexdeucher@gmail.com
--- Comment #2 from Alex Deucher (alexdeucher@gmail.com) ---
Please attach your dmesg output.
ci_is_smc_ram_running() is correct. With hibernate, everything happens twice.
On resume from hibernate, the system loads, then suspends that state, and then
resumes the original hibernated state. For suspend to ram, there is just one
suspend and one resume. For some reason the SMU was not properly shutdown on
the first suspend during the resume from disk cycle, so it shows up as running.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
2020-08-06 17:00 ` [Bug 208839] " bugzilla-daemon
2020-08-06 17:42 ` bugzilla-daemon
@ 2020-08-06 18:39 ` bugzilla-daemon
2020-08-06 18:48 ` bugzilla-daemon
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 18:39 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
--- Comment #3 from sandy.8925@gmail.com ---
That doesn't seem to be the case, based on the traces I took. AFAICT the kernel
just calls the freeze function and then the restore function.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
` (2 preceding siblings ...)
2020-08-06 18:39 ` bugzilla-daemon
@ 2020-08-06 18:48 ` bugzilla-daemon
2020-08-06 18:59 ` bugzilla-daemon
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 18:48 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
--- Comment #4 from sandy.8925@gmail.com ---
Created attachment 290805
--> https://bugzilla.kernel.org/attachment.cgi?id=290805&action=edit
dmesg on Arch Linux 5.8 kernel, after hibernate and resume
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
` (3 preceding siblings ...)
2020-08-06 18:48 ` bugzilla-daemon
@ 2020-08-06 18:59 ` bugzilla-daemon
2020-08-06 19:04 ` bugzilla-daemon
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 18:59 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
--- Comment #5 from Alex Deucher (alexdeucher@gmail.com) ---
(In reply to sandy.8925 from comment #3)
> That doesn't seem to be the case, based on the traces I took. AFAICT the
> kernel just calls the freeze function and then the restore function.
It's not necessarily the same kernel. See:
https://www.kernel.org/doc/html/latest/driver-api/pm/devices.html
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
` (4 preceding siblings ...)
2020-08-06 18:59 ` bugzilla-daemon
@ 2020-08-06 19:04 ` bugzilla-daemon
2020-08-06 19:10 ` bugzilla-daemon
2020-08-30 7:20 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 19:04 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
--- Comment #6 from sandy.8925@gmail.com ---
It is the same kernel in this case. I didn't install any new kernel before
hibernating, therefore the kernel that entered the hibernate is the same kernel
that resumed from hibernation.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
` (5 preceding siblings ...)
2020-08-06 19:04 ` bugzilla-daemon
@ 2020-08-06 19:10 ` bugzilla-daemon
2020-08-30 7:20 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-06 19:10 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
--- Comment #7 from Alex Deucher (alexdeucher@gmail.com) ---
It has nothing to do with kernels that are installed. From the link:
"Although in principle the image might be loaded into memory and the
pre-hibernation memory contents restored by the boot loader, in practice this
can’t be done because boot loaders aren’t smart enough and there is no
established protocol for passing the necessary information. So instead, the
boot loader loads a fresh instance of the kernel, called “the restore kernel”,
into memory and passes control to it in the usual way. Then the restore kernel
reads the system image, restores the pre-hibernation memory contents, and
passes control to the image kernel. Thus two different kernel instances are
involved in resuming from hibernation. In fact, the restore kernel may be
completely different from the image kernel: a different configuration and even
a different version."
Anyway, your patch looks correct.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* [Bug 208839] AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390)
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
` (6 preceding siblings ...)
2020-08-06 19:10 ` bugzilla-daemon
@ 2020-08-30 7:20 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2020-08-30 7:20 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=208839
sandy.8925@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX
--- Comment #8 from sandy.8925@gmail.com ---
Resolving, since the patch was merged.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-08-30 7:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 16:59 [Bug 208839] New: AMDGPU: DPM is not enabled after hibernate and resume for CIK/Hawaii GPUs (e.g R9 390) bugzilla-daemon
2020-08-06 17:00 ` [Bug 208839] " bugzilla-daemon
2020-08-06 17:42 ` bugzilla-daemon
2020-08-06 18:39 ` bugzilla-daemon
2020-08-06 18:48 ` bugzilla-daemon
2020-08-06 18:59 ` bugzilla-daemon
2020-08-06 19:04 ` bugzilla-daemon
2020-08-06 19:10 ` bugzilla-daemon
2020-08-30 7:20 ` bugzilla-daemon
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.