Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2 Still more error branch cleanup.
details: https://anonhg.NetBSD.org/src/rev/2ec06273ebd5
branches: riastradh-drm2
changeset: 788562:2ec06273ebd5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Sep 08 16:28:27 2013 +0000
description:
Still more error branch cleanup.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c | 5 +++--
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 2 --
sys/external/bsd/drm2/i915drm/i915_gem_gtt.c | 15 +++++++++++++--
3 files changed, 16 insertions(+), 6 deletions(-)
diffs (82 lines):
diff -r 61353bdc3780 -r 2ec06273ebd5 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Sun Sep 08 16:27:15 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Sun Sep 08 16:28:27 2013 +0000
@@ -1758,9 +1758,7 @@
intel_teardown_gmbus(dev);
intel_teardown_mchbar(dev);
-#ifdef __NetBSD__ /* XXX gt fini */
intel_gt_fini(dev);
-#endif
destroy_workqueue(dev_priv->wq);
out_mtrrfree:
if (dev_priv->mm.gtt_mtrr >= 0) {
@@ -1873,6 +1871,7 @@
i915_gem_context_fini(dev);
mutex_unlock(&dev->struct_mutex);
i915_gem_cleanup_aliasing_ppgtt(dev);
+ i915_gem_fini_global_gtt(dev);
i915_gem_cleanup_stolen(dev);
drm_mm_takedown(&dev_priv->mm.stolen);
@@ -1906,9 +1905,11 @@
intel_teardown_gmbus(dev);
intel_teardown_mchbar(dev);
+ intel_gt_fini(dev);
destroy_workqueue(dev_priv->wq);
+ i915_gem_gtt_fini(dev);
pci_dev_put(dev_priv->bridge_dev);
kfree(dev->dev_private);
diff -r 61353bdc3780 -r 2ec06273ebd5 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Sep 08 16:27:15 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Sep 08 16:28:27 2013 +0000
@@ -4471,9 +4471,7 @@
ret = i915_gem_init_aliasing_ppgtt(dev);
if (ret) {
-#ifdef __NetBSD__ /* XXX fini global gtt */
i915_gem_fini_global_gtt(dev);
-#endif
mutex_unlock(&dev->struct_mutex);
return ret;
}
diff -r 61353bdc3780 -r 2ec06273ebd5 sys/external/bsd/drm2/i915drm/i915_gem_gtt.c
--- a/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Sun Sep 08 16:27:15 2013 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Sun Sep 08 16:28:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_gtt.c,v 1.1.2.5 2013/09/08 16:13:55 riastradh Exp $ */
+/* $NetBSD: i915_gem_gtt.c,v 1.1.2.6 2013/09/08 16:28:27 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.1.2.5 2013/09/08 16:13:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.1.2.6 2013/09/08 16:28:27 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -244,6 +244,17 @@
i915_gem_fini_global_gtt(struct drm_device *dev)
{
struct drm_i915_private *const dev_priv = dev->dev_private;
+ struct drm_i915_gem_object *obj, *next;
+ int ret;
+
+ /* Empty the mm before taking it down. */
+ list_for_each_entry_safe(obj, next, &dev_priv->mm.unbound_list,
+ gtt_list) {
+ ret = i915_gem_object_unbind(obj);
+ if (ret)
+ DRM_ERROR("Unable to unbind object %p: %d\n", obj,
+ ret);
+ }
drm_mm_takedown(&dev_priv->mm.gtt_space);
}
Home |
Main Index |
Thread Index |
Old Index