summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-02-10 14:41:00 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-02-10 14:41:00 +0000
commitce76d4358684f9f8a666ddcff49af11b7ab56b0a (patch)
tree9cd44732fbf9a2faf36c448694e4afb9f1d76146
parent239daef7c172bcca3b2fe5a60721410b7654f69e (diff)
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
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/nbio_v4_3.c8
1 files changed, 7 insertions, 1 deletions
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)