[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150227113645.4fe105c5@canb.auug.org.au>
Date: Fri, 27 Feb 2015 11:36:45 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Daniel Vetter <daniel.vetter@...ll.ch>,
<intel-gfx@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Nick Hoath <nicholas.hoath@...el.com>,
Jani Nikula <jani.nikula@...el.com>,
John Harrison <John.C.Harrison@...el.com>
Subject: linux-next: manual merge of the drm-intel tree with the
drm-intel-fixes tree
Hi all,
Today's linux-next merge of the drm-intel tree got a conflict in
drivers/gpu/drm/i915/i915_drv.h between commit b3a38998f042 ("drm/i915:
Fix a use after free, and unbalanced refcounting") from the
drm-intel-fixes tree and commit 98e1bd4ae68e ("drm/i915: Cache ringbuf
pointer in request structure") from the drm-intel tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc drivers/gpu/drm/i915/i915_drv.h
index 8727086cf48c,239a382c8b55..000000000000
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@@ -2140,17 -2156,9 +2159,18 @@@ struct drm_i915_gem_request
/** Position in the ringbuffer of the end of the whole request */
u32 tail;
- /** Context and ring buffer related to this request */
+ /**
- * Context related to this request
++ * Context and ring buffer related to this request
+ * Contexts are refcounted, so when this request is associated with a
+ * context, we must increment the context's refcount, to guarantee that
+ * it persists while any request is linked to it. Requests themselves
+ * are also refcounted, so the request will only be freed when the last
+ * reference to it is dismissed, and the code in
+ * i915_gem_request_free() will then decrement the refcount on the
+ * context.
+ */
struct intel_context *ctx;
+ struct intel_ringbuffer *ringbuf;
/** Batch buffer related to this request if any */
struct drm_i915_gem_object *batch_obj;
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists