From: jsg Date: Fri, 10 Feb 2023 14:40:59 +0000 (+0000) Subject: drm/amd: Fix initialization for nbio 4.3.0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ad2c226be9dd92dcf3171e35e6ecde9c4775ae7;p=openbsd drm/amd: Fix initialization for nbio 4.3.0 From Mario Limonciello 814d83a710e8309d989fafc163656a68f2acaef4 in linux-6.1.y/6.1.11 5048fa1ebf89d03cf0ceca13fab8f800399e9ee3 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/nbio_v4_3.c b/sys/dev/pci/drm/amd/amdgpu/nbio_v4_3.c index 15eb3658d70..09fdcd20cb9 100644 --- a/sys/dev/pci/drm/amd/amdgpu/nbio_v4_3.c +++ b/sys/dev/pci/drm/amd/amdgpu/nbio_v4_3.c @@ -337,7 +337,13 @@ const struct nbio_hdp_flush_reg nbio_v4_3_hdp_flush_reg = { static void nbio_v4_3_init_registers(struct amdgpu_device *adev) { - return; + if (adev->ip_versions[NBIO_HWIP][0] == IP_VERSION(4, 3, 0)) { + uint32_t data; + + data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2); + data &= ~RCC_DEV0_EPF2_STRAP2__STRAP_NO_SOFT_RESET_DEV0_F2_MASK; + WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2, data); + } } static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)