Lines Matching refs:clflush
17 struct clflush { struct
32 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_work() argument
34 __do_clflush(clflush->obj); in clflush_work()
39 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_release() local
41 i915_gem_object_unpin_pages(clflush->obj); in clflush_release()
42 i915_gem_object_put(clflush->obj); in clflush_release()
51 static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj) in clflush_work_create()
53 struct clflush *clflush; in clflush_work_create() local
57 clflush = kmalloc(sizeof(*clflush), GFP_KERNEL); in clflush_work_create()
58 if (!clflush) in clflush_work_create()
62 kfree(clflush); in clflush_work_create()
66 dma_fence_work_init(&clflush->base, &clflush_ops); in clflush_work_create()
67 clflush->obj = i915_gem_object_get(obj); /* obj <-> clflush cycle */ in clflush_work_create()
69 return clflush; in clflush_work_create()
76 struct clflush *clflush; in i915_gem_clflush_object() local
111 clflush = NULL; in i915_gem_clflush_object()
114 clflush = clflush_work_create(obj); in i915_gem_clflush_object()
115 if (clflush) { in i915_gem_clflush_object()
116 i915_sw_fence_await_reservation(&clflush->base.chain, in i915_gem_clflush_object()
120 dma_resv_add_fence(obj->base.resv, &clflush->base.dma, in i915_gem_clflush_object()
122 dma_fence_work_commit(&clflush->base); in i915_gem_clflush_object()