drm/i915: Put the kernel_context in drm_i915_private next to its friends
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 May 2016 13:53:40 +0000 (14:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 May 2016 14:29:57 +0000 (15:29 +0100)
Just move the kernel_context member of drm_i915_private next to the
engines it is associated with.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464098023-3294-7-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_guc_submission.c

index 784978d3375882b8ba161c25c1695fcca7959566..b2428bceadd98436eb05caf33a6bac7468fc85b4 100644 (file)
@@ -1760,6 +1760,7 @@ struct drm_i915_private {
        wait_queue_head_t gmbus_wait_queue;
 
        struct pci_dev *bridge_dev;
+       struct i915_gem_context *kernel_context;
        struct intel_engine_cs engine[I915_NUM_ENGINES];
        struct drm_i915_gem_object *semaphore_obj;
        uint32_t last_seqno, next_seqno;
@@ -2017,8 +2018,6 @@ struct drm_i915_private {
                void (*stop_engine)(struct intel_engine_cs *engine);
        } gt;
 
-       struct i915_gem_context *kernel_context;
-
        /* perform PHY state sanity checks? */
        bool chv_phy_assert[2];
 
index 7b3c96e6ea378c405f6560f21d0cd29c058d7e43..ac72451c571c68ae5fe693327f7667e29e65f165 100644 (file)
@@ -935,11 +935,12 @@ int i915_guc_submission_enable(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_guc *guc = &dev_priv->guc;
-       struct i915_gem_context *ctx = dev_priv->kernel_context;
        struct i915_guc_client *client;
 
        /* client for execbuf submission */
-       client = guc_client_alloc(dev, GUC_CTX_PRIORITY_KMD_NORMAL, ctx);
+       client = guc_client_alloc(dev,
+                                 GUC_CTX_PRIORITY_KMD_NORMAL,
+                                 dev_priv->kernel_context);
        if (!client) {
                DRM_ERROR("Failed to create execbuf guc_client\n");
                return -ENOMEM;