drm/i915/request: fix early tracepoints
authorjsg <jsg@openbsd.org>
Thu, 7 Oct 2021 03:44:00 +0000 (03:44 +0000)
committerjsg <jsg@openbsd.org>
Thu, 7 Oct 2021 03:44:00 +0000 (03:44 +0000)
From Matthew Auld
d35d95e8b9da638d27bce9552262e0c486138343 in linux 5.10.y/5.10.71
c83ff0186401169eb27ce5057d820b7a863455c3 in mainline linux

sys/dev/pci/drm/i915/i915_request.c

index 5883dab..27f7acd 100644 (file)
@@ -837,8 +837,6 @@ static void __i915_request_ctor(void *arg)
        i915_sw_fence_init(&rq->submit, submit_notify);
        i915_sw_fence_init(&rq->semaphore, semaphore_notify);
 
-       dma_fence_init(&rq->fence, &i915_fence_ops, &rq->lock, 0, 0);
-
        rq->capture_list = NULL;
 
        init_llist_head(&rq->execute_cb);
@@ -908,17 +906,12 @@ __i915_request_create(struct intel_context *ce, gfp_t gfp)
        rq->ring = ce->ring;
        rq->execution_mask = ce->engine->mask;
 
-       kref_init(&rq->fence.refcount);
-       rq->fence.flags = 0;
-       rq->fence.error = 0;
-       INIT_LIST_HEAD(&rq->fence.cb_list);
-
        ret = intel_timeline_get_seqno(tl, rq, &seqno);
        if (ret)
                goto err_free;
 
-       rq->fence.context = tl->fence_context;
-       rq->fence.seqno = seqno;
+       dma_fence_init(&rq->fence, &i915_fence_ops, &rq->lock,
+                      tl->fence_context, seqno);
 
        RCU_INIT_POINTER(rq->timeline, tl);
        RCU_INIT_POINTER(rq->hwsp_cacheline, tl->hwsp_cacheline);