summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drmP.h1
-rw-r--r--bsd-core/drm_drv.c2
-rw-r--r--bsd-core/drm_irq.c4
-rw-r--r--bsd-core/mach64_drv.c7
-rw-r--r--bsd-core/r128_drv.c6
5 files changed, 17 insertions, 3 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h
index 573c2b19..69147b33 100644
--- a/bsd-core/drmP.h
+++ b/bsd-core/drmP.h
@@ -797,6 +797,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc);
u32 drm_vblank_count(struct drm_device *dev, int crtc);
int drm_vblank_get(struct drm_device *dev, int crtc);
void drm_vblank_put(struct drm_device *dev, int crtc);
+void drm_vblank_cleanup(struct drm_device *dev);
int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
int drm_vblank_init(struct drm_device *dev, int num_crtcs);
void drm_vbl_send_signals(struct drm_device *dev, int crtc);
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index c45a4427..794f32ea 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -512,6 +512,8 @@ static void drm_unload(struct drm_device *dev)
DRM_DEBUG("mtrr_del = %d", retcode);
}
+ drm_vblank_cleanup(dev);
+
DRM_LOCK();
drm_lastclose(dev);
DRM_UNLOCK();
diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c
index 8a9d3449..2ca4275e 100644
--- a/bsd-core/drm_irq.c
+++ b/bsd-core/drm_irq.c
@@ -93,7 +93,7 @@ static void vblank_disable_fn(void *arg)
}
}
-static void drm_vblank_cleanup(struct drm_device *dev)
+void drm_vblank_cleanup(struct drm_device *dev)
{
unsigned long irqflags;
@@ -210,8 +210,6 @@ int drm_irq_uninstall(struct drm_device *dev)
bus_teardown_intr(dev->device, dev->irqr, dev->irqh);
DRM_LOCK();
- drm_vblank_cleanup(dev);
-
return 0;
}
diff --git a/bsd-core/mach64_drv.c b/bsd-core/mach64_drv.c
index 1cbe5f39..f73e7730 100644
--- a/bsd-core/mach64_drv.c
+++ b/bsd-core/mach64_drv.c
@@ -51,6 +51,7 @@ static void mach64_configure(struct drm_device *dev)
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
dev->driver->buf_priv_size = 1; /* No dev_priv */
+ dev->driver->load = mach64_driver_load;
dev->driver->lastclose = mach64_driver_lastclose;
dev->driver->get_vblank_counter = mach64_get_vblank_counter;
dev->driver->enable_vblank = mach64_enable_vblank;
@@ -91,6 +92,12 @@ mach64_attach(device_t nbdev)
return drm_attach(nbdev, mach64_pciidlist);
}
+int
+mach64_driver_load(struct drm_device * dev, unsigned long flags)
+{
+ return drm_vblank_init(dev, 1);
+}
+
static int
mach64_detach(device_t nbdev)
{
diff --git a/bsd-core/r128_drv.c b/bsd-core/r128_drv.c
index 3dbf66eb..f28bcf2c 100644
--- a/bsd-core/r128_drv.c
+++ b/bsd-core/r128_drv.c
@@ -49,6 +49,7 @@ static void r128_configure(struct drm_device *dev)
DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
dev->driver->buf_priv_size = sizeof(drm_r128_buf_priv_t);
+ dev->driver->load = r128_driver_load;
dev->driver->preclose = r128_driver_preclose;
dev->driver->lastclose = r128_driver_lastclose;
dev->driver->get_vblank_counter = r128_get_vblank_counter;
@@ -90,6 +91,11 @@ r128_attach(device_t nbdev)
return drm_attach(nbdev, r128_pciidlist);
}
+int r128_driver_load(struct drm_device * dev, unsigned long flags)
+{
+ return drm_vblank_init(dev, 1);
+}
+
static int
r128_detach(device_t nbdev)
{