init bus_space tags in ttm struct
authorjsg <jsg@openbsd.org>
Wed, 20 Mar 2024 02:58:40 +0000 (02:58 +0000)
committerjsg <jsg@openbsd.org>
Wed, 20 Mar 2024 02:58:40 +0000 (02:58 +0000)
sys/dev/pci/drm/i915/i915_driver.c
sys/dev/pci/drm/i915/i915_drv.h

index 059fdca..b75bb85 100644 (file)
@@ -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;
index 3a2afa5..4b1f268 100644 (file)
@@ -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;