From 3d906286bd861fcf2b357b81be690c14c60a4799 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 20 Mar 2024 02:58:40 +0000 Subject: [PATCH] init bus_space tags in ttm struct --- sys/dev/pci/drm/i915/i915_driver.c | 7 +++++++ sys/dev/pci/drm/i915/i915_drv.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sys/dev/pci/drm/i915/i915_driver.c b/sys/dev/pci/drm/i915/i915_driver.c index 059fdca5d58..b75bb85a672 100644 --- a/sys/dev/pci/drm/i915/i915_driver.c +++ b/sys/dev/pci/drm/i915/i915_driver.c @@ -248,6 +248,12 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv) if (ret < 0) goto err_workqueues; +#ifdef __OpenBSD__ + dev_priv->bdev.iot = dev_priv->iot; + dev_priv->bdev.memt = dev_priv->bst; + dev_priv->bdev.dmat = dev_priv->dmat; +#endif + ret = intel_region_ttm_device_init(dev_priv); if (ret) goto err_ttm; @@ -2254,6 +2260,7 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux) dev_priv->pc = pa->pa_pc; dev_priv->tag = pa->pa_tag; + dev_priv->iot = pa->pa_iot; dev_priv->dmat = pa->pa_dmat; dev_priv->bst = pa->pa_memt; dev_priv->memex = pa->pa_memex; diff --git a/sys/dev/pci/drm/i915/i915_drv.h b/sys/dev/pci/drm/i915/i915_drv.h index 3a2afa5912e..4b1f2687112 100644 --- a/sys/dev/pci/drm/i915/i915_drv.h +++ b/sys/dev/pci/drm/i915/i915_drv.h @@ -215,6 +215,7 @@ struct inteldrm_softc { #ifdef __OpenBSD__ struct device sc_dev; bus_dma_tag_t dmat; + bus_space_tag_t iot; bus_space_tag_t bst; struct agp_map *agph; bus_space_handle_t opregion_ioh; -- 2.20.1