make amdgpu_activate() return early when called during hibernate resume
authorjsg <jsg@openbsd.org>
Tue, 14 May 2024 04:55:42 +0000 (04:55 +0000)
committerjsg <jsg@openbsd.org>
Tue, 14 May 2024 04:55:42 +0000 (04:55 +0000)
commitbd26684b565a31e725ef043aabe4c122ee54ff56
tree70b25adb7829904d943dd7b538f4dd51a6df2d5f
parent25ac4bbbe11631de16c446ba753efec8c9150fca
make amdgpu_activate() return early when called during hibernate resume

Hibernate does DVACT_QUIESCE/DVACT_SUSPEND from hibernate_resume(),
before config_process_deferred_mountroot() calls amdgpu_attachhook().

Without this change the amdgpu_device_prepare() call ends up faulting in
ttm_resource_manager_evict_all() after the
'drm/amd: Evict resources during PM ops prepare() callback'
commit from April.

earlier diff from and ok stsp@
report and bisection from florian@
sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c