Use the correct address offset on OpRegion 2.1+ devices to be able
authorjcs <jcs@openbsd.org>
Sun, 8 Aug 2021 14:45:16 +0000 (14:45 +0000)
committerjcs <jcs@openbsd.org>
Sun, 8 Aug 2021 14:45:16 +0000 (14:45 +0000)
to find the VBT

ok jsg

sys/dev/pci/drm/i915/display/intel_opregion.c

index db64609..867491b 100644 (file)
@@ -956,9 +956,8 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv)
                opregion->rvda = memremap(rvda, opregion->asle->rvds,
                                          MEMREMAP_WB);
 #else
-               if (bus_space_map(dev_priv->bst, opregion->asle->rvda,
-                   opregion->asle->rvds, BUS_SPACE_MAP_LINEAR,
-                   &dev_priv->opregion_rvda_ioh))
+               if (bus_space_map(dev_priv->bst, rvda, opregion->asle->rvds,
+                   BUS_SPACE_MAP_LINEAR, &dev_priv->opregion_rvda_ioh))
                        return -ENOMEM;
                opregion->rvda = bus_space_vaddr(dev_priv->bst,
                    dev_priv->opregion_rvda_ioh);