[Intel-gfx] [PATCH] drm/i915: reference count for i915_hw_contexts
Ben Widawsky
ben at bwidawsk.net
Sat Apr 20 20:11:25 CEST 2013
On Tue, Apr 09, 2013 at 05:12:22PM -0700, Ben Widawsky wrote:
> From: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>
> In preparation to do analysis of which context was
> guilty of gpu hung, store kreffed context pointer
> into request struct.
>
> This allows us to inspect contexts when gpu is reset
> even if those contexts would already be released
> by userspace.
>
> v2: track i915_hw_context pointers instead of using ctx_ids
> (from Chris Wilson)
>
> v3 (Ben): Get rid of do_release() and handle refcounting more compactly.
> (recommended by Chis)
>
> v4: kref_* put inside static inlines (Daniel Vetter)
> remove code duplication on freeing context (Chris Wilson)
>
> v5: idr_remove and ctx->file_priv = NULL in destroy ioctl (Chris)
> This actually will cause a problem if one destroys a context and later
> refers to the idea of the context (multiple contexts may have the same
> id, but only 1 will exist in the idr).
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com> (v2)
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net> (v3)
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com> (v4)
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net> (v5)
I've tested this pretty darn thoroughly by now. I'm not sure if I can
add an r-b to something I've already signed off by, but this is also:
Tested-by: Ben Widawsky <ben at bwidawsk.net>
[snip]
--
Ben Widawsky, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list