From: jsg Date: Fri, 31 Mar 2023 01:53:07 +0000 (+0000) Subject: drm/amdgpu: Fix call trace warning and hang when removing amdgpu device X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2f55aaff07cb5ee2f870837ceb2efa00f7286722;p=openbsd drm/amdgpu: Fix call trace warning and hang when removing amdgpu device From lyndonli f06b902511ea05526f405ee64da54a8313d91831 in linux-6.1.y/6.1.22 93bb18d2a873d2fa9625c8ea927723660a868b95 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c index edc3cbd3764..2c1285b26e3 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c @@ -1335,7 +1335,7 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) if (!bo->resource || bo->resource->mem_type != TTM_PL_VRAM || !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) || - adev->in_suspend || adev->shutdown) + adev->in_suspend || drm_dev_is_unplugged(adev_to_drm(adev))) return; if (WARN_ON_ONCE(!dma_resv_trylock(bo->base.resv)))