diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-17 00:30:42 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-17 00:30:42 +0000 |
commit | ff5bdf079bc6c6ab983e821b29ad19d5ab111242 (patch) | |
tree | dcea4e9b90778ed2ff6838e5d64bd17f9286b728 /sys/dev/pci/drm/drm_drv.c | |
parent | 7a61cb25c577af4a36ec5b27e1455727d0089e69 (diff) |
Instead of using a width-1 bitfield for storing the driver capabilities
in the callback structure, just use a bunch of ORed together bits. This
has been annoying me for ages.
Diffstat (limited to 'sys/dev/pci/drm/drm_drv.c')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index f8c9bb48ac3..34e24c8a90c 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -145,11 +145,12 @@ drm_attach(struct device *parent, struct device *kdev, goto error; } - if (dev->driver->use_agp) { + if (dev->driver->flags & DRIVER_AGP) { if (drm_device_is_agp(dev)) dev->agp = drm_agp_init(); - if (dev->driver->require_agp && dev->agp == NULL) { - printf(":couldn't find agp\n"); + if (dev->driver->flags & DRIVER_AGP_REQUIRE && + dev->agp == NULL) { + printf(": couldn't find agp\n"); goto error; } if (dev->agp != NULL) { @@ -244,7 +245,7 @@ drm_firstopen(struct drm_device *dev) if (dev->driver->firstopen) dev->driver->firstopen(dev); - if (dev->driver->use_dma) { + if (dev->driver->flags & DRIVER_DMA) { i = drm_dma_setup(dev); if (i != 0) return i; @@ -480,7 +481,8 @@ drmclose(dev_t kdev, int flags, int fmt, struct proc *p) } } - if (dev->driver->use_dma && !dev->driver->reclaim_buffers_locked) + if (dev->driver->flags & DRIVER_DMA && + !dev->driver->reclaim_buffers_locked) drm_reclaim_buffers(dev, file_priv); dev->buf_pgid = 0; |