aboutsummaryrefslogtreecommitdiff
path: root/bsd-core/mga_drv.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-05-16 17:37:10 +0000
committerIan Romanick <idr@us.ibm.com>2005-05-16 17:37:10 +0000
commite051cd19c00ed28997ff6fece0d1d4308b171229 (patch)
treeac705c230e9f7a5c1c6dcc5144cc2fc3d6fdbeb3 /bsd-core/mga_drv.c
parentbd72c6990f22381af61f62bffe70619f726d5923 (diff)
Added device_is_agp callback to drm_driver. This function is called by the
platform-specific drm_device_is_agp function. Added implementation of this function the the Linux-specific portion of the MGA driver to detect PCI G450 cards. Added code to the Linux-specific portion of the generic DRM layer to not initialize AGP infrastructure if the card is not AGP (this matches what already existed in BSD). Bumped the driver date and the driver patch-level for MGA. This mostly fixes bugzilla #3248. The BSD side still needs an implementation of mga_driver_device_is_agp.
Diffstat (limited to 'bsd-core/mga_drv.c')
-rw-r--r--bsd-core/mga_drv.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c
index bff8c42f..1dd4c81b 100644
--- a/bsd-core/mga_drv.c
+++ b/bsd-core/mga_drv.c
@@ -37,11 +37,14 @@
#include "mga_drv.h"
#include "drm_pciids.h"
+int mga_driver_device_is_agp(drm_device_t * dev)
/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */
static drm_pci_id_list_t mga_pciidlist[] = {
mga_PCI_IDS
};
+static int mga_driver_device_is_agp(drm_device_t * dev);
+
extern drm_ioctl_desc_t mga_ioctls[];
extern int mga_max_ioctl;
@@ -58,6 +61,8 @@ static void mga_configure(drm_device_t *dev)
dev->dma_ioctl = mga_dma_buffers;
dev->dma_quiescent = mga_driver_dma_quiescent;
+ dev->device_is_agp = mga_driver_device_is_agp;
+
dev->driver_ioctls = mga_ioctls;
dev->max_driver_ioctl = mga_max_ioctl;
@@ -76,6 +81,28 @@ static void mga_configure(drm_device_t *dev)
dev->use_vbl_irq = 1;
}
+/**
+ * Determine if the device really is AGP or not.
+ *
+ * In addition to the usual tests performed by \c drm_device_is_agp, this
+ * function detects PCI G450 cards that appear to the system exactly like
+ * AGP G450 cards.
+ *
+ * \param dev The device to be tested.
+ *
+ * \returns
+ * If the device is a PCI G450, zero is returned. Otherwise non-zero is
+ * returned.
+ *
+ * \bug
+ * This function needs to be filled in! The implementation in
+ * linux-core/mga_drv.c shows what needs to be done.
+ */
+int mga_driver_device_is_agp(drm_device_t * dev)
+{
+ return 1;
+}
+
#ifdef __FreeBSD__
static int
mga_probe(device_t dev)