From 2b278047153df729caf9e516a432b2e76398cd3a Mon Sep 17 00:00:00 2001 From: vehemens Date: Wed, 27 Aug 2008 19:11:04 -0700 Subject: [FreeBSD] Use driver features macros and flags Signed-off-by: Robert Noland --- bsd-core/drm_drv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bsd-core/drm_drv.c') diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 2ad54b9a..e5762cc4 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -402,7 +402,7 @@ static int drm_firstopen(struct drm_device *dev) dev->buf_use = 0; - if (dev->driver->use_dma) { + if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) { i = drm_dma_setup(dev); if (i != 0) return i; @@ -557,10 +557,11 @@ static int drm_load(struct drm_device *dev) goto error; } - if (dev->driver->use_agp) { + if (drm_core_has_AGP(dev)) { if (drm_device_is_agp(dev)) dev->agp = drm_agp_init(); - if (dev->driver->require_agp && dev->agp == NULL) { + if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && + dev->agp == NULL) { DRM_ERROR("Card isn't AGP, or couldn't initialize " "AGP.\n"); retcode = ENOMEM; @@ -814,7 +815,8 @@ int drm_close(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) } } - if (dev->driver->use_dma && !dev->driver->reclaim_buffers_locked) + if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) && + !dev->driver->reclaim_buffers_locked) drm_reclaim_buffers(dev, file_priv); #if defined (__FreeBSD__) && (__FreeBSD_version >= 500000) -- cgit v1.2.3