Lines Matching refs:clflush
14 struct clflush { struct
29 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_work() local
31 __do_clflush(clflush->obj); in clflush_work()
36 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_release() local
38 i915_gem_object_unpin_pages(clflush->obj); in clflush_release()
39 i915_gem_object_put(clflush->obj); in clflush_release()
48 static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj) in clflush_work_create()
50 struct clflush *clflush; in clflush_work_create() local
54 clflush = kmalloc(sizeof(*clflush), GFP_KERNEL); in clflush_work_create()
55 if (!clflush) in clflush_work_create()
59 kfree(clflush); in clflush_work_create()
63 dma_fence_work_init(&clflush->base, &clflush_ops); in clflush_work_create()
64 clflush->obj = i915_gem_object_get(obj); /* obj <-> clflush cycle */ in clflush_work_create()
66 return clflush; in clflush_work_create()
72 struct clflush *clflush; in i915_gem_clflush_object() local
102 clflush = NULL; in i915_gem_clflush_object()
104 clflush = clflush_work_create(obj); in i915_gem_clflush_object()
105 if (clflush) { in i915_gem_clflush_object()
106 i915_sw_fence_await_reservation(&clflush->base.chain, in i915_gem_clflush_object()
110 dma_resv_add_excl_fence(obj->base.resv, &clflush->base.dma); in i915_gem_clflush_object()
111 dma_fence_work_commit(&clflush->base); in i915_gem_clflush_object()