Lines Matching refs:clflush
16 struct clflush { struct
31 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_work() local
33 __do_clflush(clflush->obj); in clflush_work()
38 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_release() local
40 i915_gem_object_unpin_pages(clflush->obj); in clflush_release()
41 i915_gem_object_put(clflush->obj); in clflush_release()
50 static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj) in clflush_work_create()
52 struct clflush *clflush; in clflush_work_create() local
56 clflush = kmalloc(sizeof(*clflush), GFP_KERNEL); in clflush_work_create()
57 if (!clflush) in clflush_work_create()
61 kfree(clflush); in clflush_work_create()
65 dma_fence_work_init(&clflush->base, &clflush_ops); in clflush_work_create()
66 clflush->obj = i915_gem_object_get(obj); /* obj <-> clflush cycle */ in clflush_work_create()
68 return clflush; in clflush_work_create()
75 struct clflush *clflush; in i915_gem_clflush_object() local
110 clflush = NULL; in i915_gem_clflush_object()
113 clflush = clflush_work_create(obj); in i915_gem_clflush_object()
114 if (clflush) { in i915_gem_clflush_object()
115 i915_sw_fence_await_reservation(&clflush->base.chain, in i915_gem_clflush_object()
119 dma_resv_add_fence(obj->base.resv, &clflush->base.dma, in i915_gem_clflush_object()
121 dma_fence_work_commit(&clflush->base); in i915_gem_clflush_object()