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/dist/drm/i915 Drop another re...
details: https://anonhg.NetBSD.org/src/rev/a99991f652a8
branches: riastradh-drm2
changeset: 788594:a99991f652a8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jan 15 13:53:09 2014 +0000
description:
Drop another reference in do_destroy if the context is current.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r d5fd8921409f -r a99991f652a8 sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c Wed Jan 15 13:52:59 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_context.c Wed Jan 15 13:53:09 2014 +0000
@@ -135,6 +135,13 @@
else
BUG_ON(ctx != dev_priv->ring[RCS].default_context);
+ /*
+ * If we are currently switched to this context, there's an
+ * extra reference to it, so drop that too.
+ */
+ if (ctx->ring->last_context_obj == ctx->obj)
+ drm_gem_object_unreference(&ctx->obj->base);
+
drm_gem_object_unreference(&ctx->obj->base);
kfree(ctx);
}
Home |
Main Index |
Thread Index |
Old Index