Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 03:05:07 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915 [riastradh-drm2]: i915_dma.c

Log Message:
Ifdef out Linux vga stuff from i915_dma.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \
    src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.1.1.1.2.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.1.1.1.2.5
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.1.1.1.2.4	Wed Jul 24 03:04:50 2013
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c	Wed Jul 24 03:05:07 2013
@@ -1217,6 +1217,7 @@ intel_teardown_mchbar(struct drm_device 
 		release_resource(&dev_priv->mch_res);
 }
 
+#ifndef __NetBSD__  /* XXX vga */
 /* true = enable decode, false = disable decoder */
 static unsigned int i915_vga_set_decode(void *cookie, bool state)
 {
@@ -1265,6 +1266,7 @@ static const struct vga_switcheroo_clien
 	.reprobe = NULL,
 	.can_switch = i915_switcheroo_can_switch,
 };
+#endif
 
 static int i915_load_modeset_init(struct drm_device *dev)
 {
@@ -1275,6 +1277,7 @@ static int i915_load_modeset_init(struct
 	if (ret)
 		DRM_INFO("failed to find VBIOS tables\n");
 
+#ifndef __NetBSD__		/* XXX vga */
 	/* If we have > 1 VGA cards, then we need to arbitrate access
 	 * to the common VGA resources.
 	 *
@@ -1285,12 +1288,15 @@ static int i915_load_modeset_init(struct
 	ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode);
 	if (ret && ret != -ENODEV)
 		goto out;
+#endif
 
 	intel_register_dsm_handler();
 
+#ifndef __NetBSD__		/* XXX vga */
 	ret = vga_switcheroo_register_client(dev->pdev, &i915_switcheroo_ops);
 	if (ret)
 		goto cleanup_vga_client;
+#endif
 
 	/* Initialise stolen first so that we may reserve preallocated
 	 * objects for the BIOS to KMS transition.
@@ -1342,10 +1348,12 @@ cleanup_gem:
 cleanup_gem_stolen:
 	i915_gem_cleanup_stolen(dev);
 cleanup_vga_switcheroo:
+#ifndef __NetBSD__		/* XXX vga */
 	vga_switcheroo_unregister_client(dev->pdev);
 cleanup_vga_client:
 	vga_client_register(dev->pdev, NULL, NULL, NULL);
 out:
+#endif
 	return ret;
 }
 
@@ -1734,8 +1742,10 @@ int i915_driver_unload(struct drm_device
 			dev_priv->child_dev_num = 0;
 		}
 
+#ifndef __NetBSD__		/* XXX vga */
 		vga_switcheroo_unregister_client(dev->pdev);
 		vga_client_register(dev->pdev, NULL, NULL, NULL);
+#endif
 	}
 
 	/* Free error state after interrupts are fully disabled. */
@@ -1829,7 +1839,9 @@ void i915_driver_lastclose(struct drm_de
 
 	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
 		intel_fb_restore_mode(dev);
+#ifndef __NetBSD__		/* XXX vga */
 		vga_switcheroo_process_delayed_switch();
+#endif
 		return;
 	}
 

Reply via email to