]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: Update ring->sync_to() to take a request structure
authorJohn Harrison <John.C.Harrison@Intel.com>
Fri, 29 May 2015 16:44:04 +0000 (17:44 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 12:02:27 +0000 (14:02 +0200)
Updated the ring->sync_to() implementations to take a request instead of a ring.
Also updated the tracer to include the request id.

For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Tomas Elf <tomas.elf@intel.com>
[danvet: Rebase since I didn't merge the patch which added ->uniq.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_trace.h
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h

index 339799c5aceb2f469da60657a42ccf4b48dfa418..ae9e5ecfe34c0e2f79f2a2a99bb45d3171d23179 100644 (file)
@@ -3139,8 +3139,8 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj,
                                return ret;
                }
 
-               trace_i915_gem_ring_sync_to(from, to, from_req);
-               ret = to->semaphore.sync_to(to, from, seqno);
+               trace_i915_gem_ring_sync_to(*to_req, from, from_req);
+               ret = to->semaphore.sync_to(*to_req, from, seqno);
                if (ret)
                        return ret;
 
index cf58eeb1c2c0cdff723d12f6176830f9ddae96ae..63328b6e8ea51aeffba7c8606fb59571448a0342 100644 (file)
@@ -424,10 +424,10 @@ TRACE_EVENT(i915_gem_evict_vm,
 );
 
 TRACE_EVENT(i915_gem_ring_sync_to,
-           TP_PROTO(struct intel_engine_cs *from,
-                    struct intel_engine_cs *to,
+           TP_PROTO(struct drm_i915_gem_request *to_req,
+                    struct intel_engine_cs *from,
                     struct drm_i915_gem_request *req),
-           TP_ARGS(from, to, req),
+           TP_ARGS(to_req, from, req),
 
            TP_STRUCT__entry(
                             __field(u32, dev)
@@ -439,7 +439,7 @@ TRACE_EVENT(i915_gem_ring_sync_to,
            TP_fast_assign(
                           __entry->dev = from->dev->primary->index;
                           __entry->sync_from = from->id;
-                          __entry->sync_to = to->id;
+                          __entry->sync_to = to_req->ring->id;
                           __entry->seqno = i915_gem_request_get_seqno(req);
                           ),
 
index 44fdfd07d912a4b29c1cf5b44f5805a565a30a8b..eb436a03fae95cb6b1490714e3a87b6d4a91e102 100644 (file)
@@ -1333,10 +1333,11 @@ static inline bool i915_gem_has_seqno_wrapped(struct drm_device *dev,
  */
 
 static int
-gen8_ring_sync(struct intel_engine_cs *waiter,
+gen8_ring_sync(struct drm_i915_gem_request *waiter_req,
               struct intel_engine_cs *signaller,
               u32 seqno)
 {
+       struct intel_engine_cs *waiter = waiter_req->ring;
        struct drm_i915_private *dev_priv = waiter->dev->dev_private;
        int ret;
 
@@ -1358,10 +1359,11 @@ gen8_ring_sync(struct intel_engine_cs *waiter,
 }
 
 static int
-gen6_ring_sync(struct intel_engine_cs *waiter,
+gen6_ring_sync(struct drm_i915_gem_request *waiter_req,
               struct intel_engine_cs *signaller,
               u32 seqno)
 {
+       struct intel_engine_cs *waiter = waiter_req->ring;
        u32 dw1 = MI_SEMAPHORE_MBOX |
                  MI_SEMAPHORE_COMPARE |
                  MI_SEMAPHORE_REGISTER;
index 1f11c3236768f47f7a7b55dcbab02409d434f5f6..6853f8f0ee2994e58d981b77e7373826f526ecc5 100644 (file)
@@ -252,8 +252,8 @@ struct  intel_engine_cs {
                };
 
                /* AKA wait() */
-               int     (*sync_to)(struct intel_engine_cs *ring,
-                                  struct intel_engine_cs *to,
+               int     (*sync_to)(struct drm_i915_gem_request *to_req,
+                                  struct intel_engine_cs *from,
                                   u32 seqno);
                int     (*signal)(struct intel_engine_cs *signaller,
                                  /* num_dwords needed by caller */