lkml.org 
[lkml]   [2015]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-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@canb.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;
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-02-27 02:21    [W:0.038 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site