drm/amdgpu: Use another offset for GC 9.4.3 remap
authorjsg <jsg@openbsd.org>
Mon, 22 Jan 2024 02:57:26 +0000 (02:57 +0000)
committerjsg <jsg@openbsd.org>
Mon, 22 Jan 2024 02:57:26 +0000 (02:57 +0000)
From Lijo Lazar
941887dc5ed4ef85ad06f3e76bcd444d9d5bc839 in linux-6.6.y/6.6.13
ed6e4f0a27ebafffbd12bf3878ab004787685d8a in mainline linux

sys/dev/pci/drm/amd/amdgpu/soc15.c

index 48eee60..f1b8c92 100644 (file)
@@ -1160,6 +1160,11 @@ static int soc15_common_early_init(void *handle)
                        AMD_PG_SUPPORT_VCN_DPG |
                        AMD_PG_SUPPORT_JPEG;
                adev->external_rev_id = adev->rev_id + 0x46;
+               /* GC 9.4.3 uses MMIO register region hole at a different offset */
+               if (!amdgpu_sriov_vf(adev)) {
+                       adev->rmmio_remap.reg_offset = 0x1A000;
+                       adev->rmmio_remap.bus_addr = adev->rmmio_base + 0x1A000;
+               }
                break;
        default:
                /* FIXME: not supported yet */