drm/i915: Add temporary ring->ctx backpointer
authorOscar Mateo <oscar.mateo@intel.com>
Thu, 24 Jul 2014 16:04:16 +0000 (17:04 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 14 Aug 2014 16:42:59 +0000 (18:42 +0200)
The execlist patches have a bit a convoluted and long history and due
to that have the actual submission still misplaced deeply burried in
the low-level ringbuffer handling code. This design goes back to the
legacy ringbuffer code with its tricky lazy request and simple work
submissiion using ring tail writes. For that reason they need a
ring->ctx backpointer.

The goal is to unburry that code and move it up into a level where the
full execlist context is available so that we can ditch this
backpointer. Until that's done make it really obvious that there's
work still to be done.

Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Thomas Daniel <thomas.daniel@intel.com>
Acked-by: Thomas Daniel <thomas.daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.h

index 6b5f416b5c0dd76f823c60e17e0fd6f94a9c1b7e..c2352d1b23faaf7a205733bee03f347b60fa109e 100644 (file)
@@ -1086,6 +1086,8 @@ int intel_lr_context_deferred_create(struct intel_context *ctx,
        }
 
        ringbuf->ring = ring;
+       ringbuf->FIXME_lrc_ctx = ctx;
+
        ringbuf->size = 32 * PAGE_SIZE;
        ringbuf->effective_size = ringbuf->size;
        ringbuf->head = 0;
index 24437da91f77d31ae7273a2931051a9c06fef3f8..26785ca725300202d8e361ff159fe27dc935fae4 100644 (file)
@@ -99,6 +99,13 @@ struct intel_ringbuffer {
 
        struct intel_engine_cs *ring;
 
+       /*
+        * FIXME: This backpointer is an artifact of the history of how the
+        * execlist patches came into being. It will get removed once the basic
+        * code has landed.
+        */
+       struct intel_context *FIXME_lrc_ctx;
+
        u32 head;
        u32 tail;
        int space;
This page took 0.033231 seconds and 5 git commands to generate.