Lines Matching refs:clflush
14 struct clflush { struct
29 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_work() argument
30 struct drm_i915_gem_object *obj = clflush->obj; in clflush_work()
45 struct clflush *clflush = container_of(base, typeof(*clflush), base); in clflush_release() local
47 i915_gem_object_put(clflush->obj); in clflush_release()
56 static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj) in clflush_work_create()
58 struct clflush *clflush; in clflush_work_create() local
62 clflush = kmalloc(sizeof(*clflush), GFP_KERNEL); in clflush_work_create()
63 if (!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()
75 struct clflush *clflush; in i915_gem_clflush_object() local
105 clflush = NULL; in i915_gem_clflush_object()
107 clflush = clflush_work_create(obj); in i915_gem_clflush_object()
108 if (clflush) { in i915_gem_clflush_object()
109 i915_sw_fence_await_reservation(&clflush->base.chain, in i915_gem_clflush_object()
113 dma_resv_add_excl_fence(obj->base.resv, &clflush->base.dma); in i915_gem_clflush_object()
114 dma_fence_work_commit(&clflush->base); in i915_gem_clflush_object()