Lines Matching refs:clflush
14 struct clflush { struct
28 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_work() local
29 struct drm_i915_gem_object *obj = fetch_and_zero(&clflush->obj); in clflush_work()
46 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_release() local
48 if (clflush->obj) in clflush_release()
49 i915_gem_object_put(clflush->obj); in clflush_release()
58 static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj) in clflush_work_create()
60 struct clflush *clflush; in clflush_work_create() local
64 clflush = kmalloc(sizeof(*clflush), GFP_KERNEL); in clflush_work_create()
65 if (!clflush) in clflush_work_create()
68 dma_fence_work_init(&clflush->base, &clflush_ops); in clflush_work_create()
69 clflush->obj = i915_gem_object_get(obj); /* obj <-> clflush cycle */ in clflush_work_create()
71 return clflush; in clflush_work_create()
77 struct clflush *clflush; in i915_gem_clflush_object() local
107 clflush = NULL; in i915_gem_clflush_object()
109 clflush = clflush_work_create(obj); in i915_gem_clflush_object()
110 if (clflush) { in i915_gem_clflush_object()
111 i915_sw_fence_await_reservation(&clflush->base.chain, in i915_gem_clflush_object()
115 dma_resv_add_excl_fence(obj->base.resv, &clflush->base.dma); in i915_gem_clflush_object()
116 dma_fence_work_commit(&clflush->base); in i915_gem_clflush_object()