summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/r128_drv.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-02-28 02:37:55 +0000
committerrnoland <rnoland@FreeBSD.org>2009-02-28 02:37:55 +0000
commitddd5c68e843d2a001ea8e2dea8a1df60e8b9c96f (patch)
treee6ddfaf5a2ddb8d00739616a566b685c59b9fa61 /sys/dev/drm/r128_drv.c
parente9bc5839af5067790590a780d1d396234ee550e9 (diff)
downloadFreeBSD-src-ddd5c68e843d2a001ea8e2dea8a1df60e8b9c96f.zip
FreeBSD-src-ddd5c68e843d2a001ea8e2dea8a1df60e8b9c96f.tar.gz
Initialize the vblank structures at load time. Previously we did this
at irq install/uninstall time, but when we vt switch, we uninstall the irq handler. When the irq handler is reinstalled, the modeset ioctl happens first. The modeset ioctl is supposed to tell us that we can disable vblank interrupts if there are no active consumers. This will fail after a vt switch until another modeset ioctl is called via dpms or xrandr. Leading to cases where either interrupts are on and can't be disabled, or worse, no interrupts at all. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/drm/r128_drv.c')
-rw-r--r--sys/dev/drm/r128_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/drm/r128_drv.c b/sys/dev/drm/r128_drv.c
index 8d29945..575ca08 100644
--- a/sys/dev/drm/r128_drv.c
+++ b/sys/dev/drm/r128_drv.c
@@ -52,6 +52,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;
@@ -93,6 +94,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)
{
OpenPOWER on IntegriCloud