From 33b7da6207ad17f87aa9b94ada4270b1cd2caf20 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 25 Jan 2024 08:08:10 +0000 Subject: [PATCH] move pwr_state init out of ifdef --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 5dc2ffd13dd..ad0e8f4f063 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -3653,10 +3653,12 @@ int amdgpu_device_init(struct amdgpu_device *adev, adev->rmmio_base = pci_resource_start(adev->pdev, 2); adev->rmmio_size = pci_resource_len(adev->pdev, 2); } +#endif for (i = 0; i < AMD_IP_BLOCK_TYPE_NUM; i++) atomic_set(&adev->pm.pwr_state[i], POWER_STATE_UNKNOWN); +#ifdef __linux__ adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size); if (!adev->rmmio) return -ENOMEM; -- 2.20.1