From: jsg Date: Thu, 25 Jan 2024 08:08:10 +0000 (+0000) Subject: move pwr_state init out of ifdef X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=33b7da6207ad17f87aa9b94ada4270b1cd2caf20;p=openbsd move pwr_state init out of ifdef --- 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;