OSDN Git Service

drm: Fix race that can lockup the kernel
[android-x86/external-libdrm.git] / linux-core / mga_drv.c
index 1eb6d9e..14a0be4 100644 (file)
@@ -46,15 +46,16 @@ static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
 static struct drm_driver driver = {
        .driver_features =
            DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
-           DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED |
-           DRIVER_IRQ_VBL,
+           DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
        .dev_priv_size = sizeof (drm_mga_buf_priv_t),
        .load = mga_driver_load,
        .unload = mga_driver_unload,
        .lastclose = mga_driver_lastclose,
        .dma_quiescent = mga_driver_dma_quiescent,
        .device_is_agp = mga_driver_device_is_agp,
-       .vblank_wait = mga_driver_vblank_wait,
+       .get_vblank_counter = mga_get_vblank_counter,
+       .enable_vblank = mga_enable_vblank,
+       .disable_vblank = mga_disable_vblank,
        .irq_preinstall = mga_driver_irq_preinstall,
        .irq_postinstall = mga_driver_irq_postinstall,
        .irq_uninstall = mga_driver_irq_uninstall,
@@ -140,10 +141,10 @@ static int mga_driver_device_is_agp(struct drm_device * dev)
         * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
         * device.
         */
-       
+
        if ((pdev->device == 0x0525) && pdev->bus->self
-            && (pdev->bus->self->vendor == 0x3388)
-            && (pdev->bus->self->device == 0x0021) ) {
+           && (pdev->bus->self->vendor == 0x3388)
+           && (pdev->bus->self->device == 0x0021)) {
                return 0;
        }